Detection rules › Sigma
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.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control | T1071.001 Application Layer Protocol: Web Protocols |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 1 | Process creation |
Stages and Predicates
Stage 1: selection_parent
ParentCommandLine|contains: .vscode-server
ParentImage|endswith: '\server\node.exe'
ParentImage|contains: '\servers\Stable-'
Stage 2: 1 of selection_child_1
or:
Image|endswith: '\powershell.exe'
Image|endswith: '\pwsh.exe'
CommandLine|contains: '\terminal\browser\media\shellIntegration.ps1'
Stage 3: 1 of selection_child_2
or:
Image|endswith: '\bash.exe'
Image|endswith: '\wsl.exe'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|
Image | ends_with |
|
ParentCommandLine | match |
|
ParentImage | ends_with |
|
ParentImage | match |
|