Detect IDE Tunneling in CrowdStrike LogScale
Adversaries may abuse Integrated Development Environment (IDE) software with remote development features to establish an interactive command and control channel on target systems within a network. IDE tunneling combines SSH, port forwarding, file sharing, and debugging into a single secure connection, letting developers work on remote systems as if they were local. Unlike SSH and port forwarding, IDE tunneling encapsulates an entire session and may use proprietary tunneling protocols alongside SSH, allowing adversaries to blend in with legitimate development workflows. Some IDEs, like Visual Studio Code, provide CLI tools (e.g., code tunnel) that adversaries may use to programmatically establish tunnels and generate web-accessible URLs for remote access. These tunnels can be authenticated through accounts such as GitHub, enabling the adversary to control the compromised system via a legitimate developer portal.
MITRE ATT&CK
- Tactic
- Command and Control
- Technique
- T1219 Remote Access Tools
- Sub-technique
- T1219.001 IDE Tunneling
- Canonical reference
- https://attack.mitre.org/techniques/T1219/001/
LogScale Detection Query
#event_simpleName=ProcessRollup2
| FileName = /^(code\.exe|code-tunnel\.exe|code-insiders\.exe|code|code-tunnel|devtunnel\.exe|devtunnel|jetbrains-gateway\.exe|gateway\.exe|remote-dev-server\.sh|idea\.sh|pycharm\.sh|cursor\.exe|cursor|windsurf\.exe)$/i
OR CommandLine = /tunnel|--remote-tunnel|serve-web|dev-tunnel|--host\s+0\.0\.0\.0|--accept-server-license-terms|--no-browser/i
| IsTunnelCommand := if(CommandLine = /tunnel/i, "true", "false")
| IsCodeCLI := if(FileName = /^(code\.exe|code-tunnel\.exe|code-insiders\.exe|code|code-tunnel)$/i, "true", "false")
| IsJetBrains := if(FileName = /^(jetbrains-gateway\.exe|gateway\.exe|remote-dev-server\.sh|idea\.sh|pycharm\.sh)$/i, "true", "false")
| HasGitHubAuth := if(CommandLine = /--github|github|--provider\s+github/i, "true", "false")
| IsHeadless := if(CommandLine = /(--cli|--no-browser|--accept-server-license-terms|serve-web)/i, "true", "false")
| table([timestamp, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, IsTunnelCommand, IsCodeCLI, IsJetBrains, HasGitHubAuth, IsHeadless])
| sort(timestamp, order=desc) Detects IDE tunneling activity (T1219.001) using CrowdStrike Falcon LogScale (Humio CQL) by querying ProcessRollup2 events for known IDE tunnel executables and command-line patterns. Enrichment fields classify each event by tunnel command presence, IDE family (VS Code, JetBrains, Cursor/Windsurf), GitHub authentication use, and headless/server-mode invocation to support rapid analyst triage.
Data Sources
Required Tables
False Positives & Tuning
- Developer workstations enrolled in a corporate VS Code Remote Tunnels program where engineering policy permits cloud-based development environments, generating frequent matching ProcessRollup2 events from known asset groups.
- DevOps pipeline agents using devtunnel as part of Azure-integrated developer toolchains to expose local services for API testing, appearing as automated service account process launches on CI/CD hosts.
- Platform engineering teams using JetBrains Remote Development or JetBrains Gateway to provision and connect to centrally managed cloud developer environments (CDEs), where the gateway process is expected on provisioning hosts.
Other platforms for T1219.001
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1VS Code CLI Tunnel Initiation
Expected signal: Sysmon Event ID 1: Process Create with Image=code.exe, CommandLine containing 'tunnel --accept-server-license-terms --name test-tunnel'. Sysmon Event ID 22: DNS query for tunnels.api.visualstudio.com. If tunnel starts: Sysmon Event ID 3 for HTTPS connection to tunnel relay servers.
- Test 2DevTunnel CLI Tunnel Creation
Expected signal: Sysmon Event ID 1: Process Create with Image=devtunnel.exe, CommandLine containing 'host --port 8080 --allow-anonymous'. Sysmon Event ID 22: DNS query for devtunnels.ms. Sysmon Event ID 3: Network connection to Microsoft tunnel infrastructure.
- Test 3VS Code Tunnel Persistence via Scheduled Task
Expected signal: Security Event ID 4698: Scheduled task created with TaskContent containing 'code.exe tunnel'. Sysmon Event ID 1: Process Create for schtasks.exe with command line showing the tunnel command. The scheduled task itself won't execute (non-existent path) but the creation event fires.
References (8)
- https://attack.mitre.org/techniques/T1219/001/
- https://www.sentinelone.com/labs/operation-digital-eye-chinese-apt-compromises-critical-digital-infrastructure-via-visual-studio-code-tunnels/
- https://unit42.paloaltonetworks.com/stately-taurus-abuses-vscode-southeast-asian-espionage/
- https://medium.com/@truvis.thornton/visual-studio-code-embedded-reverse-shell-and-how-to-block-create-sentinel-detection-and-add-e864ebafaf6d
- https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/overview
- https://code.visualstudio.com/docs/remote/tunnels
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceprocessevents-table
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/process_creation
Unlock Pro Content
Get the full detection package for T1219.001 including response playbook, investigation guide, and atomic red team tests.