Cybersecurity researchers have identified 14 trojanized npm packages that appear to provide legitimate calendar and streak utility functions but are designed to secretly deliver an artificial intelligence powered Linux implant known as RedC2 4.0. The malicious packages were discovered by TrendAI, Trend Micro enterprise cybersecurity business, which found that the modules can execute the bundled malware without requiring traditional installation hooks. Researchers said that once a module is loaded, it locates the included binary, changes its permissions to make it executable, and launches it as a detached background process. A single import anywhere within the dependency graph, including indirect or transitive dependencies, can trigger execution of the payload.
The identified npm packages include streak-metrics-math versions 1.0.0 and 1.0.1, kit-map-vim version 1.0.0, streak-map-cache version 1.0.0, streak-map-kit version 1.0.0, map-streak-kit version 1.0.0, streak-cache-map version 1.0.0, streak-calc-metrics version 1.0.0, streak-calc-math version 1.0.0, streak-math-abz version 1.0.0, streak-metricsaz version 1.0.0, streak-math-metrics version 1.0.0, streak-metricazbd version 1.0.0, streak-metricsazb version 1.0.0, and streak-kit-map version 1.0.0. Researchers noted that the packages are functional and provide the advertised utility features, making them less suspicious during initial review. However, hidden within the date utility functionality is code that delivers a Linux backdoor by disguising the malicious file as a native mathematics accelerator. Depending on the package, the embedded file appears under names such as math-core.bin, math-calc.bin, calc-math.dat, calc-cache.bin, calc.bin, or calc-mapping.bin. These files are stored either directly inside the dist directory or under dist/internal and contain the RedShell Linux beacon for RedC2 4.0.
According to security researchers, the package entry file dist/index.mjs acts as a trojan loader that exports the expected date helper functions while launching the embedded implant as soon as the module is imported. Aliakbar Zahravi, a security researcher, said the process does not require an installation hook or an exported function call, allowing the malware to activate through normal package loading behavior. RedC2 4.0 is promoted on cybercrime forums as a cross platform toolkit targeting Windows, macOS, and Linux environments. A threat actor known as MarlboroMan advertised the framework on Hack Forums in June 2026, describing it as a command and control framework designed with evasion capabilities. Earlier versions of RedC2 were released in January 2026 and August 2025, showing continued development of the framework, while version 4.0 introduced the RedShell Linux beacon. The toolkit includes features such as terminal access, file transfers, staged payload delivery, data collection, multiple beacon management, network visualization, host to host tunneling, and in memory execution of Beacon Object Files, .NET assemblies, and shellcode.
The Linux version of the beacon provides attackers with interactive shell access through “/bin/sh” and supports system discovery, file operations, collection of SSH keys and browser credentials, persistence mechanisms, in memory ELF execution, SOCKS5 proxying, and network pivoting. After deployment, it communicates with a command and control server by collecting basic system details and sending a check in message before receiving and processing further instructions. The Windows and macOS versions provide similar capabilities, including file operations, network reconnaissance, user enumeration, and data collection. The Windows variant additionally includes features related to User Account Control bypass, security software detection, antivirus tampering, in memory execution, and lateral movement. RedC2 also includes a command line extension called RedC2 EXT and an artificial intelligence powered component named Red Agent, which uses a large language model based system to convert natural language instructions into framework commands. TrendAI said this capability can allow operators with varying levels of technical knowledge to perform complex post exploitation tasks more efficiently.
Researchers said the discovery highlights the increasing use of AI integrated command and control frameworks distributed through software supply chain channels. The development follows another recent supply chain incident involving three legitimate Rust crates, arrayref version 0.3.10, internment version 0.8.7, and append-only-vec version 0.1.9, which were compromised with a malicious proc-macro1 dependency that executed malware during Cargo builds. That campaign involved malware designed to profile infected devices, identify Chromium based browsers, establish persistence, and communicate with attacker controlled infrastructure. Investigators suspected compromised publishing credentials were used to upload the affected versions to the package repository. The activity also showed infrastructure links with previous software supply chain incidents involving Mastra and Axios npm packages, which were associated with North Korean threat actors.
Follow the SPIN IDG WhatsApp Channel for updates across the Smart Pakistan Insights Network covering all of Pakistan’s technology ecosystem.