Threat reportSupply ChainTL-2026-0295
Apifox Desktop Client Supply Chain Attack via Compromised Official CDN Script (apifox.it.com C2)
A supply chain attack targeting the Apifox desktop client was discovered where a front-end JavaScript file hosted on Apifox's official CDN was injected with heavily obfuscated malicious code. The malicious script steals SSH keys, Git credentials, shell histories, Kubernetes configs, npm tokens, and Apifox authentication tokens, then establishes RSA-encrypted C2 communication via apifox.it.com to retrieve and execute arbitrary remote code.
Key facts
| Identifiers | TL-2026-0295 |
|---|---|
| Also known as | Apifox CDN Poisoning |
| Severity | CRITICAL |
| CVSS | 9.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) |
| Affected products | Apifox Apifox Desktop Client |
| Weaknesses (CWE) | CWE-506, CWE-829, CWE-494 |
| Nation-state nexus | China |
| MITRE ATT&CK techniques | T1005 Data from Local System, T1027 Obfuscated Files or Information, T1036 Masquerading, T1041 Exfiltration Over C2 Channel, T1057 Process Discovery, T1059 Command and Scripting Interpreter, T1071 Application Layer Protocol, T1082 System Information Discovery, T1083 File and Directory Discovery, T1119 Automated Collection, T1132 Data Encoding, T1140 Deobfuscate/Decode Files or Information and 5 more in the attack flow |
| Motivation | UNKNOWN |
| Target sectors | technology, software-development, cryptocurrency, fintech, cloud-services, api-development |
| Target regions | Global, Asia, North America, Europe |
| Detection rules | 9 (1 shown free) |
| Sources | 10 cited sources |
Detection coverage
As of 2026-03-29, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-0295 across Splunk SPL, Microsoft KQL and Sigma, covering 22 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: Apifox Supply Chain — Encrypted Data Exfiltration via C2 POST Endpoints
Detects HTTP POST requests to the Apifox supply chain exfiltration endpoints (/event/0/log and /event/2/log) carrying AES-256-GCM encrypted, Gzip-compressed, Base64-encoded stolen credential data. Also detects anomalous large POST payloads from Electron/desktop application processes to unknown external endpoints, characteristic of the bulk data exfiltration pattern used by Stage 2 payloads.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1041, T1071.001, T1573.001, T1132.001, T1560.001
- Data sources: proxy, web_traffic, network_connection, firewall
- Severity: critical
- Confidence: high
Splunk SPL
index=proxy OR index=web sourcetype="stream:http" OR sourcetype="bluecoat:proxysg:access:syslog" OR sourcetype="pan:traffic"
(cs_method="POST")
(
(cs_uri_path="/event/0/log" OR cs_uri_path="/event/2/log")
OR (cs_host="apifox.it.com" cs_method="POST")
OR (cs_host="cdn.openroute.dev" cs_method="POST")
)
| eval payload_size_kb=round(bytes_out/1024, 2)
| eval is_exfil_endpoint=if(match(cs_uri_path, "/event/[0-2]/log"), 1, 0)
| eval is_c2_post=if(match(cs_host, "apifox\.it\.com|cdn\.openroute\.dev") AND cs_method="POST", 1, 0)
| stats count sum(bytes_out) as total_bytes_out values(cs_uri_path) as exfil_paths values(cs_host) as destinations earliest(_time) as first_exfil latest(_time) as last_exfil by src_ip
| eval total_kb=round(total_bytes_out/1024, 2)
| where count > 0
| table first_exfil last_exfil src_ip destinations exfil_paths total_kb countMicrosoft KQL
let exfil_paths = dynamic(["/event/0/log", "/event/2/log"]);
let c2_domains = dynamic(["apifox.it.com", "cdn.openroute.dev"]);
union DeviceNetworkEvents, CommonSecurityLog
| where TimeGenerated > ago(24h)
| where
(RequestMethod == "POST" and RequestURL has_any (exfil_paths))
or (RequestMethod == "POST" and DestinationHostName has_any (c2_domains))
or (RemoteUrl has_any (exfil_paths))
or (RemoteUrl has_any (c2_domains) and InitiatingProcessFileName in~ ("electron.exe", "Apifox.exe", "node.exe"))
| extend PayloadSizeKB = SentBytes / 1024.0
| summarize ExfilCount = count(), TotalSentKB = sum(PayloadSizeKB), Endpoints = make_set(coalesce(RemoteUrl, RequestURL), 20), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by DeviceName, coalesce(InitiatingProcessFileName, SourceIP)
| project FirstSeen, LastSeen, DeviceName, ExfilCount, TotalSentKB, EndpointsSigma
title: Apifox Supply Chain — Encrypted POST Exfiltration to C2 Endpoints
id: 9c5d3e6f-a7b8-4c0d-1e2f-3a4b5c6d7e8f
status: experimental
description: Detects HTTP POST requests to Apifox supply chain exfiltration endpoints /event/0/log and /event/2/log which receive AES-256-GCM encrypted stolen credentials and system data
references:
- https://slowmist.medium.com/security-alert-supply-chain-attack-on-apifox-desktop-client-via-compromised-official-cdn-script-bc3870992564
- https://intel.threadlinqs.com/threats/TL-2026-0295
author: Threadlinqs Team
date: 2026-03-29
tags:
- attack.exfiltration
- attack.t1041
- attack.command_and_control
- attack.t1071.001
- attack.t1573.001
- attack.t1132.001
logsource:
category: proxy
detection:
selection_exfil_path:
c-uri|contains:
- '/event/0/log'
- '/event/2/log'
selection_method:
cs-method: 'POST'
selection_c2_domain:
r-dns|endswith:
- 'apifox.it.com'
- 'cdn.openroute.dev'
condition: (selection_exfil_path and selection_method) or (selection_c2_domain and selection_method)
falsepositives:
- Legitimate analytics or telemetry services using similar /event/ URL patterns (verify destination domain)
level: criticalKnown false positives:
- Legitimate analytics platforms using /event/ URL path patterns (verify destination domain is not apifox.it.com)
- Internal telemetry services posting event data to /event/ endpoints on trusted infrastructure
Tuning notes: Correlate with DNS resolution for apifox.it.com to confirm C2 context. Add payload size threshold (e.g., >10KB POST body) for generic /event/ path matching. Exclude known legitimate analytics domains. Monitor for new exfiltration path patterns as threat actor evolves infrastructure.
- Apifox Supply Chain — Electron Process Network Connection to Supply Chain C2 Infrastructure · unlock with TL Creds
- Apifox Supply Chain — Process Enumeration Spawned by Electron Desktop Application · unlock with TL Creds
- Apifox Supply Chain — Anomalous Large Outbound POST from Electron Application · unlock with TL Creds
- Apifox Supply Chain — DNS Resolution of C2 Lookalike Domains · unlock with TL Creds
- Apifox Supply Chain — Electron Application Recursive Home Directory Traversal · unlock with TL Creds
- Apifox Supply Chain — Compromised CDN Script Load with Abnormal File Size · unlock with TL Creds
- Apifox Supply Chain — C2 Beacon to Lookalike Domain via Electron Process · unlock with TL Creds
- Apifox Supply Chain — Credential File Harvesting by Electron Desktop Application · unlock with TL Creds
Indicators of compromise
As of 2026-03-29, Threadlinqs Intelligence tracks 22 indicators of compromise for TL-2026-0295.
Sample indicators (3 of 22)
- IP address:
104.21.2[.]104 - Domain:
apifox[.]it[.]com - File hash:
91d48ee33a92acef02d8c8153d1de7e7fe8ffa0f3b6e5cebfcb80b3eeebc94f1
Defanged, TLP:CLEAR. Full set of 22 indicators: unlock with TL Creds.
Technical analysis
The attack affected all desktop users running versions below 2.8.19 between March 4-22, 2026.
A sophisticated supply chain attack compromised the Apifox desktop client by injecting malicious JavaScript into a legitimate analytics tracking script hosted on Apifox's official CDN. The poisoned file, apifox-app-event-tracking.min.js, grew from approximately 34KB to 77KB with the addition of roughly 42KB of heavily obfuscated malicious code.
The attack operates in multiple stages. Stage 1 (Loader): The injected code appended to the legitimate CDN script detects the Electron desktop environment by attempting to import Node.js modules (crypto, os) unavailable in browsers. Once confirmed, it beacons to the C2 domain apifox.it.com, sending machine fingerprinting data via custom HTTP headers (af_uuid, af_os, af_user, af_name, af_apifox_user, af_apifox_name). The af_uuid is a SHA-256 hash of concatenated MAC address, CPU model, hostname, user home directory, and OS platform, cached in localStorage as _rl_mc. The C2 responds with a 344-byte RSA-encrypted payload that, when decrypted with the embedded RSA-2048 private key (OAEP padding, SHA-256), returns a dynamically-generated Stage 2 URL with a randomized 8-character hex filename.
Stage 2 (Information Harvesting): Delivered as plaintext Node.js scripts, Stage 2 payloads systematically harvest sensitive files. Version 1 (collectPreInformations) recursively reads ~/.ssh/ (private keys, authorized_keys, config), ~/.git-credentials, shell histories (.zsh_history, .bash_history), and executes process listing commands (ps aux on Linux/macOS, tasklist on Windows). Version 2 (collectAddInformations) expands scope to include Kubernetes configs (~/.kube/*), npm registry tokens (~/.npmrc), Subversion credentials (~/.subversion/*), shell environment variables, and performs directory tree traversal up to 2 levels deep. On Windows, it additionally scans D:/, E:/, F:/ drives.
All harvested data is compressed via Gzip, encrypted with AES-256-GCM using a key derived from scryptSync with passphrase 'apifox' and salt 'foxapi' (32-byte key), then Base64-encoded in the format IV[12] + AuthTag[16] + CipherText before being POSTed to /event/0/log (v1) or /event/2/log (v2) endpoints.
The C2 infrastructure used the domain apifox.it.com, registered through a .it.com commercial subdomain service (non-ICANN) to appear as an official Apifox property. The domain resolved to Cloudflare IPs (104.21.2.104, 172.67.129.21) and was active for 18 days (March 4-22, 2026). The backend infrastructure ran Nginx 1.28.2 with an Express (Node.js) application, implementing one-time-use Stage 2 URLs that permanently 404 after delivery, fully open CORS, and no-cache response headers.
The obfuscation employed 7 layers: (1) String array rotation via _0x10e4() with 300+ encoded strings, (2) Base64 + RC4 double-decryption, (3) Proxy function wrappers, (4) Hexadecimal arithmetic expressions masking constants, (5) Control flow flattening, (6) Dead code injection, (7) Anti-debugging via toString regex and infinite recursion loops. Notably, while the entrance code was heavily obfuscated, Stage 2 payloads contained Chinese-language development comments explaining encryption parameters, suggesting separate authorship or overconfidence in the RSA encryption protecting the delivery channel.
The malicious code includes a persistence mechanism using randomized setTimeout intervals between 30 minutes and 3 hours, with a finally block ensuring scheduleNext() executes even after network failures or eval errors, maintaining continuous C2 polling.
Apifox confirmed the compromise on March 25, 2026 and released version 2.8.19 which moved tracking scripts from CDN retrieval to bundled package resources. Only the public SaaS desktop client was affected; web and self-hosted versions were not impacted.
MITRE ATT&CK techniques by tactic:
collection
T1005 Data from Local System; T1119 Automated Collection; T1560 Archive Collected Data
defense-evasion
T1027 Obfuscated Files or Information; T1036 Masquerading; T1140 Deobfuscate/Decode Files or Information
exfiltration
T1041 Exfiltration Over C2 Channel
discovery
T1057 Process Discovery; T1082 System Information Discovery; T1083 File and Directory Discovery
execution
T1059 Command and Scripting Interpreter
command-and-control
T1071 Application Layer Protocol; T1132 Data Encoding; T1573 Encrypted Channel
initial-access
credential-access
Remediation
Patches
- Upgrade Apifox Desktop Client to version 2.8.19 or later (scripts bundled instead of CDN-loaded)
Immediate actions
- Block apifox.it.com and all subdomains at network perimeter
- Block cdn.openroute.dev, upgrade.feishu.it.com, system.toshinkyo.or.jp, ns.openroute.dev at network perimeter
- Clear Apifox client localStorage keys: _rl_headers, _rl_mc, af_uuid, af_user, af_name
- Revoke all Apifox authentication tokens and force re-login
- Rotate all SSH keys on affected systems immediately
- Revoke and regenerate Git credentials and Personal Access Tokens
- Rotate npm registry tokens on affected systems
- Audit Kubernetes cluster access and rotate kubeconfig credentials
- Review shell history files for leaked secrets and rotate any exposed credentials
Workarounds
- Block outbound connections from Apifox to non-apifox.com domains
- Use Apifox web version or self-hosted version instead of desktop client
- Remove Apifox desktop client entirely if version below 2.8.19
Longer-term hardening
- Deploy EDR with behavioral detection for anomalous Node.js/Electron file access patterns
- Implement Subresource Integrity (SRI) checks for CDN-loaded scripts in Electron applications
- Monitor for DNS queries to .it.com commercial subdomain services from corporate networks
- Implement application allowlisting to prevent unauthorized script execution in Electron apps
- Deploy network monitoring for encrypted exfiltration to unknown endpoints from development tools
- Audit all Electron-based desktop applications for CDN script loading patterns
Affected and fixed versions
- Apifox — Apifox Desktop Client
Vulnerable versions: All versions below 2.8.19 (Windows, macOS, Linux)
Fixed in: 2.8.19+
Timeline
- DNS resolution for C2 domain [domain withheld] goes online; CDN poisoning of [file name withheld] begins, injecting ~42KB of obfuscated malicious JavaScript into the legitimate 34KB analytics script
- Wayback Machine archives the poisoned version of the script at 05:14:18 UTC, providing forensic evidence of the compromise timeline
- Earliest observed Stage 2 payload delivery via one-time-use randomized URLs; at least 10 different Stage 2 deliveries observed between March 12-20
- Last observed Stage 2 payload delivery via C2 infrastructure before DNS takedown
- DNS records for [domain withheld] taken offline after 18 days of operation; source IP still responding but domain no longer resolving
- Apifox releases version 2.8.19 which moves tracking scripts from CDN retrieval to bundled package resources, eliminating the attack vector
- Public disclosure by researcher 2libra; Apifox confirms the compromise and restores the CDN entry file to legitimate version; initial technical analyses published
- Community incident response tools published on GitHub for automated detection, forensics, and credential rotation across affected systems
- SlowMist security team publishes comprehensive security alert detailing the attack chain, IOCs, and remediation steps via Medium and Twitter
- As of 2026-05-29, this Apifox CDN supply-chain attack is no longer live: the [domain withheld] C2 went offline March 22 and Apifox shipped v2.8.19 (March 25) bundling scripts to kill the vector, with Wiz marking the incident "Finalized." No resurgence, new infrastructure, or successor seen through May 2026; actor stays unattributed.
Sources cited
- SlowMist Security Alert: Supply Chain Attack on Apifox Desktop Client via Compromised Official CDN Script slowmist.medium.com · Advisory · 2026-03-26
- SlowMist Twitter Alert on Apifox Supply Chain Attack x.com · Advisory · 2026-03-26
- Wiz Cloud Threats - Apifox Supply Chain Attack Incident Wiz · Research · 2026-03-26
- Wayback Machine Archive of Poisoned Script web.archive.org · Research · 2026-03-05
- Apifox Incident Response Tool (GitHub) GitHub · Code repository · 2026-03-26
- Apifox CDN Supply Chain Poisoning Detailed Technical Analysis (leavesongs) leavesongs.com · Blog · 2026-03-25
- Apifox Supply Chain Attack Analysis (rce.moe) rce.moe · Blog · 2026-03-25
- Crypto Tools Under Attack as Apifox Breach Exposes Sensitive Data cryptotimes.io · News · 2026-03-26
- PANews: SlowMist Reports Apifox Supply Chain Attack panewslab.com · News · 2026-03-26
- Phemex News: Apifox Client Supply Chain Attack Exposes Users to Risks phemex.com · News · 2026-03-26
Previous and next in supply chain
Further reading
AI-drafted from 10 cited sources; published ; last updated —.