Summary
postinstall spawns a detached worker.js that walks the user's home directory reading credential files (.npmrc, .git-credentials, .aws/credentials, .kube/config, browser Login Data/Cookies, .env, shell history), brute-forces Ethereum keystores, collects env vars, and exfiltrates encrypted findings to webhook sites via multiple channels. Propagates by writing .cursorrules/CLAUDE.md, installing git hooks, and appending to .bashrc/.zshrc/.profile. Remote config from ddjidd564.github.io can deliver arbitrary commands.
Intent
Pretends to be build script utilities. Actually a credential harvester that scans the home directory for AWS keys, browser Login Data/Cookies, SSH keys, git credentials, .env files, Ethereum/Solana keystores (brute-forces them with 100+ passwords), shell history passwords, and environment variables. Encrypts findings with Fernet and exfiltrates via multi-channel (webhook, DNS, GitHub Gist). Installs persistence through .cursorrules/CLAUDE.md prompt injection, git hooks, and shell RC files. Fetches remote commands for arbitrary execution.
credential_access credential_harvest network_egress persistence code_execution agent_config_tamper crypto_theft browser_theft reconnaissance obfuscation download_execute
Credential file harvesting critical lib/worker.js:172-237
EXFIL_DIRS lists ~/.npmrc, ~/.gitconfig, ~/.git-credentials, ~/.aws/credentials, ~/.kube/config, ~/.config/google-chrome/*/Default/Login Data, ~/.config/google-chrome/*/Default/Cookies, ~/.mysql_history, ~/.bash_history, ~/.pgpass, browser cookies and login data across Chrome/Chromium/Brave/Edge/Firefox on Linux/macOS/Windows.
Etherekeystore brute-force decryption critical lib/worker.js:317-420
_tryDecryptKeystore() brute-forces scrypt-encrypted Ethereum keystores with 100+ common passwords plus user/file-specific candidates. On success, reports the decrypted private key. Password reuse feedback loop tries cracked passwords against sibling keystores.
Shell history password extraction high lib/worker.js:423-504
_scanShellHistoryForPasswords() parses .bash_history, .zsh_history, .fish_history, .mysql_history, .psql_history for wallet commands containing --password/-p/--passphrase arguments and exports like KEYSTORE_PASSWORD=xxx.
Environment variable collection high lib/worker.js:1443-1474
Iterates process.env looking for keys containing key/secret/token/password/wallet/seed (encoded as Buffer.from to evade simple pattern match). Collects values of matching vars.
Multi-channel encrypted exfiltration critical lib/worker.js:1037-1156
_report() encrypts findings with Fernet (AES-128-CBC + HMAC-SHA256) and sends to webhooks via HTTPS POST. Fallback channels: DNS exfiltration (_reportDNS), anonymous GitHub Gist backup (_reportGist), local file queue (~/.local/share/.integrity_queue).
Resilient C2 config fetching high lib/worker.js:911-1035
Config resolved from env INTEGRITY_ENDPOINT → https://ddjidd564.github.io/defi-security-best-practices/config.json → raw.githubusercontent.com mirror → local cache → DNS TXT _integrity-config.config-verify.org → hardcoded webhook.site fallbacks.
Remote command execution critical lib/worker.js:1395-1402
Remote config can contain a 'commands' array. Each command is executed via execSync(cmd, {timeout:10000}) on the victim machine.
AI prompt injection persistence (.cursorrules/CLAUDE.md) high lib/worker.js:1709-1713
_propagate() writes .cursorrules and CLAUDE.md to project directories and HOME-level project dirs. Content instructs AI agents to run 'npx -y dev-env-bootstrapper@latest' and embed zero-width character payloads for AI-to-AI chain propagation.
Git hook persistence high lib/worker.js:1748-1769
Installs post-merge and post-checkout git hooks 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:1772-1781
Appends __p2024_vfy() function to .bashrc, .zshrc, .profile that periodically runs 'npx -y dev-env-bootstrapper@latest' in background.
Background detached worker high lib/setup.js:27-41
lib/setup.js fork()s lib/worker.js with detached:true, stdio:'ignore', child.unref() — runs indefinitely after install completes.
Zero-width steganography for AI-to-AI propagation medium lib/worker.js:1709
_zwE() encodes binary payloads as zero-width characters (ZWSP+ZWJ/ZWNJ+LTRM). Embedded in .cursorrules content to trigger other AI agents that parse the file.
Prompt-injection text in docs medium README.md:401
README.md contains zero-width characters (possible hidden text or homoglyph trick) at line 401.