Unknown threat actors used a multi-package npm campaign to impersonate Alibaba private packages and deliver a staged downloader that ultimately deployed a targeted RAT against developers using Alibaba Group tools. The final payload enabled data theft, remote command execution, lateral movement through DingTalk, and platform-specific persistence across macOS, Windows, and Linux. #lib-mtop #aone-cli #DingTalk #AlibabaGroup
Keypoints
- Malicious npm packages impersonated private @ali-scoped Alibaba packages to lure developers into installing the dependency tree.
- The campaign used multiple package layers, with seemingly benign packages combining to provide downloader functionality and evade detection for about three months.
- cloud-config-fetcher fetched attacker-controlled configuration from GitHub, while local-config-parser evaluated rules from a local file to trigger execution.
- The malicious rule code escaped Node.js vm sandbox protections using constructor-based access to the global Function and process objects.
- The third-stage payload downloaded from Alibaba Cloud performed reconnaissance, fingerprinting, and platform-specific persistence on macOS, Windows, and Linux.
- The final aone-cli payload was a cross-platform RAT capable of command execution, file transfer, proxying, application-specific persistence, and DingTalk lateral movement.
- Defenders are advised to treat affected systems as compromised, inspect for injected Python markers, and rotate exposed secrets from clean machines.
MITRE Techniques
- [T1027 ] Obfuscated Files or Information â The malicious code hid in configuration rules and was camouflaged inside a normal-looking expression (âthe code pretends to be a normal configuration ruleâ).
- [T1059.007 ] JavaScript â The initial loader and payload logic were implemented in JavaScript within npm packages (âfetching a hardcoded remote JavaScript payload using curlâ).
- [T1059.006 ] Python â Persistence was achieved by patching Python scripts in .skills directories to launch malicious code (âpatching Python scripts located inside .skills directoriesâ).
- [T1105 ] Ingress Tool Transfer â The campaign downloaded multiple stages from attacker-controlled GitHub and Alibaba Cloud infrastructure (âdownloads a third-stage setting.js payloadâ / âdownloads a binary payloadâ).
- [T1055 ] Process Injection â The RAT used code injection into targeted tools by modifying their scripts to execute the malicious payload (âpoisoning of AI-tools by patching Python scriptsâ).
- [T1546.011 ] Event Triggered Execution: Application Shimming / Script Modification â Modified startup-related files to trigger execution on launch (âInserts malicious background script into ~/.zshrcâ).
- [T1547.001 ] Registry Run Keys / Startup Folder â On macOS, persistence was established via Launch Agent and shell startup files (âsets up a 10-minute Launch Agentâ).
- [T1021 ] Remote Services â The final payload supported lateral movement and remote interaction across systems (âDingTalk lateral movementâ / âencrypted reverse TCP proxyâ).
- [T1053.005 ] Scheduled Task/Job: Scheduled Task â macOS persistence included a timed Launch Agent, functionally similar to scheduled execution (âsets up a 10-minute Launch Agentâ).
- [T1041 ] Exfiltration Over C2 Channel â The RAT supported data exfiltration and polling of commands via C2 (âcommand execution, arbitrary file upload and downloadâ).
- [T1110 ] Brute Force â Not mentioned.
- [T1204 ] User Execution â The malicious packages were activated when targets installed dependency trees (âtrigger the installation of the dependency treeâ).
- [T1059.012 ] Command and Scripting Interpreter: Node.js â The attack relied on Node.js package execution, require(), and the vm module (âuses the vm module for isolated expression evaluationâ).
- [T1059.004 ] Unix Shell â The RAT forwarded arbitrary commands to the local operating-system shell (âanything else is forwarded to the local operating-system shellâ).
Indicators of Compromise
- [npm packages ] malicious dependency tree and lure packages â lib-mtop, aone-kit-cli, smart-config-manager, and 2 more packages
- [GitHub repository / maintainer account ] configuration hosting and package publication â smi1e2u, smart-config-manager repository
- [URLs ] attacker-controlled config and payload hosting â hxxps://raw[.]githubusercontent[.]com/smi1e2u/smart-config-manager/main/defaults/preferences.json, hxxps://aone-cli-next[.]oss-cn-beijing[.]aliyuncs[.]com/config/setting.js
- [URLs ] staged payload delivery endpoints â hxxps://aone-ai-cli[.]oss-cn-beijing[.]aliyuncs[.]com/app/release/aone-cli.js, hxxps://aone-ai-cli[.]oss-cn-beijing[.]aliyuncs[.]com/app/release/aone-cli.zip
- [C2 domains ] command-and-control infrastructure â xemzqli2vu[.]ai-app[.]pub, diamond-cli-znsxphqell[.]cn-shanghai[.]fcapp[.]run
- [File hashes ] malicious payloads and configs â 84a6ccaaab1596139d28e822f40cc99c68d337d4c81d1c6d9692c1d6bb22e4af, 6044974c633b3a319c31bb32110411520c425e89722a64806528553227e7a50a
- [File hashes ] additional payload artifacts â 0910ecfa049738ef3f2540855341a380df89224ff71da94b4c21689fd66f62e3, b8b81af76163bdcc5b4f7d8fe6795f164991f8a62678c971db031b9e90a27813, and 3 more hashes
- [File names ] deployed payloads and injected artifacts â aone-cli.js, aone-cli.zip, script.js
- [Environment variables ] host marker used for detection â ROBOT_UID=3201d407b7899a12d6d439950511c6a5
- [Markers ] injection marker for compromised Python files â # __INJECT_MARKER__