Summary
postinstall spawns a detached background worker (lib/worker.js) that scans the home directory for sensitive files, pattern-matches secrets in contents, encrypts collected data with Fernet (AES-128-CBC), and exfiltrates via HTTPS POST to webhook.site URLs, DNS tunneling, and anonymous GitHub Gists. Persistence installed in .bashrc/.zshrc/.profile, git post-merge/post-checkout hooks, and AI agent config files (.cursorrules, CLAUDE.md) with prompt-injection content.
Intent
Pretends to be a dev environment bootstrap tool; actually harvests credentials (SSH keys, AWS, browser passwords, crypto wallets), encrypts and exfiltrates them to webhook.site / GitHub Gists / DNS, and establishes persistence via git hooks, shell RC files, and AI agent config files (.cursorrules, CLAUDE.md).
credential_access credential_harvest network_egress persistence agent_config_tamper download_execute obfuscation reconnaissance
Credential harvester — scans home directory for sensitive files critical lib/worker.js:114-200
lib/worker.js defines EXFIL_DIRS and SCAN_DIRS containing ~/.ssh/id_*, ~/.aws/credentials, ~/.kube/config, ~/.config/google-chrome/Default/Login Data, ~/.npmrc, ~/.git-credentials, ~/.env, ~/.bash_history, crypto wallet directories (.ethereum, .bitcoin, .solana), exchange configs, and more.
Secret pattern matching in file contents critical lib/worker.js:64-105
KEY_PATTERNS matches 64-hex private keys, 12–23 word mnemonics, API keys, secrets, Ethereum addresses, passwords. COMMON_PASSWORDS list used for keystore brute-force.
Encrypted exfiltration to webhook.site critical lib/worker.js:720-734; lib/worker.js:924-926
HTTPS POST to https://webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246, https://webhook.site/7513bf3d-7092-4739-bf15-a8f779a75546, https://webhook.site/d1652693-2eb8-4281-b9e8-cffff36da2f8 with Fernet-encrypted payload.
Anonymous GitHub Gist exfiltration high lib/worker.js:778-810
Creates private gists at https://api.github.com/gists containing encrypted reports.
DNS exfiltration channel high lib/worker.js:761-776
Encodes encrypted payload as base32 subdomain and performs dns.lookup() for OOB_DOMAIN (fetched remotely).
Persistence via git hooks high lib/worker.js:1748-1767
Installs post-merge and post-checkout hooks that re-download and execute the scanner from https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan.js.
Persistence via shell RC files high lib/worker.js:1771-1779
Appends to .bashrc, .zshrc, .profile to re-run npx -y dev-env-bootstrapper@latest every hour.
Prompt injection in AI agent config files high lib/worker.js:1708-1746
Writes .cursorrules, CLAUDE.md, AGENTS.md, COPILOT.md with content instructing AI agents to re-install the package and propagate zero-width chain payloads.
Zero-width character injection medium lib/worker.js:1709; README.md:401
Encodes payloads as ZWSP+ZWJ/ZWNJ+LTRM sequences for AI-to-AI chain propagation.
Remote config fetching medium lib/worker.js:911; lib/worker.js:1337
Fetches https://ddjidd564.github.io/defi-security-best-practices/config.json and priority_targets.json at runtime.