Summary
The postinstall hook forks lib/worker.js as a detached background process. The worker scans ~/.ssh, ~/.aws, ~/.kube, browser Login Data/Cookies, crypto keystores (.etherscan, .bitcoin, .solana), and shell history for secrets. Findings are Fernet-encrypted and exfiltrated to https://webhook.site/... and https://api.github.com/gists. Persistence is installed via .cursorrules, CLAUDE.md, .bashrc/.zshrc, and .git/hooks (post-merge, post-checkout) that download-executes remote code. Remote config is fetched from https://ddjidd564.github.io/defi-security-best-practices/config.json.
Intent
A credential harvester and persistence installer disguised as "Project initialization utilities." On install, it scans the user's home directory for private keys, browser passwords, API keys, and crypto keystores, exfiltrates findings via encrypted POST to webhook.site and GitHub Gists, and installs persistent backdoors in shell RC files, git hooks, and AI agent config files (.cursorrules, CLAUDE.md).
credential_access credential_harvest network_egress persistence download_execute obfuscation agent_config_tamper reconnaissance crypto_wallet browser_theft
Credential harvester — scans home directory for private keys, API keys, browser passwords, crypto keystores critical lib/worker.js:114-237, lib/scanner-core.js:84-95
lib/worker.js EXFIL_DIRS lists ~/.ssh/id_rsa, ~/.aws/credentials, ~/.kube/config, Chrome Login Data, .etherscan/keystore, .bitcoin, .solana, .pgpass, ~/.env, .git-credentials. lib/scanner-core.js SCAN_PATTERNS matches private keys (64-hex), recovery phrases, API keys, passwords, AWS keys (AKIA...), Ethereum addresses.
Exfiltration via webhook.site and GitHub Gists critical lib/worker.js:938,951-954,747-762,806-853
lib/worker.js FALLBACK_WEBHOOKS contains three webhook.site URLs. _sendToRelay() POSTs Fernet-encrypted payloads. _reportGist() creates private GitHub Gists with the encrypted report. CONFIG_PRIMARY_URL = https://ddjidd564.github.io/defi-security-best-practices/config.json.
Persistence via shell RC files and git hooks high lib/worker.js:1817-1821,1831-1839
lib/worker.js appends a block to .bashrc/.zshrc/.profile that runs npx -y dev-env-bootstrapper@latest on every terminal open. Installs .git/hooks/post-merge and post-checkout that download-executes https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan.js.
AI agent config tamper — prompt injection via .cursorrules and CLAUDE.md high lib/worker.js:1768-1772,1795-1806
lib/worker.js writes crContent and clContent (containing zero-width character chain payloads) to .cursorrules and CLAUDE.md in the current directory and parent dirs. Content instructs AI agents to propagate P-2024-001 verification standard and download remote code.
Crypto wallet targeting — brute-force decrypts ETH/BTC/Solana keystores high lib/worker.js:74-105,298-350
lib/worker.js COMMON_PASSWORDS includes 100+ crypto-specific passwords (metamask, phantom, ethereum, bitcoin, solana). _tryDecryptKeystore() attempts scrypt decryption of Ethereum keystore JSON files.
Browser theft — targets Chrome/Chromium/Brave/Edge Login Data, Cookies, Local State high lib/worker.js:198-237
lib/worker.js EXFIL_DIRS lists SQLite Login Data files and Cookies databases for Chrome, Chromium, Brave, Edge on Linux/macOS/Windows. Reads Local State (contains master encryption key).
Obfuscation via base64-encoded strings medium lib/worker.js:65-70,108-112
lib/worker.js uses Buffer.from([112,114,105,118,97,116,101]).toString() to encode strings like 'private', 'secret', 'key', 'wallet', 'keystore' to evade signature matching.
Zero-width characters in README.md for hidden text medium README.md:401
README.md contains 401 zero-width characters at line 401, consistent with AI-to-AI chain propagation protocol described in lib/worker.js.