AI-Powered RedC2 4.0 Linux Implant Disguised as npm Utilities
Cybersecurity researchers have uncovered a new threat: trojanized npm packages masquerading as benign calendar and streak utilities. These packages stealthily deploy an advanced, AI-powered Linux implant known as **RedC2 4.0**, posing a significant risk to IT security professionals and privacy-conscious users.
A new wave of malicious npm packages has been identified, designed to deliver the sophisticated **RedC2 4.0** Linux implant. Disguised as functional calendar and streak utilities, these packages are engineered for stealthy deployment, leveraging an artificial intelligence (AI)-powered command and control (C2) framework.
"When the module loads, itβ―locatesβ―the bundled binary, marks it executable, and launches it as a detached background process," reported **TrendAI**, **Trend Micro**'s enterprise cybersecurity business. "No install hook function callβ―is needed; a single import anywhere in the dependency graph, even a transitive one, is enough to execute the payload."

### Identified Malicious Packages
The following npm packages have been flagged as malicious:
* [email protected], 1.0.1
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
* [email protected]
These packages, while delivering their promised functionality, conceal a Linux backdoor. This backdoor is dropped under various filenames such as `math-core.bin`, `math-calc.bin`, or `calc-math.dat`, often located in the `dist/` or `dist/internal/` directories. The core of this payload is the **RedShell** Linux beacon for **RedC2 4.0**, facilitating post-exploitation activities.
Security researcher **Aliakbar Zahravi** explained, "Delivery is handled by the package entry file,β―`dist/index.mjs`, which acts as a trojan loader. Itβ―re-exports the date helpers and launches the bundled implant as soon as the module loads, with no install hook and no exported functionβ―required."
### RedC2 4.0: An Evasive C2 Framework
**RedC2 4.0** is marketed on cybercrime forums by a threat actor named "**MarlboroMan**" as a cross-platform toolkit for Windows, macOS, and Linux. Advertised on **Hack Forums** in early June 2026, it boasts capabilities for surveillance, credential theft, payload loading, and mass operations, with a core principle of evasion.
Previous versions, **RedC2 3.0** and **2.0**, were released in January and August 2025, respectively, indicating continuous development. The **RedShell** Linux beacon is a new addition to version 4.0.
This feature-rich C2 framework offers:
* Terminal access
* File transfer
* Staged payload delivery
* Data collection
* Multi-beacon operation
* Network visualization
* Host-to-host tunneling
* In-memory execution of Beacon Object Files (BOFs), .NET assemblies, and shellcode
### Cross-Platform Capabilities
The Linux variant of the **RedShell** beacon provides an interactive shell via `/bin/sh`, enabling system discovery, file operations, data collection (e.g., SSH keys, browser credentials), execution, persistence, in-memory ELF execution, SOCKS5 proxying, and network pivoting.
Upon deployment, it registers the infected system with the C2 server by sending a "check-in message" containing basic system information. It then enters a command-processing loop, executing instructions from the operator and relaying results.
Windows and macOS counterparts offer similar functionalities, including file operations, host and network reconnaissance, user enumeration, and data harvesting. The Windows beacon further includes User Account Control (UAC) bypass, antivirus and endpoint detection evasion, antivirus tampering, in-memory execution, and lateral movement capabilities, which are absent in the macOS version.
### Red Offsec and AI Integration
On a clearnet website branded **Red Offsec**, the threat actor describes **RedC2** as a multi-language, multi-OS command and control framework built with evasion as a core principle. It is available for purchase at $99.99.
**Red Offsec**'s Terms of Service explicitly forbid using the tool for unauthorized access or hacking without explicit permission, framing it as a tool for "red team professionals and users who understand external offensive security tooling within legal and ethical boundaries."
**RedC2** extends its capabilities with **RedC2 EXT**, a command-line extension, and **Red Agent**, an LLM-driven component. **Red Agent** allows operators to orchestrate complex post-exploitation tasks, such as network reconnaissance and credential dumping, using natural language commands.
"**RedC2** ships with an AI assistant called **Red Agent**, an LLM-backed command execution layer that turns natural-language intent intoβ―frameworkβ―beacon commands," Zahravi noted. **Red Offsec** characterizes it as an "AI-powered command execution system specialized for penetration testing."
### Broader Implications and Supply Chain Concerns
These findings highlight the growing trend of AI-integrated C2 frameworks being distributed via malicious npm packages, which significantly lowers the barrier to entry for attackers. **TrendAI** states, "By interacting with a model tuned for red-team operations, an operator inputs natural-language prompts, and the framework translates them into actionable command sequences. This abstraction lets operators of varying skill levels execute complex, multi-stage intrusions efficiently."
This development follows a coordinated supply chain attack affecting three legitimate **Rust** crates (**[email protected]**, **[email protected]**, and **[email protected]**). These were compromised with a malicious `proc-macro1` dependency that executed cross-platform malware during **Cargo** builds.
That malware profiled infected devices, cataloged **Chromium**-based browsers, established persistence, and beaconed to attacker-controlled infrastructure for further tasking. Evidence suggests infrastructure overlaps with previous software supply chain attacks targeting **Mastra** and **Axios**, both linked to North Korean threat actors. It is suspected that the maintainer's publishing credentials were compromised to push the poisoned versions to the package repository.