Windows: Detect creation of code_tunnel.json indicating VS Code tunneling utility use

Alerts on Windows file creation of code_tunnel.json, indicating VS Code tunneling may be active.

FreeReviewedSigma · Medium · v5
Product
windows
Category
file_event
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-10-25
Updated
2026-07-31
title: "Windows: Detect creation of code_tunnel.json indicating VS Code tunneling utility use"
id: e8cd6686-7542-4be1-af01-75af7f0000e6
status: test
description: This rule identifies when a file ending with '\code_tunnel.json' is created on Windows, which indicates use of the VS Code tunneling utility. Attackers may abuse tunneling features to establish external connectivity that can support command and control. It relies on file creation telemetry capturing the target filename suffix.
references:
  - https://ipfyx.fr/post/visual-studio-code-tunnel/
  - https://badoption.eu/blog/2023/01/31/code_c2.html
  - https://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/file/file_event/file_event_win_vscode_tunnel_indicators.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-10-25
tags:
  - attack.command-and-control
  - detection.threat-hunting
logsource:
  category: file_event
  product: windows
detection:
  selection:
    TargetFilename|endswith: \code_tunnel.json
  condition: selection
falsepositives:
  - Legitimate usage of VsCode tunneling functionality will also trigger this
level: medium
license: DRL-1.1
related:
  - id: 9661ec9d-4439-4a7a-abed-d9be4ca43b6d
    type: derived