Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Back to malware
Malware

SANDWORM_MODE

SANDWORM_MODE is an active “Shai-Hulud-like” npm supply-chain worm campaign (as reported by Socket) that weaponized at least 19 malicious/typosquatted npm packages (published by the npm accounts “official334” and “javaorg”). The packages execute on import and are designed to steal developer and CI/CD secrets (including npm and GitHub tokens, CI secrets, environment secrets, access tokens, API keys, and cryptocurrency keys/material), then self-propagate by abusing stolen npm/GitHub identities to publish additional malicious packages and inject into GitHub repositories.

The operation is described as multi-stage: an initial stage rapidly harvests and exfiltrates npm/GitHub tokens and crypto keys (including exfiltration via HTTP POST to a Cloudflare Worker), followed by a delayed second stage on developer machines (reported as 48 hours plus per-machine jitter up to an additional 48 hours; also described as 48–96 hours) that expands collection (e.g., password managers, local SQLite stores, files) and adds worm-like propagation and persistence. In CI environments, the time gate is reported to be bypassed and the full payload runs immediately, including a weaponized GitHub Action that harvests CI/CD secrets and exfiltrates via HTTPS with DNS fallback. Persistence is reported via git hook-based mechanisms (including global git hooks via init.templateDir), and propagation includes GitHub API abuse and an SSH-based fallback.

A notable capability is tampering with AI coding assistants via an “McpInject” module: it writes and injects a malicious Model Context Protocol (MCP) server into configurations for Claude Code, Claude Desktop, Cursor, VS Code Continue, and Windsurf. The malicious MCP server masquerades as a legitimate tool provider and registers tools (reported as index_project, lint_check, and scan_depencies) containing embedded prompt-injection content intended to coerce AI agents into reading and staging sensitive local files such as ~/.ssh/id_rsa, ~/.ssh/id_ed25519, ~/.aws/credentials, ~/.npmrc, and .env for later exfiltration. The campaign is reported to target LLM API keys for multiple providers, including OpenAI, Anthropic, Google, Groq/Grok (both spellings appear in the content), Together, Fireworks, Replicate, Mistral, and Cohere.

The malware is also reported to include (currently disabled) advanced features: a polymorphic engine configured to use a local Ollama instance with the DeepSeek Coder model to rewrite code for evasion, and a destructive “dead switch”/wiper routine capable of wiping the home directory if it loses access to GitHub and npm (off by default in observed samples).

Known affected npm packages/versions listed in the content (no safe versions claimed) include: claud-code@0.2.1, cloude-code@0.2.1, cloude@0.3.0, crypto-locale@1.0.0, crypto-reader-info@1.0.0, detect-cache@1.0.0, format-defaults@1.0.0, hardhta@1.0.0, locale-loader-pro@1.0.0, naniod@1.0.0, node-native-bridge@1.0.0, opencraw@2026.2.17, parse-compat@1.0.0, rimarf@1.0.0, scan-store@1.0.0, secp256@1.0.0, suport-color@1.0.1, veim@2.46.2, and yarsg@18.0.1. Additional “sleeper” packages noted as not incorporating malicious features at the time of reporting are: ethres, iru-caches, iruchache, and uudi. A related malicious GitHub Action is referenced as ci-quality/code-quality-check (also referenced as ci-quality/code-quality-check@v1), with a threat-actor GitHub org “ci-quality” created on Feb. 17, 2026. Cloudflare workers and the associated npm/GitHub artifacts were reported as removed after notification.

Share:
For your environment

Hunt this family in your stack

Mallory pivots from this family to the IOCs, detections, and named campaigns that touch your stack, and pages you when something new lands.

MITRE ATT&CK

Techniques & procedures

32 distinct techniques documented for this family, organized by ATT&CK tactic.

Reconnaissance

1 technique
T1589Gather Victim Identity InformationEvidence1

An active Shai-Hulud-like supply chain worm campaign spreads via typosquatting and AI toolchain poisoning, across at least 19 malicious npm packages... One representative example, suport-color@1.0.1, impersonates supports-color... Other packages in the set follow the same look-alike branding strategy to increase the likelihood of accidental installation.

Resource Development

1 technique
T1583.001DomainsEvidence1

"The campaign, tracked as SANDWORMMODE, uses typosquatted npm packages and poisoned GitHub Actions to infect both developer machines and CI pipelines."

Initial Access

4 techniques
T1078Valid AccountsEvidence2

The malicious code embedded into the packages comes with capabilities to siphon system information, access tokens, environment secrets, and API keys from developer environments and automatically propagate by abusing stolen npm and GitHub identities to extend its reach.

T1195Supply Chain CompromiseEvidence2

The code follows hallmarks analyzed in prior Shai-Hulud variants, including credential theft from developer and CI environments and automated propagation by abusing stolen npm and GitHub identities to move laterally through the software supply chain.

T1195.001Compromise Software Dependencies and Development ToolsEvidence4

"spreads via typosquatting and AI toolchain poisoning, across at least 19 malicious npm packages"; "typosquat npm packages impersonating known utilities"

T1195.002Compromise Software Supply ChainEvidence1

"weaponized GitHub Action that harvests CI secrets"; "plants CI backdoors by injecting pull_request_target workflows that serialize secrets"; "injects workflows referencing this Action"

Execution

2 techniques
T1053Scheduled Task/JobEvidence2

...persists via git hooks that survive into future repositories through a global init.templateDir setting... It hardens persistence by setting git config --global init.templateDir so new repositories inherit malicious hooks automatically.

T1059Command and Scripting InterpreterEvidence1

The payload is split across 45 base64 chunks... At runtime, the chunks are sorted, concatenated, base64-decoded, and zlib-inflated, then executed entirely in memory via Node’s internal Module._compile() API... executed via eval().

Persistence

7 techniques
T1053Scheduled Task/JobEvidence2

...persists via git hooks that survive into future repositories through a global init.templateDir setting... It hardens persistence by setting git config --global init.templateDir so new repositories inherit malicious hooks automatically.

T1078Valid AccountsEvidence2

The malicious code embedded into the packages comes with capabilities to siphon system information, access tokens, environment secrets, and API keys from developer environments and automatically propagate by abusing stolen npm and GitHub identities to extend its reach.

T1098Account ManipulationEvidence1

"...self-propagates by leveraging harvested npm and GitHub tokens to publish the malicious package through victims’ npm accounts or inject itself into the victim’s GitHub repos."

T1546Event Triggered ExecutionEvidence1

The packages go beyond npm-based propagation by including a weaponized GitHub Action that harvests CI/CD secrets...

T1546.008Accessibility FeaturesEvidence2

"persists via git hooks that survive into future repositories through a global init.templateDir setting"; "git config --global init.templateDir so new repositories inherit malicious hooks automatically"

T1546.009AppCert DLLsEvidence1

"Persistence... Uses git hooks so new repos inherit infection"

T1556Modify Authentication ProcessEvidence1

The module then injects this server into every AI coding assistant config it finds on disk: Claude Code..., Cursor..., VS Code Continue..., and Windsurf/Codeium... Each gets a mcpServers entry pointing to the deployed server.js.

Privilege Escalation

6 techniques
T1053Scheduled Task/JobEvidence2

...persists via git hooks that survive into future repositories through a global init.templateDir setting... It hardens persistence by setting git config --global init.templateDir so new repositories inherit malicious hooks automatically.

T1078Valid AccountsEvidence2

The malicious code embedded into the packages comes with capabilities to siphon system information, access tokens, environment secrets, and API keys from developer environments and automatically propagate by abusing stolen npm and GitHub identities to extend its reach.

T1098Account ManipulationEvidence1

"...self-propagates by leveraging harvested npm and GitHub tokens to publish the malicious package through victims’ npm accounts or inject itself into the victim’s GitHub repos."

T1546Event Triggered ExecutionEvidence1

The packages go beyond npm-based propagation by including a weaponized GitHub Action that harvests CI/CD secrets...

T1546.008Accessibility FeaturesEvidence2

"persists via git hooks that survive into future repositories through a global init.templateDir setting"; "git config --global init.templateDir so new repositories inherit malicious hooks automatically"

T1546.009AppCert DLLsEvidence1

"Persistence... Uses git hooks so new repos inherit infection"

Stealth

5 techniques
T1027Obfuscated Files or InformationEvidence2

Socket AI Scanner’s analysis... highlights an obfuscated import-time loader... a large embedded base64 blob is decompressed with zlib.inflateSync() and executed via eval()... base64 decode + zlib inflate + XOR decrypt + indirect eval().

T1036MasqueradingEvidence1

Another significant component of the malware is an "McpInject" module that specifically targets AI coding assistants by deploying a malicious model context protocol (MCP) server and injecting it into their tool configurations. The MCP server masquerades as a legitimate tool provider...

T1078Valid AccountsEvidence2

The malicious code embedded into the packages comes with capabilities to siphon system information, access tokens, environment secrets, and API keys from developer environments and automatically propagate by abusing stolen npm and GitHub identities to extend its reach.

T1497.003Time Based ChecksEvidence2

The deeper Stage 2 capabilities are then gated by a 48-hour base delay... plus per-machine jitter... In CI environments... the time gate is bypassed entirely... while the noisier operations are deferred to evade short-lived sandbox analysis.

T1564.001Hidden Files and DirectoriesEvidence1

Other variants... write the decoded script to a random hidden temp file, require() it, then immediately unlink() it... Stage 1 writes decrypted Stage 2 to a transient .node_<hex>.js file under /dev/shm... require()s it, and deletes it.

Defense Impairment

1 technique
T1556Modify Authentication ProcessEvidence1

The module then injects this server into every AI coding assistant config it finds on disk: Claude Code..., Cursor..., VS Code Continue..., and Windsurf/Codeium... Each gets a mcpServers entry pointing to the deployed server.js.

Credential Access

5 techniques
T1528Steal Application Access TokenEvidence1

The code follows hallmarks analyzed in prior Shai-Hulud variants, including credential theft from developer and CI environments... On import, Stage 1 immediately performs a lightweight credential harvest (collectAll: npm tokens, GitHub tokens, environment secrets, crypto keys).

T1552Unsecured CredentialsEvidence3

The malicious code embedded into the packages comes with capabilities to siphon system information, access tokens, environment secrets, and API keys from developer environments... It also harvests API keys for nine large language models (LLM) providers.

T1555Credentials from Password StoresEvidence3

Once the time gate opens, Stage 2 performs deep harvesting: password managers (Bitwarden, 1Password, LastPass via their respective CLIs)... | As a secondary collection step, the module also harvests API keys for nine LLM providers... from environment variables and .env files...

T1556Modify Authentication ProcessEvidence1

The module then injects this server into every AI coding assistant config it finds on disk: Claude Code..., Cursor..., VS Code Continue..., and Windsurf/Codeium... Each gets a mcpServers entry pointing to the deployed server.js.

T1649Steal or Forge Authentication CertificatesEvidence1

The MCP server masquerades as a legitimate tool provider and registers three seemingly-harmless tools, each of which embeds a prompt injection to read the contents of ~/.ssh/id_rsa, ~/.ssh/id_ed25519, ~/.aws/credentials, ~/.npmrc, and .env files.

Discovery

2 techniques
T1082System Information DiscoveryEvidence1

The malicious code embedded into the packages comes with capabilities to siphon system information... Some of the data stolen by the agent are as follows - System information

T1497.003Time Based ChecksEvidence2

The deeper Stage 2 capabilities are then gated by a 48-hour base delay... plus per-machine jitter... In CI environments... the time gate is bypassed entirely... while the noisier operations are deferred to evade short-lived sandbox analysis.

Lateral Movement

2 techniques
T1021.004SSHEvidence1

Additional propagation fallback... SSH-assisted fallback when API propagation fails (SSH_AUTH_SOCK, GitHub SSH validation, clone/push)... Vector 3 → SSH agent (fallback)... ssh -T git@github.com...

T1570Lateral Tool TransferEvidence2

The Propagate module implements three independent propagation vectors... npm publish... GitHub API... SSH push... automated propagation by abusing stolen npm and GitHub identities to move laterally through the software supply chain.

Command and Control

2 techniques
T1071.004DNSEvidence1

It then exfiltrates all collected data... through three channels in cascade... and DNS tunneling via base32-encoded queries to freefan[.]net (primary) and fanfree[.]net (secondary), with a DGA fallback seeded by "sw2025"...

T1568.002Domain Generation AlgorithmsEvidence1

"with a DGA fallback seeded by \"sw2025\" that generates domains across ten TLDs"; "The DGA uses the same sw2025 seed"

Exfiltration

5 techniques
T1048Exfiltration Over Alternative ProtocolEvidence2

The sample retains Shai-Hulud hallmarks and adds GitHub API exfiltration with DNS fallback... exfiltrates data via the GitHub API with DNS tunneling as a secondary channel.

T1048.003Exfiltration Over Unencrypted Non-C2 ProtocolEvidence1

"...with DNS tunneling as a fallback method."

T1567Exfiltration Over Web ServiceEvidence3

It then exfiltrates all collected data... through three channels in cascade: HTTPS POST to a Cloudflare Worker..., authenticated GitHub API uploads to threat actor-created private repositories..., and DNS tunneling...

T1567.001Exfiltration to Code RepositoryEvidence1

"adds GitHub API exfiltration with DNS fallback"; "authenticated GitHub API uploads to threat actor-created private repositories"

T1567.002Exfiltration to Cloud StorageEvidence1

"...exfiltrates them via HTTP POST request to a Cloudflare Worker."

Impact

1 technique
T1485Data DestructionEvidence2

The payload also implements a Shai-Hulud-style dead switch... triggers home directory wiping when the malware simultaneously loses access to GitHub for exfiltration and npm for propagation or operation... When enabled, it would securely destroy all writable files in the user's home directory...

INDICATORS OF COMPROMISE

IOCs tracked for this family

10 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Full values are available in Mallory.

View more in app
Network
3 tracked

IPs, domains, and DNS infrastructure linked to this family.

Hashes
3 tracked

File hashes (MD5, SHA-1, SHA-256) from samples and reports.

Other
4 tracked

Other indicator types observed in public reporting.

TypeValueLatest sighting
domain●●●●●●●●●●●●View more in app4 months ago
hash.sha256●●●●●●●●●●●●View more in app4 months ago
hash.sha256●●●●●●●●●●●●View more in app4 months ago
uri●●●●●●●●●●●●View more in app4 months ago
uri●●●●●●●●●●●●View more in app4 months ago
domain●●●●●●●●●●●●View more in app4 months ago
ACTIVITY FEED

Recent activity

3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching10

Match every observed IP, domain, and hash against your live telemetry.

Threat actor attribution

Named campaigns wielding this family, with evidence pinned to each claim.

Exploited vulnerabilities

CVEs this family uses for access and lateral movement.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

MITRE ATT&CK mapping32

Every documented technique, ranked by evidence weight.

Researcher chatter

Reddit, Mastodon, and CTI community discussion around this family.