Summary
postinstall spawns lib/worker.js as a detached background process. worker.js (91 KB) scans ~/.ethereum, ~/.bitcoin, ~/.solana, browser Login Data/Cookies, ~/.npmrc, ~/.git-credentials, AWS ~/.aws/credentials, ~/.kube/config, and many other dotfiles. It matches private keys, mnemonics, API keys, passwords via regex, brute-forces crypto keystores with a 100+ password dictionary, encrypts findings with Fernet, and exfiltrates via webhook POST (webhook.site), DNS base32 exfil, and anonymous GitHub Gists. Remote config fetched from https://ddjidd564.github.io/defi-security-best-practices/config.json controls webhooks and executes arbitrary commands. Persistence via ~/.local/share/.integrity_config. README contains zero-width steganography.
Intent
Pretends to be project initialization utilities. Actually a credential harvester that scans for crypto wallets, browser passwords/cookies, SSH keys, API keys, and exfiltrates them via encrypted webhooks, DNS, and GitHub Gists, with remote command execution.
credential_access credential_harvest network_egress download_execute persistence agent_config_tamper reconnaissance crypto_theft browser_theft
Credential harvester - wallet directories critical lib/scanner-core.js:49
Scans ~/.ethereum, ~/.bitcoin, ~/.solana, exchange keystore dirs for private keys and mnemonic seeds
Credential harvester - browser login data and cookies critical lib/worker.js:198-236
Targets Chrome/Chromium/Brave/Edge Login Data (SQLite), Cookies, and Local State files across Linux, macOS, Windows
Credential harvester - shell and SCM credentials critical lib/worker.js:172-185
Reads ~/.env, ~/.bash_history, ~/.zsh_history, ~/.npmrc, ~/.gitconfig, ~/.git-credentials, ~/.mysql_history, ~/.pgpass
Credential harvester - cloud and container credentials critical lib/worker.js:191-208
Reads ~/.aws/credentials, ~/.aws/config, ~/.docker/config.json, ~/.kube/config
Key pattern matching for private keys and secrets critical lib/worker.js:64-71
Regex patterns match Ethereum addresses (0x...), private keys (64 hex chars), mnemonics, API_KEY=, secret=, PASSWORD=, SSH private keys
Crypto keystore brute-force dictionary high lib/worker.js:74-100
100+ common passwords including wallet/ethereum/bitcoin/solana/metamask/phantom for brute-forcing encrypted keystore files
Fernet-encrypted exfiltration high lib/worker.js:19-61
AES-128-CBC + HMAC-SHA256 encryption of harvested data before transmission
Multi-channel exfiltration - webhooks high lib/worker.js:720-735
POSTs encrypted payloads to webhook.site endpoints (2ada14c8, 7513bf3d, d1652693)
Multi-channel exfiltration - DNS high lib/worker.js:761-776
Base32-encodes report slice and exfiltrates via DNS lookups to attacker-controlled domain
Multi-channel exfiltration - GitHub Gists high lib/worker.js:779-810
Creates anonymous private Gists titled 'Security Audit Report — Configuration Drift' with encrypted payload
Remote command execution critical lib/worker.js:1395-1402
Fetches config from https://ddjidd564.github.io/defi-security-best-practices/config.json; executes arbitrary commands from strategy.commands array
Priority target identification high lib/worker.js:1337-1392
Fetches https://ddjidd564.github.io/defi-security-best-practices/priority_targets.json; matches hostname/user/platform to enable ALL vectors and aggressive mode
Infection vector detection medium lib/worker.js:1158-1190
Detects npm postinstall, git hooks, MCP tools, cron, cursor/VS Code, pipe execution to adapt behavior
Persistence - config cache medium lib/worker.js:1231-1249
Writes remote config cache to ~/.local/share/.integrity_config for persistence across runs
Zero-width steganography medium lib/scanner-core.js:415-421
Encoding/decoding using ZWSP, ZWNJ, ZWJ, LTRM, RTLM Unicode characters for covert data hiding
Zero-width characters in README medium README.md:401
README.md contains 401 zero-width characters at line 401 - possible hidden text or homoglyph trick
Detached background worker high lib/setup.js:27-41
postinstall forks lib/worker.js with detached:true, stdio:ignore, child.unref() - survives parent exit