
Trojanized npm Packages Drop AI-Assisted RedC2 Linux Backdoor on Developers
Cybersecurity researchers at TrendAI, Trend Micro's enterprise cybersecurity business, have identified 14 malicious npm packages disguised as functional calendar and streak utilities. In a report published Thursday, the researchers revealed that these packages are engineered to stealthily install an artificial intelligence-assisted Linux backdoor known as RedC2 4.0. The compromised packages deliver the promised date functions, helping them avoid immediate suspicion. However, the package entry file, `dist/index.mjs`, acts as a trojan loader. Security researcher Aliakbar Zahravi explained that a single import anywhere in a project's dependency graph—even a transitive one—triggers the loader to locate a bundled binary disguised as a native math accelerator, mark it as executable, and launch it as a detached background process without requiring an install hook. This hidden payload is stored under various names across the packages, including `math-core.bin`, `math-calc.bin`, `calc-math.dat`, `calc-cache.bin`, `calc.bin`, and `calc-mapping.bin`. Located directly within the `dist/` or `dist/internal/` directories, the file contains the RedShell Linux implant. It establishes communication with a remote Windows or Linux command-and-control server by transmitting basic system information in a check-in message, before entering a loop to process incoming instructions via `/bin/sh` and return the results. RedC2 4.0 is actively marketed on cybercrime platforms, with a threat actor named "MarlboroMan" advertising it on Hack Forums in early June 2026 as a command-and-control framework built specifically for evasion. The toolkit has seen active development over the past year, moving from version 2.0 in August 2025 to version 3.0 in January 2026. The Linux implant was formally introduced in version 4.0, completing its suite as a cross-platform toolkit for Windows, macOS, and Linux. The framework supports advanced operations such as terminal access, file transfers, staged payload delivery, managing multiple active implants, network visualization, host-to-host tunneling, and the in-memory execution of compiled object files, .NET assemblies, and shellcode. The Linux variant grants attackers an interactive shell with commands for system discovery, persistence, in-memory ELF execution, SOCKS5 proxying, network pivoting, and the theft of SSH keys and browser credentials. While the macOS and Windows versions cover similar ground with user enumeration and data harvesting, the Windows implant includes further capabilities. These additions encompass User Account Control bypass, antivirus and endpoint detection, antivirus tampering, in-memory execution, and lateral movement across networks. RedC2 4.0 extends its control layer with a command-line extension called RedC2 EXT and "Red Agent," a large language model-driven assistant. Red Agent translates natural-language prompts into actionable command sequences for network reconnaissance and credential dumping, allowing operators of varying skill levels to execute complex intrusions. Despite its malicious distribution, RedC2 is sold on a clearnet website called Red Offsec for $99.99, where it is characterized as an ethical, AI-powered command execution system specialized for red team professionals. In a separate supply chain attack, three legitimate Rust crates—`arrayref@0.3.10`, `internment@0.8.7`, and `append-only-vec@0.1.9`—were compromised with a malicious `proc-macro1` dependency. This dependency executed cross-platform malware automatically during Cargo builds to profile infected devices, catalog Chromium-based browsers, establish persistence, and connect to attacker-controlled infrastructure. Researchers suspect the maintainer's publishing credentials were stolen, noting that the attack's infrastructure overlaps with prior campaigns against Mastra and Axios, which are linked to North Korean threat actors. Somali software developers and IT students relying on open-source npm and Rust repositories for web projects must manually audit their project dependencies, as importing these specific calendar utilities or compromised crates will directly expose their Linux development environments to remote takeover.
Read our sourcing and corrections policy
This article was prepared by our automated editorial system, which summarized and translated the source above. No human editor reviewed this article individually before publication.



Be the first to comment on this story!