Visual Studio Code Tunnel Shell Execution
Detects the execution of a shell (powershell, bash, wsl...) via Visual Studio Code tunnel. Attackers can abuse this functionality to establish a C2 channel and execute arbitrary commands on the system.
Detection logic
Detection requirements
- Platform
- ESXiLinuxmacOSNetwork DevicesWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source product
- windows
- Log source category
- process_creation
Known benign triggers
- Legitimate use of Visual Studio Code tunnel and running code from there
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| badoption.eu/blog/2023/01/31/code_c2.html | 8from 2 sources |
| code.visualstudio.com/docs/remote/tunnels | 5from 2 sources |
| ipfyx.fr/post/visual-studio-code-tunnel/ | 7 |
From the source
- At source
- Open at source
- Upstream identifier
- f4a623c2-4ef5-4c33-b811-0642f702c9f1
- Tagged by the source as
- attack.command-and-control
Licence
- Published under
- Detection Rule License 1.1Read the licence
- Attribution
- Required
Authorship
- Published
- Aug 26, 2026
- Version
- 1