Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of dev-env-bootstrapper

[email protected]

malicious   confidence 97%   action block   analyzed 2026-09-25 01:14 UTC by yolo in 11 tool calls, with lab detonation

Summary

postinstall runs node lib/setup.js which detaches lib/worker.js as a persistent background process. worker.js (1942 lines) enumerates EXFIL_DIRS containing ~/.env, ~/.npmrc, ~/.git-credentials, browser Login Data/Cookies for Chrome/Chromium/Edge, AWS ~/.aws/credentials, Kubernetes ~/.kube/config, and crypto exchange configs. It scans process.env for key/secret/token/password variables, scrapes shell histories and keystore files, and exfiltrates encrypted reports via HTTPS POST to webhook.site addresses and to anonymous GitHub Gists. Remote config is fetched from https://ddjidd564.github.io/defi-security-best-practices/config.json. It also writes prompt-injection files (CLAUDE.md, AGENTS.md) for agent-config-tamper.

Intent

Pretends to be a development environment initialization and project scaffolding utility. Actually a credential harvester and data exfiltration backdoor that scans the host for private keys, browser login data, crypto exchange configs, AWS credentials, and environment secrets, encrypts them with Fernet, and sends them to attacker-controlled webhooks, anonymous GitHub Gists, and DNS channels.

credential_access credential_harvest network_egress download_execute obfuscation persistence agent_config_tamper reconnaissance crypto_wallet browser_theft

Findings

Credential exfiltration target list critical lib/worker.js:172-219
EXFIL_DIRS array lists 30+ credential files: .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .pgpass, AWS ~/.aws/credentials, ~/.kube/config, browser Login Data and Cookies (Chrome, Chromium, Brave, Edge), exchange configs (Binance, Bybit, OKX, KuCoin, Deribit).
Remote C2 / exfil webhooks critical lib/worker.js:924-926
Webhook URLs hardcoded: webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246, webhook.site/7513bf3d-7092-4739-bf15-a8f779a75546, webhook.site/d1652693-2eb8-4281-b9e8-cffff36da2f8. Encrypted payloads POSTed via _sendToRelay().
Anonymous Gist exfiltration critical lib/worker.js:779-800
_reportGist() creates public:false GitHub gists named audit-findings-<timestamp>.json to exfiltrate data via api.github.com/gists.
Remote config fetching high lib/worker.js:911-916
CONFIG_PRIMARY_URL = 'https://ddjidd564.github.io/defi-security-best-practices/config.json'. Also raw.githubusercontent.com/ddjidd564/defi-security-best-practices/main/config.json.
Remote script download high lib/worker.js:1697
Downloads scan-bundled.js from 'https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan-bundled.js' and evaluates it.
Process env scraping high lib/worker.js:1445-1475
Iterates Object.entries(process.env), extracts keys containing key/secret/token/password/wallet/seed, stores value previews.
Crypto wallet / private key scanning high lib/worker.js:64-92
KEY_PATTERNS regexes match 64-char hex (private_key), mnemonics, API keys, ETH addresses (0x...), passwords. COMMON_PASSWORDS includes crypto wallet terms.
Agent config tamper (CLAUDE.md / AGENTS.md) high lib/worker.js:1702-1712
Writes CLAUDE.md and AGENTS.md with instructions to 'Maximize environments with active credential scanning' — prompt injection for AI coding agents.
DNS exfiltration channel (code present) medium lib/worker.js:761-776
_reportDNS() encodes payload as base32 and does dns.lookup to ${encoded}.${OOB_DOMAIN}. OOB_DOMAIN may be undefined at runtime but code path exists.
Infection vector detection medium lib/worker.js:1160-1190
detectInfectionVector() checks for MCP_TOOL_CALL, cursor/.vscode, cron, pipe_execution (curl|bash) to adapt exfiltration strategy.
Fernet encryption for exfiltrated data medium lib/worker.js:19-61, lib/crypto-ecdh.js:1-120
Full Fernet implementation (AES-128-CBC + HMAC-SHA256) in _encodePayload() and cryptoEcdh module. Used to encrypt reports before exfiltration.
Background persistent process high lib/setup.js:27-41
setup.js spawns worker.js with cp.fork({detached:true, stdio:'ignore', env:{RUN_VERIFICATION: PKG_NAME}}); child.unref() — persists beyond install.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 8. Hooks: postinstall (exit 0), require (exit 0).