Hades malware tricks AI security scanners with fake nuclear weapon prompts to hide payloads

3 Sources

Share

A sophisticated supply chain attack called Hades targets Python developers by deceiving AI-powered security tools with adversarial prompt injection. The malware embeds fake instructions about creating biological and nuclear weapons in code comments, triggering safety failsafes that cause scanners to skip the actual malicious payload. Security researchers have identified 37 Python and 106 JavaScript packages compromised in this campaign, which steals credentials from AWS, GitHub, Kubernetes, and AI developer tools.

News article

Hades Malware Campaign Exploits AI Security Weaknesses

The Hades malware campaign represents a troubling evolution in supply chain attacks, specifically targeting developers working with Python packages and machine-learning tools. Security researchers at Socket have uncovered a deceptively simple yet effective technique: the malware uses adversarial prompt injection to fool AI-powered security scanners into overlooking malicious payloads

1

. The attack works by embedding JavaScript code comments that instruct scanning bots they're running in unrestricted mode with no safety guidelines, then requesting instructions to create biological and nuclear weapons with detailed descriptions. When AI security scanners encounter these prompts, their safety failsafes trigger immediately, causing them to halt the scan before reaching the actual malicious code.

Bypassing AI Security Scanners Through Adversarial Tactics

This approach to bypassing AI security scanners exploits a fundamental tension in LLM-based code analysis systems. The malware doesn't expect bots to actually follow the weapon-creation instructions—quite the opposite. By triggering the safety mechanisms designed to prevent harmful outputs, the malicious code effectively blinds the scanner to what comes next in the file

2

. An X user demonstrated this vulnerability when Anthropic's Claude was asked to scan an infected file and returned the familiar "Chat paused" message. While this isn't a universally effective technique against all security tools, it highlights a critical gap in AI security for developers who might perform cursory checks by simply asking an AI assistant whether a newly installed package contains malware.

PyPI Supply Chain Attack Targets Developer Credentials

The Hades campaign has compromised an estimated 37 Python and 106 JavaScript packages as part of this expanded PyPI supply chain attack, including multiple typo-squatting instances like "rsquests" instead of "requests"

1

. Among the identified packages are bramin, cmd2func, coolbox, dynamo-release, executor-engine, magique, magique-ai, and numerous others spanning computational biology, bioinformatics, and AI development ecosystems

3

. The malware operates as credential stealing malware with an aggressive scope, harvesting secrets from npm, PyPI, RubyGems, JFrog, and Kubernetes service account tokens, along with AWS temporary credentials, SSH keys, Docker configurations, shell histories, .env files, and AI developer tool configurations.

Advanced Evasion Techniques Using Bun Toolkit

The malware leverages the Bun toolkit as its execution environment, downloading and installing the Bun JavaScript runtime to run heavily obfuscated JavaScript payloads on compromised systems

3

. This choice allows the malware to operate in environments lacking Node.js installations, effectively bypassing traditional package manager controls and network proxy logs. The campaign employs sophisticated staging mechanisms, with some instances splitting the loading mechanism and malicious payloads across separate packages that are commonly installed together—a pattern most scanners don't anticipate. The malware also relies heavily on precompiled binaries, typical in performance-sensitive Python packages, and ensures many payloads only trigger when packages are actually initialized through Python's "import" statement rather than during installation.

Connection to Miasma Campaign and Lateral Movement Capabilities

Hades appears to be an evolution of the Miasma campaign, sharing core infrastructure and tactics while introducing new markers and techniques. Previous iterations exported stolen data to GitHub repositories with descriptions like "Miasma: The Spreading Blight," while the latest wave uses repository descriptions such as "Hades - The End for the Damned"

3

. The malware demonstrates lateral movement capabilities, able to replicate and spread across developer networks via SSH or SCP, and can push trojanized versions of PyPI packages from compromised systems by exploiting developers' OpenID credentials. It queries GitHub commits for specific keywords like "TheBeautifulSnadsOfTime" to extract Base64-encoded JavaScript payloads and polls for "firedalazer" to fetch Python-based droppers.

Detection Challenges for Malware Campaign Targeting AI Developers

The sophistication of this malware campaign targeting AI developers extends beyond prompt injection. Some packages use a *-setup.pth file processed by Python's "site" module during interpreter startup, allowing malicious code to execute automatically after installation without requiring victims to import the poisoned package

3

. This mirrors the npm install-hook problem exploited in previous campaigns. The malware also includes self-wiping mechanisms triggered when it detects sandbox environments, and it checks for Russian locale systems before executing. While traditional security measures like pattern matching, source code parsing, and sandboxed execution remain effective, the campaign's multi-layered approach means developers need heightened vigilance in verifying package names and authorship—a basic security practice that, according to systems administrators working with AI engineers, is surprisingly inconsistent even among highly-paid professionals in the field.

Today's Top Stories

© 2026 TheOutpost.AI All rights reserved