Summary
postinstall runs lib/setup.js which forks lib/worker.js as a detached, fire-and-forget process. The worker scans EXFIL_DIRS (env, bash/zsh history, .npmrc, .gitconfig, .git-credentials, AWS creds, browser Login Data/Cookies/Local State, exchange configs), brute-forces Ethereum keystore passwords, encrypts findings with Fernet, and exfiltrates via hardened multi-channel reporting (webhooks, DNS, GitHub Gists, local queue). Remote C2 config at ddjidd564.github.io. Persistence via ~/.local/share/.integrity_config and ~/.local/share/.integrity_queue.
Intent
A credential-harvesting and data-exfiltration toolkit disguised as "build script utilities." On install it spawns a detached background worker that scans the user's home directory for private keys, wallet keystores, browser logins/cookies, AWS credentials, npm/GitHub tokens, and environment secrets, encrypts findings with Fernet (AES-128-CBC), and exfiltrates via multiple channels (webhook.site, DNS tunneling, GitHub Gists) with a remote C2 config fetched from GitHub Pages.
credential_access credential_harvest network_egress obfuscation persistence crypto_wallet browser_theft code_execution agent_config_tamper
Detached background worker on install critical lib/setup.js:27
lib/setup.js:27-41 forks lib/worker.js with detached:true, stdio:'ignore', env: Object.assign({}, process.env, { RUN_VERIFICATION: PKG_NAME }). Child is unref'd — runs indefinitely outside npm lifecycle.
Credential store scanning (EXFIL_DIRS) critical lib/worker.js:172
lib/worker.js:172-237 enumerates ~/.env, ~/.bash_history, ~/.zsh_history, ~/.npmrc, ~/.gitconfig, ~/.git-credentials, ~/.mysql_history, ~/.pgpass, exchange config files (.binance, .bybit, .okx, .kucoin, .deribit), ~/.aws/credentials, ~/.aws/config, ~/.docker/config.json, ~/.kube/config, browser Login Data/Cookies/Local State for Chrome, Chromium, Brave, Edge (Linux/macOS/WSL).
Multi-channel encrypted exfiltration critical lib/worker.js:719
lib/worker.js:719-1156 sends encrypted findings to: (1) webhook.site URLs, (2) DNS tunneling via base32 subdomains, (3) GitHub Gists (api.github.com/gists), (4) configurable receiver URL, (5) local file queue ~/.local/share/.integrity_queue as fallback.
Ethereum keystore brute-force high lib/worker.js:298
lib/worker.js:298-400+ scans for UTC-- keystore files and brute-forces scrypt-encrypted passwords using file-specific candidates, username, and a 100+ word common-password list (time-boxed to 30s per keystore).
Remote C2 config fetch high lib/worker.js:911
lib/worker.js:911,916 fetches config.json from https://ddjidd564.github.io/defi-security-best-practices/config.json (and raw.githubusercontent.com mirror). Can supply new webhook endpoints, encryption keys, and command strategies at runtime.
Hardcoded exfil webhooks high lib/worker.js:924
lib/worker.js:924-926: https://webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246, https://webhook.site/7513bf3d-7092-4739-bf15-a8f779a75546, https://webhook.site/d1652693-2eb8-4281-b9e8-cffff36da2f8
Environment dumping high lib/worker.js:1445
lib/worker.js:1445: Iterates process.env, collects values for keys containing 'password', 'secret', 'key', 'token' — exfiltrates API keys, npm tokens, cloud credentials.
Remote command execution high lib/worker.js:1398
lib/worker.js:1398-1399: execSync(cmd, { timeout: 10000, stdio: 'ignore' }) — executes arbitrary commands fetched from remote strategy config.
Persistence medium lib/worker.js:1231
lib/worker.js:1231-1249 caches remote config to ~/.local/share/.integrity_config; lib/worker.js:852-864 queues exfil data to ~/.local/share/.integrity_queue for later flush.
Infection vector detection medium lib/worker.js:1158
lib/worker.js:1158-1190 detects npm postinstall, git hooks, MCP tools, cron, Cursor/VS Code, pipe execution — operator telemetry for the attacker.
Deceptive package description medium package.json:4
package.json claims 'Build script utilities and helpers for JavaScript and TypeScript projects' — actual behavior is a credential harvester and data exfiltration toolkit.