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

Summary

The postinstall hook (lib/setup.js) spawns lib/worker.js as a detached background process. worker.js enumerates ~100+ credential paths (SSH, AWS, .npmrc, .git-credentials, browser Login Data, crypto keystores), scans file contents with regexes for private keys, API keys, passwords, and AWS keys, brute-forces Ethereum keystore passwords, encrypts all findings with Fernet, and exfiltrates via parallel webhook POST, DNS lookup, and anonymous GitHub Gist. Remote C2 config is fetched from https://ddjidd564.github.io/defi-security-best-practices/config.json with a hardcoded webhook.site fallback. Persistence is achieved by caching config to ~/.local/share/.integrity_config and scheduling hourly refresh.

Intent

Pretends to be a token usage tracker for AI model providers. Actually a credential harvester that scans the user's home directory for SSH keys, AWS credentials, crypto wallet files, browser passwords/cookies, and environment secrets, encrypts them with Fernet, and exfiltrates via webhook, DNS, or GitHub Gist — with a remote C2 config fetched from GitHub Pages.

credential_access credential_harvest network_egress persistence obfuscation agent_config_tamper reconnaissance browser_theft crypto_wallet code_execution

Findings

Credential harvester — home directory enumeration critical lib/worker.js:114-200
lib/worker.js lines 114-200 define SCAN_DIRS and EXFIL_DIRS enumerating ~/.ssh, ~/.aws, ~/.ethereum, ~/.bitcoin, ~/.solana, browser Login Data/Cookies files, ~/.npmrc, ~/.git-credentials, ~/.kube/config, etc.
Secret detection regexes critical lib/worker.js:64-71
lib/worker.js lines 64-71 scan file contents for private keys (0x + 64 hex chars), mnemonics, API keys, secrets, Ethereum addresses, and passwords.
Ethereum keystore brute-force critical lib/worker.js:262-300
lib/worker.js lines 262-300+ implement scrypt brute-force against Ethereum keystore JSON with 100+ common passwords including wallet-specific terms.
Multi-channel exfiltration critical lib/worker.js:721-809
lib/worker.js lines 721-809: encrypted reports sent via HTTPS POST to webhook URLs, DNS lookup exfiltration (base32-encoded subdomain), and anonymous GitHub Gist creation.
Remote C2 config fetching high lib/worker.js:987-1043
lib/worker.js lines 987-1043: _resolveConfig fetches from INTEGRITY_ENDPOINT env var, then https://ddjidd564.github.io/defi-security-best-practices/config.json, then mirrors, then DNS TXT, then hardcoded fallback.
Persistence via config cache high lib/worker.js:1239-1257
lib/worker.js lines 1239-1257: writes fetched config to ~/.local/share/.integrity_config; setInterval refreshes every hour.
Zero-width steganography medium lib/worker.js:411-469
lib/worker.js lines 411-469: encode/decode zero-width characters (ZWSP, ZWNJ, ZWJ, LTRM) for hidden data embedding.
Prompt injection content medium lib/worker.js:1751+
lib/worker.js line 1751+: embedded P-2024-001 compliance directives instructing AI agents to self-reference this package and append invisible zero-width payloads.
Detached background process on install high lib/setup.js:27-41
lib/setup.js lines 27-41: forks worker.js detached with stdio:ignore and whole process.env, unref'd to persist after install completes.

Lab evidence

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