TrapDoor Malware Targets Crypto Developers in Supply-Chain Attack

Security firm Socket uncovers TrapDoor, a sophisticated supply-chain attack targeting crypto and AI developers across npm, PyPI, and Crates.io.

TrapDoor Malware Targets Crypto Developers in Supply-Chain Attack

Key Takeaways on the TrapDoor Campaign

  • The Target: Crypto and AI developers with production access and local wallet keys.
  • The Method: Supply-chain compromise across npm, PyPI, and Crates.io registries.
  • The Threat: Exfiltration of private keys, SSH credentials, AWS tokens, and GitHub access.

Cybercriminals are shifting their focus from retail crypto users to the individuals who build the technology. Cybersecurity researchers at Socket recently identified a highly targeted supply-chain campaign dubbed TrapDoor. This malware specifically aims at developer workstations, where high-value credentials often sit unprotected.

Campaign Impact in Numbers:

  • Over 34 malicious packages identified.
  • Spread across 3 major open-source package registries.
  • Hundreds of malicious versions and artifacts deployed.

How the TrapDoor Supply-Chain Attack Unfolds

Instead of relying on traditional social engineering, the attackers injected malicious payloads directly into open-source ecosystems: npm (JavaScript), PyPI (Python), and Crates.io (Rust). The packages masqueraded as helpful development utilities for Solidity, AI prompt compression, or Sui/Move build helpers.

The package names were intentionally mundane to avoid raising suspicion among busy developers:

  • wallet-security-checker
  • defi-risk-scanner
  • solidity-build-guard
  • llm-context-compressor

“Attackers have realized that compromising a single developer’s workstation yields far greater rewards than phishing thousands of retail users. By embedding malware into trusted open-source registries, they gain direct access to the keys to the kingdom—private wallets, cloud infrastructure, and production code bases,” security experts noted.

The AI Twist: Exploiting Coding Assistants

A particularly novel aspect of the TrapDoor malware campaign is its attempt to manipulate AI-powered coding tools. The malware planted hidden instructions inside configuration files like .cursorrules and claude.md using zero-width Unicode characters.

When a developer initiated an AI assistant session, these invisible instructions prompted the AI to run fake “security scans.” In reality, these scans collected sensitive system data and exfiltrated it to the attacker’s command-and-control servers.

Impact and Mitigation

Once installed via postinstall hooks or malicious build scripts, the payloads searched the developer’s machine for SSH keys, GitHub tokens, and cloud logins. The stolen SSH keys allowed attackers to attempt lateral movement, moving from a single compromised laptop into a company’s broader cloud infrastructure.

While Socket has reported these packages and had them removed from the respective registries, the incident serves as a stark reminder of the risks inherent in modern open-source development. Developers are urged to audit their local environments and employ strict secrets management practices.

Frequently Asked Questions (FAQ)

What is the TrapDoor malware?

TrapDoor is a malicious software campaign distributed via open-source package registries, designed to steal sensitive credentials and crypto keys from developers.

Which programming languages and registries were targeted?

The campaign targeted JavaScript (npm), Python (PyPI), and Rust (Crates.io) ecosystems.

How can developers protect themselves?

Developers should use dependency pinning, implement zero-trust access controls, and avoid storing production secrets, SSH keys, or mnemonic phrases in plaintext on local machines.

Leave a Reply

Your email address will not be published. Required fields are marked *