Trojan npm Utilities Conceal RedC2 4.0 Linux Backdoor with AI-Powered C2

Security researchers have uncovered at least 14 malicious npm packages masquerading as benign date or streak utilities, each of which silently installs the AI-powered RedC2 4.0 command-and-control (C2) framework on Linux systems. These trojanized packages contain a bundled binary that’s executed automatically upon module load—no setup hooks or explicit function calls required. Even a transitive import in a dependency tree is enough to trigger the implant. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

The affected packages include names like [email protected], [email protected], and [email protected], among others. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html)) Under the guise of date helper or math accelerator functionality, these modules embed hidden binaries with names such as math-core.bin, calc-math.bin, or calc-mapping.bin stored in dist/ or dist/internal/ directories. Once the package loads, the malware marks the binary executable and launches it detached in the background. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

The malicious binary isn’t just a simple dropper: it’s the Linux beacon component of RedC2 4.0—referred to as “RedShell”—which establishes communication with a remote server under attacker control. From there, it carries out post-exploitation tasks such as system discovery, credential theft, file transfers, interactive shell access, and eventually network pivoting. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

What Is RedC2 4.0?

RedC2 is a cross-platform C2 framework advertised on cybercrime forums, supporting Linux, macOS, and Windows. The new version 4.0, sold by a threat actor known as “MarlboroMan” in early June 2026, introduced the RedShell Linux beacon and an AI-assisted layer called Red Agent. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html)) Previous versions—v2.0 in August 2025 and v3.0 earlier in 2026—were less AI-oriented. Red Agent allows operators to use natural-language prompts to issue commands, which the malware translates into specific operations against compromised systems. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

The framework is fully featured: it supports credential harvesting, terminal access, staged payload delivery, file transfer, in-memory execution (ELFs, .NET assemblies, shellcode), multi-beacon operation, network visualization, and tunneling. On Windows, RedC2 adds capabilities like bypassing UAC, tampering with antivirus, and lateral movement—macOS lacks some of the more aggressive functions. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

Infection Vector and Attack Attribution

The infection method is unusually stealthy: simply importing the compromised npm module anywhere in the dependency tree causes execution of the backdoor. There’s no need for install-time hooks or explicitly called functions. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html)) Analysts believe the maintainers’ publishing credentials were compromised, allowing malicious actors to push poisoned versions to the npm registry. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

Further investigation suggests connections between this campaign and earlier supply chain attacks targeting Rust crates like [email protected], [email protected], and [email protected], which were similarly compromised. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html)) Signs also point to shared infrastructure with past attacks linked to North Korean threat actors. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

This campaign sharply illustrates how threat actors are combining AI assistance with stealthy supply chain compromise. Exploiting open source module ecosystems like npm, they embed functional code with hidden payloads to evade detection. RedC2 4.0’s AI-powered Red Agent lowers the barrier for attackers by translating natural language commands into sophisticated operations. ([thehackernews.com](https://thehackernews.com/2026/08/14-trojanized-npm-packages-drop-redc2.html))

Developers and organizations should immediately inspect dependencies, especially those they didn’t explicitly add, for suspicious behavior such as embedded binaries or immediate side-effects upon import. Locking dependency versions, auditing package ownership and source, and using automated supply chain security tools are critical defenses against this evolving threat. The rise of AI-assisted C2 frameworks being pushed via npm modules signals a new phase in supply chain attacks—one where deception and automation intertwine. What to watch now: whether RedC2-style features proliferate in other malware families, and how rapidly defenders adapt detection and response techniques to keep pace.