Suspicious IDE Extension Installation from VSIX

Last updated a day ago on 2026-10-26
Created a day ago on 2026-10-26

About

Detects installation of an IDE extension from a local VSIX ("--install-extension" with a ".vsix" path) when that path is in a staging directory, or the parent is a script host or installer. VS Code and compatible editors (Cursor, VSCodium, Windsurf) use this CLI to sideload extensions outside the marketplace.
Tags
Domain: EndpointOS: LinuxOS: WindowsOS: macOSUse Case: Threat DetectionTactic: PersistenceData Source: Elastic DefendRule Type: ES|QLPlatform: WindowsPlatform: LinuxPlatform: macOSLanguage: esql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Persistence (TA0003)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

endpoint(external, opens in a new tab or window)

Query
text code block:
FROM logs-endpoint.events.process-* METADATA _id, _version, _index | WHERE MV_CONTAINS(event.category, "process") AND MV_CONTAINS(event.type, "start") AND TO_LOWER(process.command_line) LIKE "*--install-extension*" AND TO_LOWER(process.command_line) LIKE "*.vsix*" AND ( ( host.os.type == "windows" AND ( TO_LOWER(process.command_line) RLIKE """.*\\users\\public\\.*|.*\\appdata\\local\\temp\\.*|.*/users/public/.*|.*/appdata/local/temp/.*""" OR TO_LOWER(process.parent.name) IN ( "mshta.exe", "wscript.exe", "cscript.exe", "powershell.exe", "msiexec.exe", "pwsh.exe", "node.exe", "bun.exe", "py.exe" ) OR TO_LOWER(process.parent.name) LIKE "python*" ) ) OR ( host.os.type IN ("macos", "linux") AND ( TO_LOWER(process.command_line) LIKE ( "*/tmp/*", "*/var/tmp/*", "*/private/tmp/*", "*/dev/shm/*", "*/users/shared/*" ) OR TO_LOWER(process.parent.name) IN ( "osascript", "node", "bun" ) OR TO_LOWER(process.parent.name) LIKE "python*" ) ) ) | KEEP _id, _version, _index, data_stream.namespace, @timestamp, host.name, host.id, agent.id, host.os.type, user.name, user.domain, process.name, process.parent.name, process.command_line, process.parent.command_line

Install detection rules in Elastic Security

Detect Suspicious IDE Extension Installation from VSIX in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).