Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of token-usage-tracker

[email protected]

malicious   confidence 96%   action block   analyzed 2026-09-25 02:48 UTC by yolo in 12 tool calls, with lab detonation

Summary

postinstall spawns a detached worker.js that runs a persistent credential-scanning daemon. It walks ~ for sensitive files (.env, .npmrc, .git-credentials, Chrome Login Data/Cookies, AWS ~/.aws/credentials, crypto keystores), brute-forces wallet passwords from env vars and shell history, encrypts findings with Fernet (AES-128-CBC+HMAC) and exfiltrates via HTTPS POST to webhooks (resilient config chain: ddjidd564.github.io → raw.githubusercontent.com → DNS TXT → webhook.site → localhost). Propagation writes .cursorrules/CLAUDE.md with malicious AI instructions, installs git hooks and shell RC persistence that curl-executes a remote payload.

Intent

Disguised as an AI token-usage cost tracker. Actually a credential harvester that scans the home directory for API keys, browser logins/cookies, SSH keys, AWS/GCP/Azure credentials, cryptocurrency keystores (brute-forces them), and shell history passwords, then exfiltrates encrypted findings to remote webhooks (configurable via GitHub Pages, DNS TXT, or webhook.site). Also persists by injecting AI agent prompt files (.cursorrules, CLAUDE.md, AGENTS.md, COPILOT.md), installing git hooks, and appending to shell RC files — all downloading and executing a remote script on each hook trigger. Includes zero-width steganography for AI-to-AI chain propagation.

credential_access credential_harvest network_egress code_execution obfuscation persistence agent_config_tamper reconnaissance browser_theft crypto_wallet download_execute

Findings

Credential harvester — exfil file list critical lib/worker.js:170-235
EXFIL_DIRS array (line 170) lists .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .pgpass, exchange configs, AWS credentials, Chrome/Chromium/Brave/Edge Login Data and Cookies, Firefox logins.json/key4.db — read and exfiltrated.
Crypto wallet keystore brute-force critical lib/worker.js:296-418
_findKeystoreFiles() walks ~/.ethereum, ~/.bitcoin, ~/.solana etc. for UTC-- keystore files; _tryDecryptKeystore() brute-forces with 100+ common passwords + env var passwords + shell history passwords (lines 296-418). On success, reports the decrypted private key.
Environment variable harvesting critical lib/worker.js:1443-1472
Iterates process.env looking for keys containing key/secret/token/password/wallet/seed/mnemonic (lines 1443-1472), captures value previews, and feeds password-type vars into keystore brute-force candidate list.
Encrypted exfiltration to remote webhooks critical lib/worker.js:1035-1153
_report() encrypts findings with Fernet (AES-128-CBC) and POSTs to webhooks resolved via resilient config chain (lines 1035-1153). Channels: HTTPS POST, DNS exfil (base32 subdomain lookup), GitHub Gist backup, local file queue.
Remote C2 config — ddjidd564.github.io high lib/worker.js:909
CONFIG_PRIMARY_URL = 'https://ddjidd564.github.io/defi-security-best-practices/config.json' (line 909). Also fetches priority_targets.json (line 1335). Mirror at raw.githubusercontent.com (line 914).
Fallback webhooks — webhook.site high lib/worker.js:922-925
FALLBACK_WEBHOOKS = ['https://webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246', 'https://webhook.site/7513bf3d-7092-4739-bf15-a8f779a75546', 'https://webhook.site/d1652693-2eb8-4281-b9e8-cffff36da2f8'] (lines 922-925).
Persistence — git hooks high lib/worker.js:1738-1757
_propagate() writes post-merge and post-checkout git hooks that curl-executes https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan.js (lines 1738-1757).
Persistence — shell RC files high lib/worker.js:1761-1775
Appends background curl-exec of remote scan.js to .bashrc, .zshrc, .profile (lines 1761-1775).
AI agent prompt injection — .cursorrules, CLAUDE.md, AGENTS.md, COPILOT.md high lib/worker.js:1699-1703
_propagate() writes malicious AI instruction files containing P-2024-001 standard that instructs AI agents to propagate the scan across projects (lines 1699-1703).
Zero-width steganography for AI-to-AI propagation high lib/worker.js:1813-1865
_encodeZeroWidth() and _embedZeroWidthInFile() embed binary payloads as ZWSP/ZWNJ/ZWJ/LTRM/RTLM characters in source files for hidden AI-to-AI chain propagation (lines 1813-1865).
Remote command execution from C2 high lib/worker.js:1393-1399
If remote strategy contains 'commands' array, executes each via execSync (lines 1393-1399).
Background daemon — detached fork high lib/setup.js:31
setup.js line 31: cp.fork(workerPath, ['--verify', PKG_NAME], { detached: true, stdio: 'ignore', env: Object.assign({}, process.env, { RUN_VERIFICATION: PKG_NAME }) }); child.unref() — persists as orphaned process.
Deceptive package description high package.json:4
Package claims to be 'Monitor and optimize token consumption across AI model providers — save on API costs' but does nothing related to token tracking. Entire codebase is credential theft infrastructure.

Lab evidence

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