ChainDrop is a self-propagating npm worm that infected hundreds of packages, stole developer and cloud credentials, and republished itself through compromised npm tokens while also targeting GitHub Actions and AI coding tool environments. Its operators used Ethereum-based C2 resolution and could silently rotate infrastructure without updating the malware, with evidence linking the campaign to Shai-Hulud-style tooling. #ChainDrop #ShaiHulud #Ethereum #npm #GitHubActions
Keypoints
- ChainDrop infected over 400 npm packages that are downloaded hundreds of millions of times each week.
- The worm steals cloud credentials, npm and GitHub tokens, SSH keys, and other sensitive developer data.
- It can scrape temporary credentials from GitHub Actions runner memory and use stolen npm publishing tokens to republish infected packages.
- Unit 42 identified 453 public GitHub repositories across five accounts matching the wormâs exfiltration patterns and observed execution in 10 distinct environments.
- The malware establishes persistence through VS Code and Claude Code configuration files, with latent support for macOS LaunchAgents and Linux systemd services.
- Its command-and-control infrastructure is resolved through an Ethereum smart contract, allowing silent domain rotation without changing the malware.
- Some activity was detected by Palo Alto Networks products, including Koi Agentic Endpoint Security and Cortex XDR behavioral detections.
MITRE Techniques
- [T1059.007 ] JavaScript â ChainDrop executes its payload through Bun and JavaScript dropper files to run the worm and launch credential theft (âexecutes Math_Symbol.js or math_init.js via the bun nodejs runtimeâ).
- [T1059.006 ] Python â An embedded Python helper is used on GitHub Actions runners to locate Runner.Worker and scrape live process memory (âan embedded Python helperâŚlocates the Runner.Worker processâ).
- [T1005 ] Data from Local System â The worm harvests files, configs, tokens, histories, and wallet data from infected hosts (âit sweeps the infected machine to harvest credentials from the environmentâ).
- [T1528 ] Steal Application Access Token â It invokes GitHub CLI authentication commands to steal GitHub credentials (âinvokes âgh auth tokenâ to extract the local GitHub CLI authentication tokenâ).
- [T1555 ] Credentials from Password Stores â The payload gathers stored developer and service credentials such as npm, GitHub, SSH, Vault, and cloud secrets (âGit credentialsâŚnpm and GitHub tokensâŚSSH keysâŚVault tokensâ).
- [T1057 ] Process Discovery â The memory scraper searches for the Runner.Worker process on GitHub Actions runners (âlocates the Runner.Worker processâ).
- [T1003 ] OS Credential Dumping â The worm reads /proc//maps and /proc//mem to extract secrets from process memory (âopens /proc//maps and /proc//memâ).
- [T1547.001 ] Registry Run Keys / Startup Folder â The malware creates persistence through developer tooling startup hooks and OS autostart mechanisms (âit writes a .vscode/tasks.jsonâŚSessionStart command hook⌠macOS LaunchAgent⌠Linux systemd user serviceâ).
- [T1127 ] Trusted Developer Utilities Proxy Execution â It uses legitimate tools like Bun and Claude Code/VS Code hooks as execution vehicles (âusing a legitimate runtime as a portable execution vehicleâ).
- [T1105 ] Ingress Tool Transfer â The dropper downloads Bun from GitHub and fetches additional payload material (âIt downloads Bun 1.3.13 from the legitimate Oven GitHub repositoryâ).
- [T1027 ] Obfuscated Files or Information â The payload is heavily obfuscated with Base91, custom permutation, and AES-256-GCM layers (âprotected by three nested layers of obfuscation and encryptionâ).
- [T1106 ] Native API â The worm reads returned HTTP responses, parses JSON, and evaluates code from the server (âparses it as JSON and evaluates whatever comes backâ).
- [T1090 ] Proxy â It relies on Cloudflare-proxied infrastructure and multiple public RPC endpoints to hide and route C2 traffic (âboth domains are proxied through CloudflareâsâŚinfrastructureâ).
- [T1568.002 ] Domain Generation Algorithms â The new domain is described as randomized and DGA-like (ârandomized 12-character string on the .icu top-level domainâ).
- [T1567.002 ] Exfiltration to Cloud Storage â The worm uploads stolen data through GitHub repositories and Actions artifacts as alternate exfiltration paths (âuploads it as an Actions artifactâŚpublic repositoriesâ).
- [T1021.004 ] SSH â The malware steals SSH keys and related access material from developer systems (âSSH keysâ).
- [T1552.001 ] Credentials in Files â It collects secrets from files such as .env, .netrc, and configuration files (â .env files .netrc Application configurationâ).
- [T1552.004 ] Private Keys â The worm explicitly targets SSH keys and other private key material (âSSH keysâ).
- [T1555.003 ] Credentials from Web Browsers â Not directly mentioned; omitted.
- [T1027.013 ] Encrypted/Encoded File â The exfiltration and payload components are stored and transmitted in encrypted form (âJSON-serialized, gzipped, encrypted with a random AES-256-GCM keyâ).
Indicators of Compromise
- [File hashes ] malicious payload and setup variants â 9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc, 54dc7ea54a1317cca0e890a2770630cf7fa6c97813e0cb9d2caa93012b350668, and 2 more hashes.
- [Domains ] C2 and exfiltration infrastructure â awqhnjewqjkl[.]icu, npm-cache[.]com, and 2 more domains.
- [URLs ] C2 endpoint and probe path â hxxps://npm-cache[.]com:443/router, hxxp://awqhnjewqjkl[.]icu/cdn-cgi/rum?
- [IP addresses ] observed C2 destinations â 104.21.91[.]101, 172.67.215[.]154.
- [Ethereum addresses ] resolver contract and operator wallet â 0xE1f2395ee43e45A1556EC6438a88c31B83493103, 0x55f9780e1492344b7417fa723aedc4d0b97f31cd.
- [Transaction hashes ] C2 rotation and contract activity â 0xc55920f1bd0531b6738153068a666c080ddded47e6256f1fd980d51c0b507c91.
- [GitHub markers ] repository and commit-search indicators â Shai-Hulud: Here We Go Again, thebeautifulmarchoftime, and thebeautifulsnadsoftime.
- [File names ] dropped persistence and payload files â setup.mjs, math_init.js, Math_Symbol.js, .vscode/tasks.json, .claude/settings.json.
- [Service and artifact names ] latent persistence artifacts â com.user.gh-token-monitor.plist, gh-token-monitor.service, gh-token-monitor.sh.
Read more: https://unit42.paloaltonetworks.com/chaindrop-npm-worm-analysis/