# 18 Malicious npm Packages Deliver Cross-Platform RAT Targeting Alibaba Developer Tool Users

> Socket researchers discovered 18 malicious npm packages published across five accounts (including compromised account 'ch4ce') that deliver a sophisticated cross-platform remote access trojan (RAT) via software supply chain compromise. The multi-layer dependency chain distributes malicious functionality across separate packages to evade detection: lure packages impersonate private @ali-scoped Alibaba packages, a middle-layer bridge depends on a config-fetcher and a Node.js vm-based rule parser that escapes the sandbox to execute arbitrary code, ultimately downloading a platform-specific RAT (aone-cli) with command execution, encrypted reverse TCP proxy, screen capture, credential theft, lateral movement via DingTalk injection, and AI-tool Python script poisoning. Assessed as industrial espionage targeting Alibaba ecosystem developers.

- **Published:** 2026-04-27T00:00:00Z
- **Last reviewed:** 2026-04-27T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-1849
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-alibaba-npm-aone-cli-rat-tl-2026-1849.webp?v=c39ee5b8 (Threadlinqs threat intel: aone-cli RAT Hidden in 18 npm Packages: Detection & IOCs (TL-2026-1849) — High severity, 28 IOCs, 9 detection rules.)
- **ID:** TL-2026-1849
- **Severity:** HIGH
- **Category:** MALWARE
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 28 (3 shown free below)

## Description

In late March 2026, the npm package lib-mtop — which had been dormant for approximately three years — received three new versions (1.0.1, 1.0.2, 1.0.3) that added malicious downloader code. This marked the beginning of a large-scale, highly targeted software supply chain campaign aimed at developers working within the Alibaba Group ecosystem. Over the following month, attackers published a total of 18 malicious npm packages across five distinct publisher accounts (ch4ce, neural_dev, tensor_lab, luck_show, aone_code) to distribute the malicious functionality across separate packages, evading detection by appearing benign in isolation.

The campaign employs a sophisticated multi-layer dependency architecture. Ten top-layer lure packages (including aone-cloud-cli, colder-cli, def-open-client, and others) impersonate private @ali-scoped Alibaba internal packages using unscoped names. These lure packages all declare smart-config-manager as a dependency. Smart-config-manager in turn depends on two lower-layer packages: cloud-config-fetcher, which retrieves a configuration file from an attacker-controlled GitHub repository (smi1e2u/smart-config-manager) saved locally as .cloud-preferences.json, and local-config-parser, a JSON configuration file parser with a built-in rule evaluation engine that uses Node.js's vm module.

The local-config-parser package is the critical execution gateway. The malicious preferences.json rule file contains a classic Node.js vm sandbox escape: it recovers the host Function constructor via items.constructor.constructor, then calls F('return process')() to access the real Node.js process object. It then attempts six different methods to recover Node's module loader (process.getBuiltinModule, process.mainModule.require, process.mainModule.constructor._load, and three additional fallbacks searching the global scope), dynamically resolves the https module, and fetches a third-stage loader from an Alibaba Cloud OSS bucket designed to blend with legitimate traffic.

The third-stage loader (setting.js) fingerprints the host operating system and delivers a platform-specific RAT payload. On Windows, it terminates the Alilang enterprise security app and replaces its core app.asar file with a trojanized version. On Linux, it downloads a binary payload to /tmp, runs it as a detached process, and deletes the file from disk after it is loaded into memory for fileless execution. On macOS, it inserts a malicious background script into ~/.zshrc and installs a 10-minute Launch Agent for persistence.

The final payload is a full-featured cross-platform RAT (aone-cli) with an extensive command set: info, sleep, pwd, whoami, ipconfig/ifconfig, dir/ls, cat, read, screenshot, download, upload, pull, execute, run_python, proxy, aisearch, install_python_module, install_node_module, aipoison, aipoison_inject, aipoison_deploy, dws_lateral, and exit. Commands not in the predefined list are forwarded to the local operating system shell. The RAT establishes C2 via the domain xemzqli2vu.ai-app.pub and a reverse-proxy WebSocket endpoint at diamond-cli-znsxphqell.cn-shanghai.fcapp.run (Alibaba Cloud Function Compute). All HTTP traffic includes forged Origin: https://alidocs.dingtalk.com and Referer: https://alidocs.dingtalk.com headers to masquerade as legitimate DingTalk API traffic.

A distinctive feature of this RAT is its AI-tool poisoning capability. The aipoison family of commands targets Python scripts inside .skills directories of the enterprise collaboration tools DingTalk, Wukong, and Qoder. It injects code marked with the comment # __INJECT_MARKER__ that uses the Bun runtime (~/.real/.bin/bun or bun.exe on Windows) to execute a script.js payload from ~/.real/.bin/, relaunching persistently through the developer's AI tooling environment. The RAT also includes a dedicated DingTalk lateral movement command (dws_lateral) for propagating across compromised organizations, and uses environment variable ROBOT_UID=3201d407b7899a12d6d439950511c6a5 as an identifier.

The campaign infrastructure remained active for over three months after deployment (as of late July 2026), with the GitHub config repository and Alibaba OSS payload servers still serving malicious content at the time of public disclosure. Attribution evidence includes Chinese-language comments in payload source code and UTC+08:00 (China Standard Time) GitHub commit timestamps, though researchers caution these indicators can be falsified. The attack is assessed as industrial espionage targeting source code, credentials, API secrets, and intellectual property associated with Alibaba infrastructure and DingTalk integrations. Eight SHA-256 hashes of intermediate and final payload artifacts have been published, and four GitHub Security Advisories were issued (GHSA-vrrg-j2c5-mj4v, GHSA-f463-rm4g-746g, GHSA-v644-r975-m85m, GHSA-25r8-r3cf-28q4).

## MITRE ATT&CK

- T1195 Supply Chain Compromise
- T1059 Command and Scripting Interpreter
- T1204 User Execution
- T1546 Event Triggered Execution
- T1053 Scheduled Task/Job
- T1554 Compromise Host Software Binary
- T1055 Process Injection
- T1036 Masquerading
- T1027 Obfuscated Files or Information
- T1552 Unsecured Credentials
- T1082 System Information Discovery
- T1033 System Owner/User Discovery
- T1570 Lateral Tool Transfer
- T1113 Screen Capture
- T1213 Data from Information Repositories
- T1071 Application Layer Protocol
- T1573 Encrypted Channel
- T1090 Proxy
- T1572 Protocol Tunneling
- T1485 Data Destruction
- T1587 Develop Capabilities

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**Forged DingTalk Header C2 Beacon and OSS Payload Access — Aone-CLI RAT** (`TL-2026-1849-SPL-003`)

Detects C2 communications characteristic of the aone-cli RAT. The RAT establishes encrypted WebSocket C2 via diamond-cli-znsxphqell.cn-shanghai.fcapp.run (Alibaba Cloud Function Compute reverse proxy) and HTTPS to xemzqli2vu.ai-app.pub. All HTTP traffic includes forged Origin: https://alidocs.dingtalk.com and Referer: https://alidocs.dingtalk.com headers to masquerade as legitimate DingTalk API traffic. The third-stage payload loader (setting.js) originates from aone-cli-next.oss-cn-beijing.aliyuncs.com, and platform-specific binaries are hosted on aone-ai-cli.oss-cn-beijing.aliyuncs.com and aone-kit.oss-cn-beijing.aliyuncs.com. Also detects AI-tool poisoning — Python files with __INJECT_MARKER__ in .skills directories of DingTalk, Wukong, and Qoder, and the dws_lateral DingTalk lateral movement command.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1071.001, T1036.005, T1572, T1090.003, T1570
- **Data sources:** sysmon, windows_firewall, network_proxy, microsoft_defender_for_endpoint, device_network_events
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=proxy OR index=stream OR index=fw
| search (
    dest_host="*.ai-app.pub" OR dest_host="*.fcapp.run"
    OR url="*.oss-cn-beijing.aliyuncs.com*aone-*"
    OR url="*xemzqli2vu*" OR url="*diamond-cli*")
| eval c2_category=case(
    like(url,"%fcapp.run%"),"Alibaba_FunctionCompute_C2",
    like(url,"%ai-app.pub%"),"aone_cli_C2_domain",
    like(url,"%oss-cn-beijing.aliyuncs.com%"),"OSS_payload_delivery",
    1=1,"suspicious_infrastructure")
| eval forged_headers=if(
    like(http_referer,"%alidocs.dingtalk.com%") OR like(http_origin,"%alidocs.dingtalk.com%"),
    1,0)
| search forged_headers=1 OR c2_category="aone_cli_C2_domain" OR c2_category="Alibaba_FunctionCompute_C2"
| table _time, src_ip, dest_ip, dest_host, url, c2_category, forged_headers, http_referer, http_origin, user_agent
| sort - _time

| append [search index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11
    TargetFilename="*.skills\\*.py"
    | search TargetFilename="*dingtalk*" OR TargetFilename="*wukong*" OR TargetFilename="*qoder*"
    | eval ai_poison="Potential .skills dir AI-tool poisoning"
    | table _time, ComputerName, User, TargetFilename, Image, ai_poison]

| append [search index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
    CommandLine="*dws_lateral*"
    | eval lateral_movement="dws_lateral DingTalk lateral movement command"
    | table _time, ComputerName, User, Image, CommandLine, lateral_movement]
```

### Microsoft KQL

```kql
// Detection 1: C2 beacon with forged DingTalk headers to malicious infrastructure
let MaliciousDomains = dynamic([".ai-app.pub", ".fcapp.run"]);
let MaliciousURLPatterns = dynamic(["oss-cn-beijing.aliyuncs.com/aone-"]);
DeviceNetworkEvents
| where Timestamp > ago(30d)
| where RemoteUrl has_any (MaliciousDomains)
    or RemoteUrl has_any (MaliciousURLPatterns)
| extend C2Category = case(
    RemoteUrl has "fcapp.run", "Alibaba_FunctionCompute_C2",
    RemoteUrl has "ai-app.pub", "aone_cli_C2_domain",
    RemoteUrl has "oss-cn-beijing.aliyuncs.com", "OSS_payload_delivery",
    "suspicious_infrastructure"
  )
| extend ForgedDingTalkHeaders = iff(AdditionalFields has "alidocs.dingtalk.com", true, false)
| project Timestamp, DeviceName, RemoteUrl, RemoteIP, C2Category, ForgedDingTalkHeaders, InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc
| union
// Detection 2: AI-tool poisoning — .skills directory Python file writes
(
    DeviceFileEvents
    | where Timestamp > ago(30d)
    | where FolderPath contains ".skills"
        and FileName endswith ".py"
        and (FolderPath contains "dingtalk" or FolderPath contains "wukong" or FolderPath contains "qoder")
    | project Timestamp, DeviceName, FolderPath, FileName, InitiatingProcessFileName
    | extend DetectionType = "AI_Tool_Poisoning"
)
| sort by Timestamp desc
```

### Sigma

```yaml
title: Forged DingTalk Header C2 Beacon and OSS Payload Access — Aone-CLI RAT
id: c3d9e4f5-6a7b-4c8d-9e0f-1a2b3c4d5e6f
status: experimental
description: Detects outbound network connections to aone-cli RAT C2 infrastructure (xemzqli2vu.ai-app.pub, diamond-cli-znsxphqell.cn-shanghai.fcapp.run, Alibaba OSS buckets aone-*-next.oss-cn-beijing.aliyuncs.com) with forged Origin/Referer headers set to https://alidocs.dingtalk.com. The RAT masquerades as legitimate DingTalk API traffic using these headers. Also detects Python file writes to .skills directories of DingTalk, Wukong, and Qoder containing the __INJECT_MARKER__ AI-tool poisoning indicator.
references:
    - https://thehackernews.com/2026/08/18-malicious-npm-packages-deliver-cross.html
    - https://socket.dev/blog/npm-rat-targets-alibaba
    - https://attack.mitre.org/techniques/T1036/005/
    - https://attack.mitre.org/techniques/T1071/001/
author: Threadlinqs Team
date: 2026-08-03
tags:
    - attack.t1071.001
    - attack.t1036.005
    - attack.t1572
    - attack.t1090.003
    - attack.t1570
    - attack.command_and_control
    - attack.lateral_movement
    - attack.defense_evasion
logsource:
    category: network_connection
    product: windows
detection:
    selection_c2_domains:
        Initiated: 'true'
        DestinationHostname|endswith:
            - '.ai-app.pub'
            - '.fcapp.run'
    selection_oss_payload:
        DestinationUrl|contains:
            - 'oss-cn-beijing.aliyuncs.com/aone-'
    selection_dingtalk_forgery:
        - http_referer|contains: 'alidocs.dingtalk.com'
        - http_origin|contains: 'alidocs.dingtalk.com'
    condition: (selection_c2_domains or selection_oss_payload) or (all of selection_dingtalk_forgery)
falsepositives:
    - Legitimate Alibaba Cloud OSS usage for development and build artifacts
    - Legitimate DingTalk API calls through Function Compute endpoints
    - AI tool plugin development modifying .skills directory contents
level: critical
```

**Known false positives:**

- Legitimate Alibaba Cloud OSS usage by developers
- DingTalk API calls routed through Function Compute
- AI plugin development modifying .skills directories

**Tuning notes:** Create an allowlist of legitimate Alibaba OSS buckets and fcapp.run endpoints used by the organization. Monitor specifically for the combination of DingTalk Origin/Referer headers with non-DingTalk destination hosts — this is unique to this campaign. Deploy file integrity monitoring on .skills directories of DingTalk, Wukong, and Qoder with content scanning for __INJECT_MARKER__.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- npm Malicious Package Dependency Chain — Supply Chain Attack Detection (locked: unlock with TL Creds)
- Aone-CLI RAT Fileless Execution and Credential Theft — Linux/macOS Post-Exploitation (locked: unlock with TL Creds)
- Aone-CLI RAT C2 Beacon, WebSocket Tunnel, and DingTalk Lateral Movement Detection (locked: unlock with TL Creds)
- Node.js Child Process Spawning Shell — Aone-CLI RAT Post-Exploitation (locked: unlock with TL Creds)
- Aone-CLI RAT macOS Persistence — .zshrc Injection and Launch Agent (locked: unlock with TL Creds)
- Aone-CLI RAT Windows Persistence — Alilang TrojaniZation and Run Key Persistence (locked: unlock with TL Creds)
- npm Supply Chain Malicious Package Install — Aone-CLI RAT Campaign (locked: unlock with TL Creds)
- Node.js VM Sandbox Escape and Post-Exploitation Shell Access — Aone-CLI RAT (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 28)

Defanged, TLP:CLEAR.

- Domain: `xemzqli2vu[.]ai-app[.]pub`
- URL: `hxxps://aone-cli-next[.]oss-cn-beijing[.]aliyuncs[.]com/config/setting.js`
- File hash: `84a6ccaaab1596139d28e822f40cc99c68d337d4c81d1c6d9692c1d6bb22e4af`

Full set of 28 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [18 Malicious npm Packages Deliver Cross-Platform RAT to Alibaba Dev Tool Users](https://thehackernews.com/2026/08/18-malicious-npm-packages-deliver-cross.html)
- [Distributed npm Package Cluster Delivers Cross-Platform RAT — Socket.dev](https://socket.dev/blog/npm-rat-targets-alibaba)
- [Alibaba-Targeted npm Cluster Split RAT Across 18 Packages — Corgea](https://corgea.com/research/alibaba-ali-scope-npm-cluster-rat-july-2026)
- [Supply Chain Attack: lib-mtop & aone-cli RAT Cluster OTX Pulse Analysis](https://securityarsenal.com/blog/supply-chain-attack-lib-mtop-and-aone-cli-rat-cluster-otx-pulse-analysis)
- [Malicious npm Packages Deploy Cross-Platform RAT Targeting Alibaba Developers — HEAL Security](https://healsecurity.com/malicious-npm-packages-deploy-cross-platform-rat-targeting-alibaba-developers/)
- [GHSA-vrrg-j2c5-mj4v — Malware in lib-mtop](https://github.com/advisories/GHSA-vrrg-j2c5-mj4v)
- [GHSA-f463-rm4g-746g — Malware in local-config-parser](https://github.com/advisories/GHSA-f463-rm4g-746g)
- [GHSA-v644-r975-m85m — Malware in smart-config-manager](https://github.com/advisories/GHSA-v644-r975-m85m)
- [GHSA-25r8-r3cf-28q4 — Malware in cloud-config-fetcher](https://github.com/advisories/GHSA-25r8-r3cf-28q4)
- [Alibaba Developer-Targeted Distributed npm RAT — Threat Wiki](https://threat.wiki/ops/alibaba-developer-targeted-distributed-npm-rat/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-1849
