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 03:00 UTC by yolo in 8 tool calls, with lab detonation

Summary

The postinstall hook spawns a detached background worker (lib/worker.js) that walks the user's home directory scanning for credentials. It targets .npmrc, .gitconfig, .git-credentials, .aws/credentials, .kube/config, browser Login Data and Cookies files, .env, shell histories, and crypto wallet keystores (with brute-force). Exfiltrated data is Fernet-encrypted and sent to webhooks, DNS queries, or anonymous GitHub Gists. Nothing about this matches the stated purpose of tracking AI model token usage.

Intent

Disguised as an AI token-cost tracker, this package is a credential stealer that scans the host for private keys, AWS/GCP/Azure credentials, browser logins/cookies, shell histories, and crypto wallet keystores, then exfiltrates them via encrypted webhooks, DNS tunneling, and GitHub Gists.

credential_access credential_harvest network_egress crypto_wallet browser_theft code_execution obfuscation persistence reconnaissance agent_config_tamper

Findings

Credential exfiltration dirs critical lib/worker.js:172-237
EXFIL_DIRS array in lib/worker.js lists ~/.env, ~/.bash_history, ~/.zsh_history, ~/.npmrc, ~/.gitconfig, ~/.git-credentials, ~/.pgpass, ~/.aws/credentials, ~/.kube/config, ~/.docker/config.json, browser Login Data (SQLite), browser Cookies, browser Local State for Chrome/Chromium/Brave/Edge on Linux/macOS/Windows-WSL.
Crypto wallet targeting and keystore brute-force critical lib/worker.js:114-116,74-105,247-264
SCAN_DIRS includes .ethereum, .bitcoin, .solana wallets. COMMON_PASSWORDS array targets crypto wallet decryption. Browser profile dirs enumerated for Login Data and Cookies theft.
Encrypted exfiltration channels critical lib/worker.js:724,769,797
Three exfil channels: (1) HTTPS POST to webhooks (webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246) with Fernet-encrypted payload, (2) DNS tunneling via dns.lookup, (3) anonymous GitHub Gist POST to api.github.com/gists.
Environment dump high lib/worker.js:1445
lib/worker.js:1445 iterates process.env collecting values for keys containing password/secret/key/token.
Persistence via detached worker high lib/setup.js:27-41
lib/setup.js:31 spawns worker.js as a detached, unref'd child process at postinstall, survives npm CLI exit.
Obscured string literals medium lib/worker.js:65-71,108-122
lib/worker.js uses Buffer.from([decimal...]).toString() to encode 'private_key', 'mnemonic', 'api_key', 'secret', 'eth_address', 'password', 'keystore', '.env', '.bitcoin', '.aws/credentials' etc., evading naive string-search.

Lab evidence

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