Solana-Drainer Malware Targets Crypto Developers

Listen to this Post

Featured Image
Threat actors are leveraging malicious Python packages to target Solana developers, stealing source code, execution history, and credentials. The attack, dubbed “Solana-Drainer,” utilized 11 different Python packages from PyPI, with four distinct payload iterations. The final payload specifically targets Jupyter Notebooks, extracting sensitive data.

Indicators of Compromise (IOCs)

  • Malicious PyPI packages (now removed)
  • Shared infrastructure across attacks
  • Code execution via Jupyter Notebooks

You Should Know: How to Detect and Mitigate Solana-Drainer Attacks

1. Check Installed Python Packages

Run the following command to list installed packages and check for suspicious ones:

pip list 

If any match known malicious packages, uninstall them immediately:

pip uninstall <malicious-package> 

2. Scan for Suspicious Files in Jupyter Notebooks

Use `grep` to search for malicious scripts:

grep -r "eval(base64.b64decode" ~/.jupyter/ 

3. Verify PyPI Package Authenticity

Before installing a package, check its metadata:

pip show <package-name> 

Look for anomalies in author names or recent uploads.

4. Monitor Network Traffic for Exfiltration

Use `tcpdump` to detect unexpected outbound connections:

sudo tcpdump -i any -n port 443 or port 80 | grep <suspicious-IP> 

5. Isolate and Analyze Malware Samples

If infected, capture the payload for analysis:

python3 -m http.server 8000  Host malware sample 
wget http://localhost:8000/malicious-file.py 

Analyze using `strace` to track system calls:

strace -f -o log.txt python malicious-file.py 

6. Revoke Exposed Credentials

If credentials were leaked, revoke them immediately:

solana config set --url <new-rpc-endpoint> 
solana-keygen recover <wallet-file> 

What Undercode Say

The Solana-Drainer attack highlights the growing threat of software supply chain attacks, particularly in cryptocurrency ecosystems. Developers must:
– Audit dependencies before installation.
– Monitor Jupyter Notebooks for unauthorized code execution.
– Use virtual environments (venv or conda) to isolate projects.
– Implement CI/CD security checks (trivy, bandit) to detect malware.

Expected Output:

Package Version

legit-package 1.0.0 
malicious-pkg 0.1.2 <-- SUSPICIOUS 

Prediction

Supply chain attacks will increase in 2024, with more malware masquerading as legitimate developer tools. Blockchain projects will remain high-value targets due to their financial incentives.

Reference:

IT/Security Reporter URL:

Reported By: Mccartypaul Softwaresupplychain – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram