Malicious npm and PyPI Packages Steal Solana Private Keys and Delete Sensitive Data
See Also: So, you want to be a hacker?
Offensive Security, Bug Bounty Courses
Functionality and Threats
1. Solana Private Key Theft
The first four npm packages (dexscreener
, solana-transaction-toolkit
, solana-stable-web-huks
, and @async-mutex/mutex
) are engineered to:
- Steal Solana private keys and exfiltrate them via Gmail SMTP servers, bypassing firewalls.
- Drain Solana wallets, transferring up to 98% of funds to an attacker-controlled address.
2. Destructive “Kill Switch”
Other npm packages (e.g., csbchalk-next
) feature:
- Environment variable exfiltration to a remote server.
- A kill switch to delete project-specific directories remotely, triggered by a server response code (
202
).
3. Discord Backdoor Installation
The PyPI package pycord-self
:
- Captures Discord authentication tokens.
- Installs a backdoor for persistent attacker access on both Windows and Linux.
Trending: Offensive Security Tool: ACEshark
Wider Campaign Tactics
Malicious GitHub Repositories:
Threat actors hosted fake repositories advertising Solana development tools. These repositories distributed malware-laden npm packages and have since been taken down.Targeting Roblox Users:
Similar campaigns targeted Roblox developers with fake PyPI packages containing Skuld and Blank-Grabber malware.
Recommendations for Developers
- Avoid Typosquatting Traps: Verify package names and download from trusted sources.
- Audit Dependencies: Use tools like Socket, Snyk, or npm audit to detect vulnerabilities.
- Protect Authentication Keys: Secure Solana private keys, API tokens, and environment variables in protected files.
- Monitor for Suspicious Activity: Check for unexpected network traffic, file deletions, or leaked environment variables.
- Update Security Practices: Follow trusted cybersecurity sources to stay informed on supply chain threats.
Are u a security researcher? Or a company that writes articles about Cyber Security, Offensive Security (related to information security in general) that match with our specific audience and is worth sharing? If you want to express your idea in an article contact us here for a quote: [email protected]
Source: thehackernews.com