🔍 Detailed Breakdown of the Threat
This rephrasing emphasizes the tactics the attackers used: The Socket's Threat Research Team found 10 malicious packages on the npm software registry that were published on July 4, 2025, and have since been downloaded over 9,900 times. These packages launch an immediate, multi-stage credential theft attack as soon as they are installed by leveraging the postinstall script and running in a new window to hide.
The attackers used several advanced methods to evade detection:
- Four Layers of Obfuscation: The malicious code was heavily disguised to hide its true function.
- Deceptive CAPTCHA: A fake CAPTCHA was displayed to the victim to make the activity look like a legitimate part of the software installation.
- System Fingerprinting: The malware collected the victim's IP address to identify the target machine.
🛑 Anatomy of the Attack
The threat actor, identified by the alias andrew_r1 (email: parvlhonor@gmx[.]com), successfully published all ten malicious packages by using a technique called typosquatting. This involves creating packages with names that are nearly identical to popular, trusted libraries, tricking developers into installing the wrong one.
The Typosquatted Targets
The malicious packages mimicked several highly-used JavaScript libraries:
- Malicious Name Legitimate Target
- typescriptjs TypeScript deezcord.js,
- dizcordjs, dezcord.js discord.js
- etherdjs, ethesjs, ethetsjs ethers.js
- nodemonjs nodemonreact-router-dom.js
- react-router-dom zustand.js zustand
JSON"scripts": {
"postinstall": "node install.js"
}
Platform Detection: The install.js script first detected the victim's operating system (Windows, Linux, or macOS).
New Terminal Launch: To keep the malware separate from the npm installation process and avoid detection, the script immediately spawned the main, obfuscated payload in a new, separate terminal window. This window quickly closes or clears its content, making it appear to the developer as a fleeting, minor glitch during the installation process, rather than a security breach.