14 Trojanized npm Packages Drop RedC2 4.0 Linux Backdoor With AI-Assisted C2
Fourteen trojanized npm packages disguised as calendar and streak utilities were found to silently deliver RedC2 4.0, an AI-powered Linux backdoor, requiring only a single import to execute the payload RedC2 4.0 features an LLM-driven component called Red Agent that translates natural-language prompts into beacon commands, lowering the barrier for complex post-exploitation operations The malicious packages bundle a Linux beacon (RedShell) disguised as native math accelerator binaries, launching
Analysis
TL;DR
- Fourteen trojanized npm packages disguised as calendar and streak utilities were found to silently deliver RedC2 4.0, an AI-powered Linux backdoor, requiring only a single import to execute the payload
- RedC2 4.0 features an LLM-driven component called Red Agent that translates natural-language prompts into beacon commands, lowering the barrier for complex post-exploitation operations
- The malicious packages bundle a Linux beacon (RedShell) disguised as native math accelerator binaries, launching it as a detached background process without needing install hooks or exported functions
- RedC2 4.0 supports surveillance, credential theft, in-memory execution, lateral movement, SOCKS5 proxying, and network pivoting across Windows, macOS, and Linux
- This attack follows a coordinated supply chain compromise of Rust crates, signaling a broader trend of AI-integrated C2 frameworks being distributed through package ecosystems
Why It Matters
This incident highlights the growing convergence of AI capabilities with supply chain attacks, where threat actors are embedding LLM-driven command execution into commercial-grade C2 frameworks distributed through legitimate package registries. For AI practitioners and security professionals, it demonstrates how AI-assisted tooling is being weaponized to lower the skill threshold for sophisticated intrusions, making complex multi-stage attacks accessible to operators of varying expertise levels.
Technical Details
- Trojanized Packages: 14 npm packages (e.g., streak-metrics-math, kit-map-vim) masquerade as functional date/streak utilities while bundling malicious binaries named math-core.bin, calc.bin, etc., located in dist/ or dist/internal/
- Execution Mechanism: The dist/index.mjs entry file acts as a trojan loader that re-exports legitimate date helpers and immediately launches the bundled implant as a detached background process—no install hook or exported function required; a single transitive import triggers execution
- RedShell Linux Beacon: Provides interactive /bin/sh access, system discovery, file operations, SSH key and browser credential harvesting, in-memory ELF execution, SOCKS5 proxying, and network pivoting; registers with C2 via check-in messages and enters a command-processing loop
- Red Agent (LLM Component): An LLM-backed command execution layer that converts natural-language prompts into framework beacon commands, enabling operators to orchestrate network reconnaissance and credential dumping through conversational interfaces
- Cross-Platform Capabilities: Windows variant includes UAC bypass, AV/EDR tampering, and lateral movement; macOS lacks these but shares core surveillance and data collection features; all three platforms support multi-beacon operation and host-to-host tunneling
Industry Insight
- Package registry supply chains remain a critical attack vector; developers and organizations should implement strict dependency auditing, SBOM generation, and runtime behavior monitoring to detect anomalous binary execution from seemingly benign packages
- The integration of LLMs into C2 frameworks represents a paradigm shift in offensive tooling—security teams should anticipate similar AI-augmented attack tools and update detection strategies to identify natural-language-to-command translation patterns in network traffic
- The $99.99 price point and documented evasion-first design philosophy suggest commercialization of AI-powered red team tools is accelerating; organizations should factor AI-enhanced threat actor capabilities into their red team exercises and threat modeling scenarios
Disclaimer: The above content is generated by AI and is for reference only.