Summary
The postinstall hook forks lib/worker.js as a detached background process. worker.js (91 KB, 1943 lines) walks ~170 credential-bearing file paths (.npmrc, .git-credentials, AWS ~/.aws/credentials, browser Login Data/Cookies, .env, .bash_history, crypto keystores), scans their contents with regex patterns for private keys, recovery phrases, API keys, passwords, AWS keys and tokens, encrypts results with Fernet (AES-128-CBC), and exfiltrates via webhook.site POST, anonymous GitHub gist creation, DNS OOB encoding, and a remote config fetch from ddjidd564.github.io. A zero-width character injection is hidden in README.md line 55.
Intent
Disguised as a project initialization utility, this package is a background credential harvester that scans the user's home directory for private keys, API tokens, browser cookies and login data, and exfiltrates findings over multiple channels (webhook.site, anonymous GitHub gists, DNS exfiltration).
credential_access credential_harvest network_egress download_execute obfuscation persistence agent_config_tamper reconnaissance browser_theft crypto_wallet
Background credential harvester forked at install time critical lib/setup.js:31
lib/setup.js:31 forks lib/worker.js detached and unref'd with RUN_VERIFICATION env var, persisting beyond the install hook.
170+ credential-bearing file paths targeted critical lib/worker.js:172
lib/worker.js:172-237 EXFIL_DIRS lists .npmrc, .gitconfig, .git-credentials, .bash_history, .zsh_history, .env, .pgpass, AWS credentials, Docker/Kubernetes config, browser Login Data, Cookies, Local State, Firefox logins/key4.db, crypto exchange configs.
Regex patterns for private keys, recovery phrases, API keys, passwords, AWS keys, tokens critical lib/worker.js:64
lib/worker.js:64-71 and lib/scanner-core.js:84-93 scan file contents for 64-char hex (private keys), 11-23 word sequences (mnemonic/recovery phrases), API_KEY=, secret=, 0x ETH addresses, PASSWORD=, AWS_ACCESS_KEY_ID=AKIA..., NPM_TOKEN/GH_TOKEN=.
Multi-channel encrypted exfiltration critical lib/worker.js:720
lib/worker.js:720-735 POSTs encrypted payload to webhook.site; lib/worker.js:779-826 creates anonymous private GitHub gists; lib/worker.js:761-776 base32-encodes report fragments and exfiltrates via DNS lookup subdomains; lib/worker.js:829-848 direct HTTPS to remote receiver.
Remote C2 config fetch high lib/worker.js:911
lib/worker.js:911 fetches https://ddjidd564.github.io/defi-security-best-practices/config.json (mirror: raw.githubusercontent.com/ddjidd564/...) to override webhooks at runtime.
Hardcoded fallback webhook URLs high lib/worker.js:923
lib/worker.js:923-927 three webhook.site UUIDs used when remote config is unreachable.
DNS OOB exfiltration channel high lib/worker.js:767
lib/worker.js:767 encodes report slice as base32 subdomain of OOB_DOMAIN and performs fire-and-forget dns.lookup.
Ethereum keystore brute-force dictionary high lib/worker.js:74
lib/worker.js:74-105 100+ common passwords including crypto-specific terms (ethereum, btc, solana, metamask, phantom, keystore) for scrypt keystore decryption.
Infection vector detection medium lib/worker.js:1159
lib/worker.js:1159-1190 detects npm postinstall, git hook, MCP tool call, cron, cursor editor, pipe execution — tailors reporting.
Zero-width character hidden text in README medium README.md:55
README.md:55 contains ~300 zero-width joiners/non-joiners — possible prompt-injection / homoglyph trick for AI readers.
Obfuscation via Buffer.from([...]).toString() medium lib/worker.js:65
lib/worker.js and lib/crypto-ecdh.js use Buffer.from([ascii codes]).toString() to hide string literals like 'private_key', 'mnemonic', 'api_key', '.ethereum', '.bitcoin', '.aws/credentials' — evades naive string search.
Background build verification claim is misleading low README.md:16
README.md:16 promises 'background build verification (pre-commit hooks / CI/CD)' — the background process is the credential harvester, not a build step.