Elastic Defend high stable eql

Potential Execution via VS Code Tasks

Identifies creation or modification of a .vscode/tasks.json file followed by opening the current project in a short time. Threat actors distribute malicious repositories that embed autorun task configurations to phish for credentials or execute payloads when a developer opens the project in Visual Studio Code.

View Source

Detection Logic

sequence with maxspan=30s
  [file where event.action in ("creation", "modification") and file.name == "tasks.json" and
   process.name in (
     // Windows browsers
     "chrome.exe", "msedge.exe", "firefox.exe", "brave.exe", "opera.exe", "vivaldi.exe",
     // macOS browsers (bundle exec names)
     "Google Chrome", "Google Chrome Helper", "Chromium", "Chromium Helper",
     "firefox", "Firefox", "Safari", "SafariTP",
     "Brave Browser", "Opera", "Vivaldi", "Arc",
     // Linux browsers
     "google-chrome", "google-chrome-stable", "chromium", "chromium-browser",
     "firefox", "firefox-esr", "brave-browser", "opera", "vivaldi-bin",
     // Windows archivers
     "7z.exe", "7zFM.exe", "7zG.exe", "winrar.exe", "tar",  "unzip.exe", "winscp.exe",
     // macOS/Linux archivers and fetch tools
     "unzip", "tar", "bsdtar", "curl", "wget",
     // Version control / package managers
     "git", "git.exe", "gh", "gh.exe", "npm", "npm.exe", "node", "node.exe",
     "pip", "pip3", "python", "python3", "python.exe",
     // Shells / script runners
     "powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe",
     "bash", "zsh", "sh", "fish", "dash"
   ) and
   file.path : ("?:\\*\\.vscode\\tasks.json", "/*/.vscode/tasks.json")]
  [process where event.type == "start" and event.action in ("start", "exec") and
   process.name in ("code", "cursor", "Code.exe", "Cursor.exe", "codium", "VSCodium.exe", "windsurf", "Windsurf.exe") and
   process.args == "."]

Field Validations

Loading…

Comments (0)

Loading comments...