'Hades' Campaign Against PyPI Puts New Spin on Shai-Hulud
The software supply chain is facing a renewed and evolving threat with the emergence of the "Hades" campaign, which has targeted the Python Package Index (PyPI). This sophisticated attack utilizes a new variant of the persistent Shai-Hulud worm, demonstrating a significant advancement in how threat actors are compromising open-source ecosystems.
Recent research from Socket has detailed this fresh wave of attacks, revealing that the campaign successfully compromised 37 malicious PyPI wheels spread across 19 distinct packages. These packages often include legitimate-looking scientific research and deep-learning tools, making them difficult to distinguish from benign software.
A key innovation of the "Hades" variant is its method of execution. Unlike typical malicious packages that require an explicit import statement to trigger their payload, Hades abuses Python's `.pth` startup hooks. This allows the malicious code to run automatically at interpreter startup immediately after a `pip install` command, without any further user interaction or explicit import. This stealthy execution mechanism enables the malware to bypass many traditional security checks that focus on post-import analysis.
Once executed, the payload proceeds to download and utilize the Bun runtime to run an obfuscated JavaScript stealer. This stealer is designed to harvest a wide array of sensitive credentials and secrets from the compromised developer machines and CI/CD runners. Targeted information includes GitHub tokens, PyPI and npm publishing credentials, as well as secrets related to AWS, GCP, Azure, and Kubernetes environments, alongside SSH keys and AI tool configurations. The stolen data is then exfiltrated to public GitHub repositories controlled by the attackers, providing them with a wealth of access to further exploit the software supply chain. This campaign underscores the critical need for enhanced vigilance and more robust security measures within the open-source software supply chain.
Read original source