Deeba Ahmed
2024-12-05 08:46:00
hackread.com
SUMMARY
- Malicious Package Found: ReversingLabs uncovered aiocpa, a Python package targeting crypto wallets via malicious updates.
- Unique Attack: Hackers built trust by publishing a legitimate-looking crypto tool before injecting harmful code.
- AI Detection: ReversingLabs’ Spectra Assure flagged the package using machine learning to detect hidden malicious behaviour.
- Action Taken: PyPI reported, quarantined, and removed the package to stop further harm.
- Key Takeaways: Regular security checks, machine learning tools, and cautious dependency management are vital to combat open-source threats.
The machine learning-based threat-hunting system of leading threat intelligence and cybersecurity firm ReversingLabs (RL) recently detected malicious code in a legitimate-looking package, “aiocpa.“ According to RL’s investigation, shared with Hackread.com, this package was designed to compromise cryptocurrency wallets.
Through differential analysis of two package versions, RL was able to determine how these attackers carried out their distinctive campaign. The package, a synchronous and asynchronous Crypto Pay API client, has been downloaded 12,100 times.
While probing, researchers identified what makes this campaign unique. Unlike most attacks targeting open-source repositories like npm and PyPI, in this campaign, the threat actors published their own crypto client tool to gradually build trust with a growing user base. Then, they struck. An apparently harmless update to the aiocpa package (version 0.1.13 and later) injected malicious code.
“The malicious actor was observed trying to take over an existing PyPI project named pay, probably to gain access to an established user base, or the attacker estimated that such a package name would attract more victims,” researchers observed.
How Machine Learning Spotted the Trouble
RL uses a machine learning-based threat hunting system called Spectra Assure. This system continuously scans open-source packages for suspicious behaviour. In the case of aiocpa, on November 21, 2024, Spectra Assure flagged the updated package due to its resemblance to previously encountered malware.
Further revealed obfuscated code within the aiocpa package with numerous versions published until September 2024. This code was hidden behind layers of encryption and was designed to steal sensitive information like crypto trading tokens. If stolen, this data could be used to drain victims’ cryptocurrency wallets.
Researchers noted in the blog post that application security testing (AST) tools wouldn’t have caught this attack. The malicious code wasn’t present in the referenced GitHub repository, which would typically be reviewed for legitimacy. This is why advanced tools like Spectra Assure are crucial. They analyse code behaviour, allowing for a deeper inspection than traditional methods.
RL reported this malicious package to the Python Package Index (PYPI) for removal, which was later published on their blog on November 25. Researchers at Phylum reported on RL’s discovery, highlighting the uniqueness of the malicious campaign
The incident highlights the evolving nature of open-source software threats making it essential to perform regular security assessments, and consider machine learning-based threat hunting tools for powerful protection. Regular evaluation of third-party code, tools, packages, and extensions is also crucial.
Furthermore, PyPI users should be aware of package name takeover, a serious supply chain infection vector. If a project pay dependency is taken over by a threat actor, a new malicious version could be published to PyPI. The PyPI security team advises users to pin dependencies and versions, using hashes to prevent unwanted updates.
RELATED TOPICS
- ChatGPT Sandbox Flaws Enabling Python Execution
- PyPI Exploited to Infiltrate Systems Through Python Packages
- PythonAnywhere Cloud Platform Abused to Host Ransomware
- Qubitstrike Malware Hits Jupyter Notebooks for Cryptojacking
- VMCONNECT: Malicious PyPI Package Mimicking Python Tools
- New version of Jupyter infostealer delivered through MSI installer
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Support Techcratic
If you find value in Techcratic’s insights and articles, consider supporting us with Bitcoin. Your support helps me, as a solo operator, continue delivering high-quality content while managing all the technical aspects, from server maintenance to blog writing, future updates, and improvements. Support Innovation! Thank you.
Bitcoin Address:
bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge
Please verify this address before sending funds.
Bitcoin QR Code
Simply scan the QR code below to support Techcratic.
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.