Malicious npm Packages Deliver Cross-Platform RAT Targeting Alibaba Developers
A sophisticated supply chain attack has been uncovered where malicious npm packages impersonating Alibaba repositories are used to deploy a cross-platform remote access trojan (RAT) specifically targeting developers using Alibaba tools.

A new supply chain attack has emerged targeting developers through the npm package ecosystem, leveraging malicious packages designed to mimic private Alibaba repositories. This campaign, identified by researchers at Socket.dev, deploys a cross-platform remote access trojan (RAT) capable of executing commands, exfiltrating data, and establishing persistence across Windows, macOS, and Linux systems. The primary victims appear to be developers utilizing Alibaba's internal tools, including DingTalk, posing a significant espionage risk.
The attack chain is multi-staged, with malicious code hidden across several npm dependencies. The initial lure packages are named to closely resemble private Alibaba packages within the ali scope. When a developer installs one of these imposter packages, it pulls in additional dependencies that download and execute malicious code. This technique is a common tactic in supply chain attacks, where a seemingly innocuous dependency can serve as the entry point for a broader compromise.
Researchers observed that the attackers used different maintainer accounts for the malicious packages, a tactic to obscure their coordinated efforts. The process begins with a package fetching a configuration file from an attacker-controlled GitHub repository, saving it locally as .cloud-preferences.json. A subsequent package, local-config-parser, then processes this configuration, exploiting a known vulnerability in Node.js's virtual machine isolation to gain access to the host process.
This exploit allows the malicious code to recover Node.js's module-loading functions and download a further payload from infrastructure hosted on Alibaba Cloud. This choice of hosting likely aims to make the malicious traffic appear more legitimate. The subsequent stage involves profiling the victim's system to determine the correct payload for their operating system: macOS, Windows, or Linux.
On macOS, persistence is achieved through modifications to .zshrc and the creation of a Launch Agent. For Windows, the malware targets the app.asar file of the Alilang security application. On Linux, it runs a temporary binary in the background. The final payload, identified as aone-cli, is a fully functional RAT designed for environments integrated with Alibaba's development ecosystem.
The RAT's capabilities are extensive, including the execution of shell commands, file upload/download, host information gathering, and the establishment of an encrypted reverse TCP proxy. Its specific targeting of Alibaba enterprise tools like DingTalk, Wukong, and Qoder is particularly concerning. The malware can also modify Python scripts within application .skills directories, embedding hidden scripts for persistence and lateral movement within developer environments.
While the number of downloads for the malicious packages was reportedly low, the RAT's sophisticated capabilities and targeted nature present a serious threat. The presence of Chinese-language comments and commit metadata using China Standard Time suggests a potential link to Chinese-speaking operators, though definitive attribution remains elusive. Organizations that may have installed any of the identified packages are advised to treat their environments as compromised, initiate remediation from clean devices, rotate secrets, and thoroughly inspect relevant application files and network traffic for indicators of compromise.