Windows file creation of code_tunnel.json outside Code/VsCode executables
Alerts on creation of code_tunnel.json on Windows when it isn’t created by typical VS Code binaries.
FreeReviewedSigma · High · v2
- Product
- windows
- Category
- file_event
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2023-10-25
- Updated
- 2026-07-31
What it detects
Flags Windows file events where a file named with the \\code_tunnel.json suffix is created. This can indicate use of the Visual Studio Code tunneling utility by a non-Code process or image, which may be relevant to command-and-control activity. The rule relies on file creation telemetry capturing the target filename and the creating process image path for exclusion of legitimate code executables.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
windows-file-creation-of-code-tunnel-json-indicating-non-vscode-vs-code-tunnelin-d102b8f5
title: Windows file creation of code_tunnel.json outside Code/VsCode executables
id: 779a6868-80d5-4410-b345-26ac3f02451b
status: test
description: Flags Windows file events where a file named with the \\code_tunnel.json suffix is created. This can indicate use of the Visual Studio Code tunneling utility by a non-Code process or image, which may be relevant to command-and-control activity. The rule relies on file creation telemetry capturing the target filename and the creating process image path for exclusion of legitimate code executables.
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/windows/file/file_event/file_event_win_vscode_tunnel_renamed_execution.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-10-25
tags:
- attack.command-and-control
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|endswith: \code_tunnel.json
filter_main_legit_name:
Image|endswith:
- \code-tunnel.exe
- \code.exe
condition: selection and not 1 of filter_main_*
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: d102b8f5-61dc-4e68-bd83-9a3187c67377
type: derived