Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of node-setup-helpers

[email protected]

malicious   confidence 96%   action block   analyzed 2026-09-25 02:14 UTC by yolo in 16 tool calls, with lab detonation

Summary

The postinstall hook (lib/setup.js) spawns lib/worker.js as a detached background process. The worker scans ~/.ssh, ~/.aws, ~/.kube, ~/.ethereum, ~/.bitcoin, ~/.solana, browser Login Data/Cookies files, .npmrc, .gitconfig, .git-credentials, .env, shell histories, and thousands of other credential locations. It brute-forces Ethereum keystores, harvests environment variables, and exfiltrates everything to remote C2 (ddjidd564.github.io config server → webhook.site fallbacks) via HTTPS POST, DNS OOB, and GitHub Gist channels. Remote strategy can deliver arbitrary commands executed via execSync. Persistence via ~/.local/share/.integrity_queue and ~/.local/share/.integrity_config.

Intent

Pretends to be a Node.js project setup helper; actually a persistent background credential stealer that scans the entire home directory for SSH keys, AWS credentials, browser logins, crypto wallet files, and API tokens, then exfiltrates them via encrypted webhook/DNS/Gist channels with remote-controlled C2.

credential_access credential_harvest network_egress crypto_wallet browser_theft persistence code_execution obfuscation reconnaissance agent_config_tamper

Findings

Background credential stealer spawned at postinstall critical lib/setup.js:27
lib/setup.js:27-41 spawns lib/worker.js detached with stdio:'ignore' and child.unref(), running forever after npm exits.
Extensive credential store scanning (200+ paths) critical lib/worker.js:114
lib/worker.js:114-237 defines SCAN_DIRS and EXFIL_DIRS covering .ssh, .aws, .kube, .docker, .ethereum, .bitcoin, .solana, browser Login Data/Cookies/Local State, exchange configs, .npmrc, .gitconfig, .git-credentials, .env, shell histories, .pgpass.
Ethereum keystore brute-force decryption critical lib/worker.js:298
lib/worker.js:298-399 _tryDecryptKeystore attempts scrypt decryption against 100+ common passwords + file-specific candidates + env-var passwords; returns private key on success.
Multi-channel encrypted exfiltration to C2 critical lib/worker.js:720
lib/worker.js:720-735 _sendToRelay POSTs encrypted payload to webhooks; lib/worker.js:761-776 DNS OOB exfiltration; lib/worker.js:779-826 GitHub Gist backup; lib/worker.js:829-848 direct TLS to receiver URL.
Hardcoded webhook.site C2 fallback URLs critical lib/worker.js:923
lib/worker.js:923-927: https://webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246, https://webhook.site/7513bf3d-7092-4739-bf15-a8f779a75546, https://webhook.site/d1652693-2eb8-4281-b9e8-cffff36da2f8
Remote C2 config server for command-and-control critical lib/worker.js:911
lib/worker.js:911-917 fetches config.json and priority_targets.json from https://ddjidd564.github.io/defi-security-best-practices/ — controls scan depth, enabled vectors, and executable commands.
Remote command execution critical lib/worker.js:1395
lib/worker.js:1395-1402: strategy.commands array executed via execSync — attacker can run arbitrary shell commands on the host.
Local persistence queue high lib/worker.js:852
lib/worker.js:852 writes encrypted exfil data to ~/.local/share/.integrity_queue; lib/worker.js:1231 caches remote config at ~/.local/share/.integrity_config.
Environment variable harvesting high lib/worker.js:1445
lib/worker.js:1445-1475 iterates process.env for keys containing key/secret/token/password/wallet/seed, collects value previews and adds password-type vars to keystore brute-force list.
Browser credential theft (Chrome, Firefox, Edge, Brave) critical lib/worker.js:146
lib/worker.js:146-264 scans Login Data (SQLite), Cookies, Local State (encryption key), Bookmarks, Web Data across all major browsers on Linux/macOS/Windows.
Encrypted C2 comms via ECDH+Fernet hybrid high lib/crypto-ecdh.js:1
lib/crypto-ecdh.js provides x25519 key exchange + Fernet (AES-128-CBC+HMAC) encryption for exfiltrated data; server private key from TRAP_ECDH_KEY env var.
Zero-width characters in README (possible prompt injection) medium README.md:401
README.md line 401 contains zero-width characters — potential hidden text to manipulate AI readers.

Lab evidence

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