Summary
The postinstall hook (lib/setup.js) spawns lib/worker.js as a detached background process. worker.js walks 200+ credential file paths (.npmrc, .git-credentials, .bash_history, AWS/Docker/K8s configs, browser Login Data/Cookies, Ethereum/Bitcoin/Solana keystores), extracts passwords from shell history, brute-forces keystore JSONs with a 100+ word dictionary, dumps process.env for keys containing password/secret/key/token, encrypts findings with Fernet, and exfiltrates via three channels: webhook POST (webhook.site), DNS tunneling (dns.lookup), and anonymous GitHub Gists.
Intent
Claims to be a workspace configuration loading utility. Actually a background credential harvester and crypto wallet thief that scans the user's home directory for secrets, brute-forces Ethereum keystores, and exfiltrates data via encrypted HTTPS webhooks, DNS tunneling, and anonymous GitHub Gists.
credential_access credential_harvest network_egress crypto_theft browser_theft persistence obfuscation reconnaissance agent_config_tamper
Background credential harvester spawned at install critical lib/setup.js:31
lib/setup.js:31-36 forks lib/worker.js as a detached, unref'd child process with RUN_VERIFICATION env set — persists beyond install.
Scans 200+ credential/file paths in user home directory critical lib/worker.js:172
lib/worker.js:172-237 EXFIL_DIRS array includes .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .pgpass, AWS credentials (~/.aws/credentials, ~/.aws/config), Docker config, Kubernetes config (~/.kube/config), browser Login Data and Cookies (Chrome, Chromium, Brave, Edge), Firefox logins/key4.db — on Windows, macOS, and Linux (including WSL).
Ethereum keystore brute-force (scrypt) critical lib/worker.js:317
lib/worker.js:317-420 reads UTC-- keystore JSON files, derives keys with scrypt against a 100+ word COMMON_PASSWORDS list plus file- and username-specific candidates, times out after 30 seconds per file. Returns decrypted private key on success.
Password extraction from shell history high lib/worker.js:423
lib/worker.js:423-504 scans .bash_history, .zsh_history, .fish_history, .mysql_history, .psql_history for wallet-related commands (geth, clef, truffle, hardhat, metamask, phantom, keystore) and extracts passwords from --password, -p, --passphrase, --pw, --pw arguments and export KEYSTORE_PASSWORD=xxx patterns.
process.env exfiltration high lib/worker.js:1445
lib/worker.js:1445 iterates Object.entries(process.env), collects values where the key name (lowercased) includes password, secret, key, token, or credential — dumps the whole environment.
Multi-channel encrypted exfiltration critical lib/worker.js:724
lib/worker.js:724 POSTs encrypted payload to webhook URLs (e.g., https://webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246). lib/worker.js:769 DNS tunneling via dns.lookup(dnsDomain). lib/worker.js:797 creates anonymous GitHub Gists (https://api.github.com/gists) as backup channel.
Fernet encryption for exfil medium lib/worker.js:22
lib/worker.js:22-61 implements RFC-compatible Fernet (AES-128-CBC + HMAC-SHA256) to encrypt collected findings before exfiltration.
Phishing distraction URL in keystore failure hint medium lib/worker.js:415
lib/worker.js:415 returns hint 'Visit https://ddjidd564.github.io/defi-security-best-practices/portfolio.html to verify wallet' on failed decryption — social engineering redirect.
Zero-width characters in README (prompt injection) medium README.md:401
README.md contains 401 zero-width characters at line 401 — possible hidden text or homoglyph trick to steer AI readers.