T1176.002

IDE Extensions

Adversaries may abuse an integrated development environment (IDE) extension to establish persistent access to victim systems. IDEs such as Visual Studio Code, IntelliJ IDEA, and Eclipse support extensions — software components that add features like code linting, auto-completion, task automation, or integration with external tools. A malicious extension can be installed through an extension marketplace or side-loaded directly into the IDE via a .vsix package. Once installed, the extension runs every time the IDE is launched, enabling persistent arbitrary code execution, backdoor establishment, cryptocurrency mining, or data exfiltration. Adversaries may also leverage benign extensions: for example, Mustang Panda has abused the VSCode built-in tunnel feature (code.exe tunnel) to establish persistent reverse shells routed through Microsoft infrastructure, bypassing firewall controls.

Microsoft Sentinel / Defender
kusto
let IDEProcesses = dynamic(["code.exe", "code-insiders.exe", "code-server", "idea.exe", "idea64.exe", "eclipse.exe", "webstorm.exe", "pycharm.exe", "pycharm64.exe", "phpstorm.exe", "rider.exe", "goland.exe", "clion.exe", "datagrip.exe"]);
let SuspiciousChildren = dynamic(["cmd.exe", "powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe", "bitsadmin.exe", "schtasks.exe", "net.exe", "net1.exe", "whoami.exe", "nltest.exe", "curl.exe", "wget.exe"]);
let LegitCmdPatterns = dynamic(["git ", "npm ", "yarn ", "pip ", "cargo ", "dotnet ", "gradle", "mvn ", "make ", "cmake", "eslint", "prettier", "tsc "]);
// Branch 1: VSCode tunnel creation (Mustang Panda reverse shell TTP)
let VscodeTunnel = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("code.exe", "code-insiders.exe", "code-server")
| where ProcessCommandLine has "tunnel"
| extend DetectionBranch = "VSCode-Tunnel-Reverse-Shell"
| extend RiskReason = "VSCode tunnel enables persistent remote code execution via Microsoft infrastructure";
// Branch 2: IDE spawning high-risk processes with no legitimate build pattern
let IDESuspiciousSpawn = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ (IDEProcesses)
| where FileName in~ (SuspiciousChildren)
| where not (ProcessCommandLine has_any (LegitCmdPatterns))
| extend DetectionBranch = "IDE-Suspicious-Child-Process"
| extend RiskReason = strcat("IDE process ", InitiatingProcessFileName, " spawned ", FileName, " with non-build command line");
// Branch 3: VSIX extension side-load from outside marketplace
let VSIXSideload = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("code.exe", "code-insiders.exe")
| where ProcessCommandLine has "--install-extension" and ProcessCommandLine has ".vsix"
| extend DetectionBranch = "VSIX-Extension-Sideload"
| extend RiskReason = "Extension installed from local .vsix file — bypasses marketplace vetting";
// Branch 4: VSCode extension host making external network connections via child process
let ExtHostExternalConn = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ ("code.exe", "code-insiders.exe")
| where RemoteIPType == "Public"
| where RemotePort !in (80, 443)
| extend DetectionBranch = "IDE-External-NonHTTPS-Connection"
| extend RiskReason = strcat("IDE connected to public IP ", RemoteIP, " on non-standard port ", RemotePort)
| project Timestamp, DeviceName, AccountName, FileName=InitiatingProcessFileName, ProcessCommandLine=InitiatingProcessCommandLine, InitiatingProcessFileName="explorer.exe", InitiatingProcessCommandLine="", DetectionBranch, RiskReason;
// Union process and network branches
union VscodeTunnel, IDESuspiciousSpawn, VSIXSideload, ExtHostExternalConn
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionBranch, RiskReason
| sort by Timestamp desc
high severity medium confidence

Data Sources

Process: Process Creation Network Traffic: Network Connection Creation Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents DeviceNetworkEvents

False Positives

  • Developers using VSCode Remote Tunnels legitimately for authorized remote development — tunnel usage should be validated against IT-approved remote development policy
  • Security researchers or penetration testers testing IDE extensions in authorized lab environments
  • Extension developers side-loading their own .vsix files during local development and testing cycles
  • Build pipelines that invoke cmd.exe or powershell.exe as part of IDE task runners (e.g., VSCode tasks.json running build scripts) — these will have predictable, repeatable command lines
  • IDE extensions for Docker, Kubernetes, or cloud providers that legitimately connect to external management APIs on non-standard ports

Unlock Pro Content

Get the full detection package for T1176.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections