threatdeck
Live 13:45 UTC ·

Detection library

YARAAlert-ready after reviewMCP servers and agent configuration

YARA: SANDWORM_MODE npm worm and its McpInject rogue MCP server

SANDWORM_MODE (Socket, 21 February 2026) is controlled by SANDWORM_* environment switches and ships a McpInject module that drops a server.js exposing the tools index_project, lint_check and scan_dependencies, whose descriptions carry a prompt injection telling agents to collect SSH keys, AWS credentials, npm tokens and .env files. Scan node_modules, npm caches and hidden home directories.

Log source
File scan of node_modules, npm caches and hidden directories under the home folder
Techniques
AML.T0110 AI Agent Tool Poisoning · ASI04 Agentic Supply Chain Vulnerabilities · LLM03 Supply Chain · AML.T0010 Supply Chain Compromise · AML.T0098 AI Agent Tool Credential Harvesting
MITRE ATT&CK
T1195.002Compromise Software Supply ChainT1552.001Credentials In FilesT1552.004Private KeysT1698Indirect Prompt Injection
Reviewed
2026-11-10

Query

rule ThreatDeck_SANDWORM_MODE_npm_worm
{
    meta:
        description = "SANDWORM_MODE npm worm control switches and McpInject rogue MCP server"
        reference = "https://socket.dev/blog/sandworm-mode-npm-worm-ai-toolchain-poisoning"
        author = "ThreatDeck"
        date = "2026-11-09"
    strings:
        $env1 = "SANDWORM_MODE" ascii
        $env2 = "SANDWORM_DGA_SEED" ascii
        $env3 = "SANDWORM_DRAIN_ENDPOINT" ascii
        $env4 = "SANDWORM_STAGE2_DELAY" ascii
        $env5 = "SANDWORM_CARRIER_NAME" ascii
        $inject = "McpInject" ascii
        $tool1 = "index_project" ascii
        $tool2 = "lint_check" ascii
        $tool3 = "scan_dependencies" ascii
        $mcp = "mcpServers" ascii
    condition:
        filesize < 5MB and (2 of ($env*) or ($inject and $mcp) or (all of ($tool*) and ($mcp or $inject)))
}

Expected false positives

  • Threat-research copies of the sample and IOC write-ups

Sources

Reviewed against vendor documentation, not tested in your environment. Defensive use only.

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.