ProBackend
cyber threat intelligence
3 hours ago9 min read

'Hades' Campaign Against PyPI Puts New Spin on Shai-Hulud

The latest Mini-Shai-hulud payload introduces Hades-themed GitHub exfiltration markers and AI analyst misdirection. TeamPCP compromised 19 PyPI packages (37 malicious wheels) via wheel startup hooks, deploying cross-platform memory scrapers and a token-revocation wiper. Read more about understanding supply chain risk in our Cyber Threat Intelligence category. [Learn more about Supply Chain Security](/article/supply-chain-security). [Python Security Essentials](/article/python-security).

Gray Sentinel

The Python Package Index (PyPI) has once again become the battlefield for a sophisticated cyber campaign, this time bearing the ominous moniker "Hades." The attack represents a significant evolution of the Mini Shai-Hulud malware framework, first observed in September 2025. By leveraging wheel startup hooks and embedding novel evasion techniques, the threat group behind the operation—identified as TeamPCP—has compromised 19 packages containing a total of 37 malicious wheels. This campaign does not merely represent a routine supply chain intrusion; it signals a deliberate escalation in method, incorporating AI analyst misdirection, token-revocation wipers as active deterrents, and a thematic branding that suggests both technical sophistication and psychological warfare.

TeamPCP's approach marks a distinct departure from earlier phases of the Shai-Hulud campaign. Where previous iterations focused on basic credential theft or data exfiltration, the Hades variant introduces multiple layers of obfuscation and deception designed to confuse security analysts, delay detection, and actively sabotage incident response efforts. The group has demonstrated an uncanny ability to weaponize trust in the Python ecosystem, embedding malicious payloads within widely-distributed bioinformatics and data science libraries. This strategic selection of targets ensures maximum dissemination with minimal suspicion, as researchers and developers alike rely heavily on these packages for their daily workflows.

The scale of the compromise is notable but not unprecedented in the world of PyPI supply chain attacks. What sets Hades apart is its architectural innovation and its psychological framing. The malware includes GitHub exfiltration markers referencing "Hades - The End for the Damned," suggesting a thematic continuity with prior campaigns while asserting dominion over compromised systems. This naming convention is more than just branding—it serves as a psychological bookmark, helping threat actors track successful deployments and potentially intimidating security teams who encounter the theme in forensic investigations.

Understanding TeamPCP and Their Evolution

TeamPCP, first identified in earlier cyber-espionage operations targeting European academic institutions and defense contractors, has undergone a significant transformation since its initial appearance. The group's name, an acronym rumored to reference "PyPI Campaign Personnel" or perhaps "Python Compiled Payloads," reflects their specialization in software supply chain attacks. Their transition from broadly-scoped espionage to a singular focus on PyPI represents a strategic recalibration, allowing them to maximize impact while minimizing operational overhead.

The Mini Shai-Hulud framework itself represents a watershed moment in Python malware evolution. Unlike traditional pip-installable trojans that often relied on simple code injection or import-time hooking, Mini Shai-Hulud introduced a modular architecture that permits dynamic payload loading based on environmental conditions. The framework's naming convention draws from Frank Herbert's Dune universe, where Shai-Hulud refers to the colossal sandworms that shape the desert planet. In this metaphorical context, Mini Shai-Hulud represents smaller-scale but equally devastating ecological disruption to the Python ecosystem.

Hades marks the third major iteration of this framework, following earlier waves such as Miasma and Styx. Each evolution has introduced new capabilities while maintaining the core architectural principles that made Mini Shai-Hulud so effective. The thematic naming—drawing from underworld mythology—appears intentional, serving both to psychologically frame the attack as an unavoidable, destructive force and to create a recognizable brand that helps the attackers track successful deployments across their command-and-control infrastructure.

The attribution to TeamPCP comes from multiple independent analyses, including research由 Philipp Burckhardt, head of threat intelligence at Socket.io, who shared findings with Dark Reading. Burckhardt noted specific codename patterns and infrastructure overlaps that align with earlier TeamPCP operations, establishing a high-confidence attribution despite the group's frequent use of compromised infrastructure to mask their origins.

Technical Execution: How the Attack Unfolds

The Hades campaign executes through a precisely choreographed sequence of events, beginning with the initial pip install and culminating in full system compromise. The entry point is deceptively simple: developers installing what appear to be legitimate bioinformatics libraries such as "numpy-analysis" or "scipy-utils." These packages, once installed, add startup hooks to the wheel metadata that trigger payload execution immediately upon import or at scheduled intervals thereafter.

Once activated, the malware deploys a cross-platform memory scraper designed to extract credentials from running processes. Unlike simpler credential harvesters that scan specific files or registry keys, the Hades memory scraper operates at the process level, reading raw memory to capture authentication tokens, session cookies, and cryptographic keys before they are encrypted or obfuscated in application memory. This approach is particularly effective against modern applications that store credentials in environment variables or in-memory caches rather than on disk.

The scraper is not limited to credential collection. It also captures terminal history, clipboard contents, and recently accessed files—creating a comprehensive picture of the compromised system's activities. All collected data is then staged for exfiltration through a dual-channel mechanism: one channel sends data to traditional command-and-control servers, while a secondary channel embeds exfiltration requests within legitimate GitHub API calls, making detection significantly more difficult.

The GitHub exfiltration markers referenced earlier are particularly insidious. Each payload includes a unique identifier that gets encoded into the repository description field of compromised GitHub accounts associated with the victim organization. The specific marker "Hades - The End for the Damned" serves multiple purposes: it allows attackers to track which victims have been successfully compromised, it creates psychological pressure by framing the attack as inescapable destiny, and it provides a recognizable signature for forensic investigators looking to trace the campaign's spread.

Advanced Evasion and Obfuscation Techniques

What truly distinguishes the Hades campaign from earlier PyPI attacks is its multi-layered approach to evasion and obfuscation. The malware includes an AI analyst misdirection layer that generates fake analysis results and misleading comments within the payload code. When security researchers or automated tools analyze the package, they encounter what appears to be legitimate documentation and analysis notes that lead them down investigation rabbit holes while the actual malicious payload executes undetected in the background.

This misdirection layer is particularly sophisticated, incorporating actual code documentation for benign functions while embedding malicious payloads in seemingly unrelated sections. The fake analysis results include realistic-looking visualizations, statistical summaries, and even erroneous conclusions that appear plausible to human analysts. When paired with the legitimate-looking source code, this creates a compelling facade that can withstand thorough manual review.

Additionally, the payload includes obfuscation techniques designed to evade automated scanners. These include string encryption that decodes only at runtime, control flow flattening that makes static analysis challenging, and polymorphic code generation that changes the payload's signature on each deployment. The malware also checks for common sandbox environments and avoids execution when detected, effectively going dormant until it reaches a production environment where it can operate undetected.

The token-revocation wiper represents perhaps the most aggressive component of the campaign. After exfiltrating authentication tokens from the compromised system, the malware does not simply steal them—it actively revokes them through legitimate APIs. This seemingly counterintuitive move serves as a deterrent against incident response teams: by revoking tokens, the malware ensures that standard recovery procedures—re-authenticating with existing credentials—fail, forcing victims to go through more time-consuming and visible credential reset processes. The wiper also deletes local token caches and configuration files, removing the possibility of quick recovery from backup systems.

The Impact on the Python Ecosystem

The compromise of 19 packages containing 37 malicious wheels represents a significant breach of trust within the Python community. These packages were selected not for their size but for their centrality to common workflows: bioinformatics research, data processing pipelines, and scientific computing frameworks. Developers using these packages often run them in privileged environments with access to sensitive research data, cloud infrastructure credentials, and production databases.

The immediate impact on individual users is severe. Once compromised, systems may experience unauthorized data access, credential theft, and potential lateral movement within organizational networks. The token revocation adds an additional layer of disruption by breaking existing authentication flows, forcing organizations to engage in emergency credential recovery procedures that can themselves introduce security risks if done hastily.

The broader impact on the Python ecosystem is more subtle but equally concerning. The campaign undermines confidence in PyPI as a secure distribution channel, potentially driving developers to less-maintained package repositories or creating resistance to adopting new Python packages altogether. The psychological impact of the "Hades" branding—framing the attack as inevitable and devastating—may also cause organizations to overreact, implementing security controls that hinder developer productivity without actually improving security.

The research community has been particularly affected, as compromised bioinformatics packages have the potential to corrupt entire data analysis pipelines. In one documented incident, a research lab discovered that their variant calling workflow had been compromised for three weeks before detection, potentially corrupting hundreds of genomic analyses and requiring complete reanalysis of their datasets.

Detection and Mitigation Strategies

Defending against the Hades campaign requires a multi-layered approach that addresses both technical and procedural vulnerabilities. The first line of defense should be strict dependency scanning using tools like Dependabot, Snyk, or Socket.io's own supply chain security platform. These tools should be configured to flag packages that exhibit behaviors consistent with the Hades campaign, including startup hooks, memory access patterns, and unusual GitHub API usage.

Organizations should implement runtime application self-protection (RASP) mechanisms that monitor for abnormal process behavior, particularly memory scraping and token manipulation. Traditional endpoint detection and response (EDR) solutions may not catch the sophisticated obfuscation techniques used by Hades, so additional runtime monitoring is essential.

For cloud environments, implement strict IAM policies that limit token lifetimes and require re-authentication for sensitive operations. This mitigates the impact of token exfiltration by ensuring that even if tokens are stolen, their useful lifespan is minimized. Additionally, implement network segmentation to prevent lateral movement from compromised development machines to production infrastructure.

The Python Software Foundation and PyPI maintainers have responded by implementing stricter review processes for packages that request broad permissions or exhibit suspicious installation patterns. Developers are advised to review package permissions carefully and avoid installing packages from untrusted sources, even when they appear legitimate. The use of virtual environments should be standard practice, creating isolation between project dependencies and reducing the blast radius of compromised packages.

Looking Forward: The Next Phase of Supply Chain Warfare

The Hades campaign represents a turning point in Python supply chain security. The integration of AI analyst misdirection suggests that future campaigns will increasingly leverage artificial intelligence not just as a tool for defense but as a weapon for deception. The token-revocation wiper demonstrates an willingness to disrupt recovery efforts, indicating that attackers are moving beyond simple data theft to active sabotage.

Looking ahead, we can expect to see further innovation in supply chain malware, including:

  1. Multi-stage misdirection: Where fake analysis results are designed to lead defenders toward different false conclusions, creating a forest of misleading leads.

  2. Timing-based obfuscation: Where payloads activate only under specific conditions—such as during business hours or when high-privilege users are logged in—to maximize damage while minimizing detection probability.

  3. Adaptive evasion: Malware that learns from security analysis tools, modifying its behavior when specific detection signatures are detected.

  4. Cross-platform persistence: Similar to Hades' cross-platform memory scraper, future campaigns may target multiple operating systems and package managers simultaneously, creating truly distributed supply chain attacks.

The Hades campaign should serve as a wake-up call to the entire Python community. It is no longer sufficient to rely on trust-based models of package distribution; developers, security teams, and package maintainers must work together to implement comprehensive supply chain security practices. The attack demonstrates that no package, regardless of its popularity or apparent legitimacy, is immune to compromise.

As TeamPCP continues to evolve the Mini Shai-Hulud framework, the security community must respond with equal diligence and innovation. The fight for control of PyPI is not just about protecting code—it's about preserving the integrity of one of the world's most important open-source ecosystems and ensuring that the tools developers rely on every day remain trustworthy.

Understanding TeamPCP and Their Evolution

More blogs