**Malicious npm Packages Found to Deliver AI-Powered Linux Backdoor Through Fake Calendar and Streak Utilities**
A recent investigation by cybersecurity researchers has uncovered a sophisticated supply chain attack involving multiple trojanized npm packages. These packages were disguised as legitimate calendar and streak utility tools but were actually designed to silently install an artificial intelligence (AI)-powered Linux backdoor known as **RedC2 4.0**. The discovery highlights a growing trend where malicious actors leverage popular developer registries to distribute advanced multi-platform remote access tools.
### How the Attack Works
The attack vector is deceptively simple. Once a user installs any of the compromised packages, the package’s entry file—`dist/index.mjs`—executes automatically during the dependency resolution process, without requiring any specific installation hooks or user interaction. As TrendAI, the cybersecurity division of Trend Micro, explained, “a single import anywhere in the dependency graph, even a transitive one, is enough to execute the payload.”
Upon execution, the loader searches for a bundled binary file (with names such as `math-core.bin`, `calc.bin`, or `calc-mapping.bin`) and marks it as executable. This binary is the **RedShell Linux beacon**, a component of the RedC2 4.0 framework. It is then launched as a background process, effectively handing control of the system to the attacker.
### About the RedC2 4.0 Framework
RedC2 4.0 is a command-and-control (C2) framework advertised on cybercrime forums as a cross-platform toolkit capable of operating on Windows, macOS, and Linux. According to researchers, version 4.0 is the first to include the Linux-specific **RedShell beacon**. The framework is heavily marketed as an “evasion”-built tool for red team professionals, though its Terms of Service explicitly prohibit unauthorized system access.
RedC2 4.0 is notable for its rich feature set, which includes:
* **Persistent remote access** and command execution.
* **File transfer** and system surveillance.
* **Credential theft**, including browser-stored passwords and SSH keys.
* **In-memory execution** to avoid detection by antivirus software.
* **Network visualization** and host-to-host tunneling.
* An AI-driven extension called **Red Agent**, which allows operators to issue natural language commands (such as “dump credentials” or “scan network”) to automate complex intrusion processes.
### Compromised Packages
The following npm packages were identified as part of this campaign. While they offer functional date-related utilities, their true purpose is to facilitate the installation of the backdoor:
* streak-metrics-math@1.0.0, 1.0.1
* kit-map-vim@1.0.0
* streak-map-cache@1.0.0
* streak-map-kit@1.0.0
* map-streak-kit@1.0.0
* streak-cache-map@1.0.0
* streak-calc-metrics@1.0.0
* streak-calc-math@1.0.0
* streak-math-abz@1.0.0
* streak-metricsaz@1.0.0
* streak-math-metrics@1.0.0
* streak-metricazbd@1.0.0
* streak-metricsazb@1.0.0
* streak-kit-map@1.0.0
### Impact and Significance
Once the RedShell beacon is active, it communicates with a C2 server, sends a “check-in” message containing system information, and enters a loop waiting for operator commands. On Linux systems, it provides an interactive shell, allowing for system discovery, file manipulation, and lateral movement. The Windows variant of the beacon includes additional advanced features, such as User Account Control (UAC) bypass and antivirus tampering mechanisms.
This operation is significant because it demonstrates how AI capabilities are being integrated into malware frameworks. By leveraging an LLM (Large Language Model), the RedC2 framework lowers the barrier to entry for cybercrime, allowing operators with varying skill levels to conduct sophisticated intrusions using natural language prompts.
The discovery also marks a continuation of supply chain attacks using Rust crates and npm packages, suggesting that threat actors are increasingly targeting development toolchains to maximize their impact.
### FAQ
**What are npm packages, and why are they targeted?**
npm (Node Package Manager) is a default repository for JavaScript developers to share and borrow code. Because developers frequently use many packages to build applications, malicious actors see it as an efficient way to distribute malware to a large number of victims with minimal effort.
**How can I protect myself from these malicious packages?**
Users are advised to only install packages from trusted sources and to audit their `package.json` and `node_modules` directories regularly. Implementing strict dependency validation and using tools like Software Composition Analysis (SCA) can help identify vulnerable or malicious dependencies.
**What should I do if I have already installed one of these packages?**
If you suspect you have installed a trojanized package, you should immediately uninstall it using `npm uninstall [package-name]`. Furthermore, you should perform a full system scan, rotate all credentials ( passwords, SSH keys), and inspect network logs for connections to suspicious IP addresses.
**What is RedC2 4.0?**
RedC2 4.0 is a commercialized command-and-control framework sold on cybercrime forums. It is designed for stealthy remote access and control over Windows, macOS, and Linux systems. The recent variant includes a Linux-specific payload and an AI assistant feature that translates natural language commands into malicious actions.
### Conclusion
The discovery of trojanized npm packages delivering the RedC2 4.0 framework serves as a stark reminder of the evolving landscape of cyber threats. Attackers are no longer relying solely on crude phishing emails; they are embedding sophisticated, AI-powered malware directly into the development tools professionals rely on daily. This blurring of legitimate software and malicious tooling underscores the critical need for heightened vigilance, robust software supply chain security, and continuous monitoring of dependencies to mitigate the risk of compromise.



