Affected Systems
PyPI repository: 19 compromised packages containing 37 malicious wheel artifacts. Affects Python developers who installed these packages. Attack uses .pth files for automatic execution during pip install, targeting credential theft via Bun-based stealer.
Exploitation Status
Active supply chain attack. Malicious packages were published to PyPI and available for download. Attack achieves automatic code execution upon installation without requiring user interaction beyond pip install command.
Business Impact
Organizations with Python development pipelines face credential theft risk if developers installed affected packages. The .pth auto-execution technique bypasses typical setup.py review processes. Stolen credentials may include source code repository access, cloud service keys, and internal system credentials. No CVE assigned as this is a supply chain compromise rather than software vulnerability.
Urgency
🔴 Immediate
Recommended Actions
- Audit Python environments for the 19 compromised PyPI packages and remove immediately if present
- Review pip install logs and package manager history for evidence of malicious package installation
- Rotate credentials and API keys on systems where affected packages were installed, prioritizing source control and cloud service access
- Implement PyPI package verification using tools like pip-audit or safety to scan dependencies
- Configure network monitoring to detect outbound connections from Python processes to unexpected domains associated with credential exfiltration
---
# Threat Actor Context
Actor Profile
Miasma is a threat actor conducting supply chain attacks targeting software development environments. The actor demonstrates capability in Python package ecosystem manipulation, specifically compromising PyPI repositories to distribute credential-stealing malware. Their motivation appears focused on credential harvesting from developer environments, likely for initial access operations or data exfiltration. The use of the Hades campaign name and sophisticated packaging techniques indicates a methodical approach to software supply chain compromise.
TTPs (Tactics, Techniques, Procedures)
The actor employs supply chain compromise (T1195.001 - Compromise Software Supply Chain) as the primary attack vector, distributing 37 malicious wheel artifacts across 19 compromised PyPI packages. They leverage Python .pth file mechanisms to achieve persistence and automatic execution (T1546 - Event Triggered Execution) during package installation, bypassing traditional setup.py scrutiny. The attack deploys the Bun credential stealer for credential access (T1555 - Credentials from Password Stores, T1539 - Steal Web Session Cookie), targeting developer credentials and authentication tokens stored in development environments. This technique exploits the trust developers place in package repositories and automated dependency installation workflows.
Targets & Patterns
Miasma specifically targets software development organizations and individual developers who utilize Python package management systems. The focus on PyPI indicates targeting of Python developers, data scientists, DevOps engineers, and organizations with Python-based development pipelines. The credential-stealing payload suggests the actor seeks access to source code repositories, cloud infrastructure credentials, API keys, and session tokens commonly stored in developer environments. This targeting pattern is consistent with actors seeking initial access to high-value networks through trusted developer accounts or pursuing intellectual property theft from software companies.
Historical Context
The Hades campaign represents a documented supply chain operation attributed to Miasma. The use of .pth file-based auto-execution in Python packages reflects an evolution in PyPI supply chain attack techniques, moving beyond traditional setup.py-based malicious code execution. This approach is consistent with broader trends in software supply chain attacks observed since 2021, where adversaries increasingly target package repositories as force multipliers for credential harvesting and initial access. The specific use of wheel artifacts with embedded .pth files indicates technical sophistication and awareness of Python packaging internals.
Defensive Recommendations
- Implement package integrity verification for all PyPI dependencies using hash pinning and tools like pip-audit or safety to detect known malicious packages
- Monitor for suspicious .pth file creation during package installation and audit installed packages for unexpected auto-execution mechanisms (T1546)
- Deploy network monitoring to detect credential exfiltration attempts from development environments, particularly outbound connections from Python interpreter processes
- Enforce least-privilege access for developer credentials and implement credential rotation policies to limit exposure from compromised tokens
- Utilize private PyPI mirrors or artifact repositories with security scanning to vet packages before they reach production development environments
