Visual Studio Code Tunnel Shell Execution
Description
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.
Query · sigma
selection_parent: ParentImage|contains: \servers\Stable- ParentImage|endswith: \server\node.exe ParentCommandLine|contains: .vscode-server selection_child_1: Image|endswith: - \powershell.exe - \pwsh.exe CommandLine|contains: \terminal\browser\media\shellIntegration.ps1 selection_child_2: Image|endswith: - \wsl.exe - \bash.exe condition: selection_parent and 1 of selection_child_*
Known false positives
- Legitimate use of Visual Studio Code tunnel and running code from there