A new and sophisticated malware campaign has been discovered targeting software developers by hiding malicious code within seemingly legitimate packages on the npm registry. Security researchers at ReversingLabs identified a series of packages designed to steal sensitive data, including cryptocurrency wallet keys, continuous integration (CI) secrets, and API tokens. This attack highlights the growing threat of supply chain compromises, where attackers poison the very tools developers rely on to build applications.
The malicious packages, with names like "eslint-config-eslint," "discord-selfbot-tools," and "discord-lofy," employed a technique known as typosquatting. This involves publishing packages with names very similar to popular, trusted libraries, hoping developers will mistype a command and accidentally install the malicious version. Once installed, the packages executed a multi-stage attack designed to evade detection and harvest valuable information from the victim's system.
The core of the attack was a sophisticated phishing scheme. The malware would search the developer's system for cryptocurrency wallet files, such as those for Exodus or Electrum wallets. If found, it would create a fake dialog box that mimicked the wallet's own interface, tricking the user into entering their password. This stolen password was then exfiltrated to a remote server controlled by the attackers, granting them full access to the victim's crypto assets. This method represents a direct and dangerous exploit of user trust within the development environment.
Beyond crypto theft, the packages were engineered to steal credentials critical to the software development lifecycle. They actively scanned for environment variables and configuration files containing secrets from platforms like GitHub, Discord, and cloud service providers. These API tokens and access keys could allow attackers to infiltrate corporate code repositories, deploy further malware, or even launch broader data breach operations against an organization's infrastructure. The theft of CI secrets is particularly concerning, as it can give attackers a foothold in automated build and deployment pipelines.
Researchers noted that the campaign was highly evasive. The malicious payload was often obfuscated and downloaded in multiple stages, making static analysis difficult. Furthermore, the packages were crafted to appear normal and even included legitimate functionality to avoid raising suspicion. This level of sophistication suggests the involvement of a well-resourced threat actor, potentially exploiting a previously unknown zero-day vulnerability in development tools, though no specific vulnerability of that kind was confirmed in this instance.
The discovery underscores the persistent risks in the open-source software ecosystem. The npm registry, like other public repositories, is a constant target for malware and ransomware groups seeking to inject malicious code into the global software supply chain. While npm's maintainers have since removed the identified packages, the incident serves as a stark reminder that dependencies must be vetted with extreme caution.
To mitigate such threats, organizations are advised to enforce strict policies on software provenance and dependency management. Developers should always verify package names and publishers, use lockfiles to pin dependency versions, and employ security tools that can scan for suspicious code and behavior. Some experts also point to blockchain-based solutions for software supply chain integrity as a potential future safeguard, providing a tamper-proof ledger of a package's origin and changes.
This campaign marks a significant escalation in the targeting of developers, moving beyond simple data theft to direct financial theft via cryptocurrency. It demonstrates that modern cybersecurity defenses must extend beyond traditional network perimeters to include the integrity of the tools and libraries used to write code every day. As attacks grow more nuanced, the responsibility for security increasingly falls on both the maintainers of open-source platforms and the individual developers who use them.


