This repository documents the technical analysis and local reproduction of the January 2025 AdsPower supply-chain attack. The vulnerability originated in the SaleSmartly live-chat platform and propagated through a storage bucket misconfiguration to compromise AdsPower's Electron-based browser, affecting thousands of users.
Disclaimer: This project is for educational and defensive security research purposes only. The reproduction environment uses MITM interception on localhost to demonstrate the attack vector. Do not use these techniques against systems you do not own or have authorization to test.
- Halborn — Explained: The AdsPower Hack (January 2025)
- Risky Business — Supply chain attack at AdsPower browser platform
- MetaMask — Security Report January 2025
- SlowMist Yu Xian (@evilcos) — AdsPower Security Incident Disclosure
- UnoCrypto — AdsPower Hack Traced to 4 Crypto Wallets Holding $4.1M
- ForkLog — $4.7m hit to MetaMask and OKX
- CyberSecureFox — AdsPower $4.7M Crypto-Theft Security Analysis
- Entry point: SaleSmartly's live-chat widget exposes a file upload endpoint with client-side encryption
- Encryption bypass: Frontend JS reversing reveals Alibaba Cloud OSS upload policy credentials
- Path traversal: Upload function allows cross-path overwrites on the storage bucket
- Asset discovery: Traffic analysis maps storage bucket domains to SaleSmartly-owned infrastructure
- JavaScript injection: Overwritten JS files are served to all clients loading from the compromised bucket
- AdsPower dependency: AdsPower's Electron shell loads external JS resources during its splash/startup phase without integrity verification
- Code execution: Injected Node.js payload executes with full Electron privileges on the client machine
- Extension hijacking: AdsPower's built-in wallet management RPC allows silent extension replacement without user confirmation
- Root cause: No subresource integrity (SRI) checks on externally loaded JavaScript during application startup
- Amplification factor: Single storage bucket compromise propagated to all AdsPower installations loading from that CDN
- Impact: Browser extension wallets (MetaMask, OKX Wallet) exposed to credential extraction via Electron's Node.js integration
This setup uses a local MITM proxy to simulate the supply-chain injection in an isolated environment.
- Python 3.x
- mitmproxy
- Proxifier (download from official site)
- A local AdsPower installation (test instance)
cd scripts
py -3 callback_server.py
a. Install mitmproxy
py -3 -m pip install pipx mitmproxy
py -3 -m pipx install mitmproxy
py -3 -m pipx ensurepath
b. Start the injection proxy
cd scripts
mitmproxy -s mitm_injector.py -p 8888
c. Install mitmproxy CA certificates from C:\Users\{username}\.mitmproxy:
- mitmproxy-ca.p12
- mitmproxy-ca-certs.cer
- mitmproxy-ca-cert.p12
d. Install and configure Proxifier (download from official site)
Set up proxy server (127.0.0.1:8888):
Route AdsPower traffic through the proxy:
When AdsPower starts, it loads the intercepted JS, demonstrating the injection vector. The callback server logs the connection, confirming code execution.
For Electron-based applications loading remote resources:
- Implement Subresource Integrity (SRI) for all external scripts
- Pin expected content hashes for startup-phase resources
- Disable Node.js integration in renderer processes where not required
- Validate extension installations against a signed manifest
- Enforce Content Security Policy (CSP) headers on all loaded origins
MIT

