ChainDrop Worm Steals GitHub, Cloud Credentials via 400+ npm Packages
Key Takeaways A new self-propagating worm, dubbed “ChainDrop,” has infected over 400 npm packages. The worm steals GitHub, cloud, and npm credentials, impacting developer workstations,...
Key Takeaways
- A new self-propagating worm, dubbed “ChainDrop,” has infected over 400 npm packages.
- The worm steals GitHub, cloud, and npm credentials, impacting developer workstations, build systems, and cloud environments.
- ChainDrop operates stealthily by modifying existing packages without disrupting their functionality, making detection difficult.
- The attack leverages trusted software supply chain components, including package registries and release automation, to spread.
- Organizations should immediately identify and remove affected package versions, investigate compromised systems, and rotate all exposed credentials.
A sophisticated new self-propagating worm, dubbed ChainDrop, is actively compromising the npm ecosystem, turning routine software installations into a potent vector for credential theft. This insidious malware has infected more than 400 npm packages, posing a significant risk to developer laptops, critical build systems, and sensitive cloud environments.
Table Of Content
The stealthy nature of ChainDrop means that compromised packages continue to function as expected, often leaving development teams unaware that a seemingly innocuous update has opened a backdoor into their infrastructure. This silent operation allows the worm to spread undetected, leveraging the inherent trust in software supply chains.
The Propagation Mechanism of ChainDrop
ChainDrop’s propagation relies on exploiting trusted publishing accounts. Once a package is poisoned, it executes during installation, initiating a search for valuable access tokens. The worm then uses any stolen npm credentials to modify and republish further packages, creating an automated cycle of infection.
This automated process means that a single compromised developer account or build runner can rapidly affect a vast number of downstream users. Unit 42 said in a report shared with Cyber Security News (CSN) that this operation has impacted packages downloaded hundreds of millions of times weekly. Researchers identified 453 public repositories across five accounts exhibiting the worm’s data-theft pattern, though these accounts are currently considered potential rather than confirmed victims.
This incident starkly highlights the escalating dangers of software supply chain attacks. Rather than relying on traditional phishing or malicious websites, attackers are now exploiting the fundamental trust developers place in package registries, automated release pipelines, and ubiquitous open-source dependencies. The threat posed by ChainDrop can seamlessly bridge from development projects to cloud accounts and production environments.
ChainDrop Worm Infects 400+ npm Packages
ChainDrop effectively conceals itself within legitimate package releases. Researchers discovered that an infected package incorporates an install-time instruction, a dropper, and an obfuscated payload, all while leaving the original code base unaltered. This low-profile methodology ensures that the modified release appears normal to developers and bypasses standard review processes.
Upon installation, the malware operates discreetly on developer workstations or within continuous integration (CI) jobs. It systematically collects a wide array of sensitive data, including npm and GitHub tokens, cloud credentials, SSH keys, environment files, and configuration data from various developer tools. Furthermore, the worm specifically targets temporary secrets residing in GitHub Actions runner memory, accessing information that may never be persistently stored as a file.
The worm then utilizes stolen publishing tokens to identify other packages that the compromised account can update. It injects its malicious components, increments the patch version, and republishes these new infected versions. This method mirrors other reported npm worm campaigns, where legitimate update channels are weaponized as delivery mechanisms instead of relying on overtly malicious downloads.
ChainDrop also establishes persistence by modifying project settings for code editors and AI-assisted development tools. This means that merely opening a project can trigger the malware, even after the initial installation phase. This risk parallels recent incidents involving AI tool backdoors, where local configuration settings become unexpected points of execution.
Credential Theft and Containment Steps
ChainDrop’s capabilities extend beyond mere secret collection. It can establish public repositories under victim accounts, creating an alternative channel for exfiltrating stolen data. The worm also retrieves its command-and-control (C2) destination via an Ethereum smart contract, enabling the operator to dynamically alter the destination without needing to update already infected packages. Researchers observed such a C2 change on August 4.
This dynamic design complicates straightforward containment efforts. An organization might block one network exfiltration route but could overlook repository-based channels, compromised lockfiles, cached archives, or infected build images. Teams must vigilantly review any unexpected npm publishing activities or repository changes, especially following dependency updates or unusual automated releases.
Unit 42 advises organizations to locate and remove all affected package versions, thoroughly investigate developer machines and CI runners, and eliminate any persistence mechanisms before rotating credentials. Security teams are strongly urged to revoke and replace all npm, GitHub, cloud, SSH, and automation secrets exposed on any confirmed infected systems. Recent compromises, such as the Keyv package incident, underscore the critical importance of treating installations during the exposure period with the same urgency as a direct credential breach.
Administrators should rebuild dependency lockfiles from trusted releases and purge old caches, mirrors, and package archives. Simply updating to a “latest” tag may not safeguard systems that have already resolved and installed a poisoned version. To mitigate exposure, teams should implement short-lived, narrowly scoped credentials, utilize single-use CI runners, and enforce strict outbound network rules for all build jobs.
Finally, defenders must meticulously inspect package changes for new installation hooks, altered script sections, and unusually large compressed JavaScript files. The hunt for compromise should extend across all repositories and build environments, not just named packages, as the worm propagates through every account where it gains publishing access. The broader broader cloud services package compromise illustrates how stolen release credentials can quickly escalate a limited breach into a widespread supply-chain event.
What You Should Do
- Identify and Remove: Locate and remove all affected package versions from your development environments, build systems, and production deployments.
- Investigate Systems: Conduct a thorough investigation of all developer machines and CI/CD runners for signs of compromise, including unexpected file changes, new processes, or suspicious network activity.
- Eliminate Persistence: Remove any persistence mechanisms created by the worm, such as altered project settings or newly created files in user directories.
- Rotate Credentials: Immediately revoke and replace all npm, GitHub, cloud, SSH, and automation secrets that may have been exposed on confirmed infected systems. Assume all credentials on a compromised system are tainted.
- Rebuild and Clear: Rebuild dependency lockfiles from known trusted sources and clear all old package caches, mirrors, and archives to prevent reinfection from stale data.
- Implement Least Privilege: Adopt short-lived, narrowly scoped credentials for all automated processes and human users. Utilize single-use CI runners that are destroyed after each job.
- Strengthen Network Controls: Enforce strict outbound network rules for build jobs and development environments to limit potential C2 communication and data exfiltration.
- Monitor Package Changes: Regularly inspect package changes for new install hooks, modified script sections, and unusually large compressed JavaScript files, which can indicate malicious alterations.
- Broaden Threat Hunting: Extend threat hunting beyond specific named packages to encompass all repositories and build environments, as the worm propagates through any account with publishing access.
| Type | Indicator | Description |
|---|---|---|
| SHA-256 | 9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc |
Hash for Math_Symbol.js / math_init.js |
| SHA-256 | 54dc7ea54a1317cca0e890a2770630cf7fa6c97813e0cb9d2caa93012b350668 |
Hash for first setup.mjs variant |
| SHA-256 | fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb |
Hash for second setup.mjs variant |
| SHA-256 | b27b82afa5f15512f3856e549fb83d873fd0049759a4b62ce64c8d7d4dc2c678 |
Hash for setup.mjs.malicious |
| Domain | awqhnjewqjkl[.]icu |
C2 domain retrieved through the Ethereum resolver contract |
| Domain | npm-cache[.]com |
C2 domain active during analysis |
| Domain | pypi-get[.]com |
Historical C2 domain returned by the Ethereum contract |
| Domain | js-mirror[.]com |
Historical C2 domain returned by the Ethereum contract |
| URL | hxxps://npm-cache[.]com:443/router |
C2 data-exfiltration endpoint |
| URL | hxxp://awqhnjewqjkl[.]icu/cdn-cgi/rum? |
Observed endpoint associated with the rotated C2 domain |
| IP address | 104.21.91[.]101 |
Destination IP address observed for the rotated C2 domain |
| IP address | 172.67.215[.]154 |
Destination IP address observed for the rotated C2 domain |
| Ethereum contract | 0xE1f2395ee43e45A1556EC6438a88c31B83493103 |
Resolver contract used to supply C2 domains |
| Ethereum transaction | 0xc55920f1bd0531b6738153068a666c080ddded47e6256f1fd980d51c0b507c91 |
Transaction used to rotate C2 infrastructure |
| Ethereum wallet | 0x55f9780e1492344b7417fa723aedc4d0b97f31cd |
Contract owner wallet |
| Ethereum wallet | 0x35477b7b2df3174B9FE8A681750A7E3fbA20F39B |
Binance deposit pivot |
| Ethereum selector | 0x53ed5143 |
Getter selector |
| Ethereum selector | 0xd3c159e5 |
Setter selector |
| Repository description | Shai-Hulud: Here We Go Again |
Description used on public repositories linked to exfiltration activity |
| GitHub marker | thebeautifulmarchoftime |
Commit-search token used for the backup C2 mechanism |
| GitHub marker | thebeautifulsnadsoftime |
Signed-record prefix for the backup C2 mechanism |
| Name terms | sardaukar, mentat, fremen, atreides, harkonnen |
Dune-themed terms used in generated repository names |
| File path | ~/.local/bin/gh-token-monitor.sh |
Latent Linux persistence artifact |
| File path | ~/.config/gh-token-monitor/ |
Latent Linux persistence directory |
| File path | ~/Library/LaunchAgents/com.user.gh-token-monitor.plist |
Latent macOS LaunchAgent persistence artifact |
| File path | ~/.config/systemd/user/gh-token-monitor.service |
Latent Linux systemd persistence artifact |
Disclaimer: HackersRadar reports on cybersecurity threats and incidents for informational and awareness purposes only. We do not engage in hacking activities, data exfiltration, or the hosting or distribution of stolen or leaked information. All content is based on publicly available sources.



No Comment! Be the first one.