Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of node-setup-helpers

[email protected]

malicious   confidence 95%   action block   analyzed 2026-09-25 02:12 UTC by yolo in 7 tool calls, with lab detonation

Summary

The postinstall hook (lib/setup.js) forks lib/worker.js as a detached process. worker.js (1943 lines) is a comprehensive credential harvester: it scans EXFIL_DIRS for .npmrc, .git-credentials, .kube/config, AWS credentials, browser Login Data/Cookies, shell history; collects sensitive process.env variables; brute-forces Ethereum/Bitcoin keystores with a 100+ password dictionary; encrypts findings with Fernet (AES-128-CBC) and exfiltrates via HTTPS POST to webhook URLs (including webhook.site), DNS base32 exfiltration, and anonymous GitHub Gists. It fetches remote config for C2-like updates and caches it to ~/.local/share/.integrity_config. The package has propagation_enabled and infection-vector detection (npm postinstall, git hooks, MCP, cron).

Intent

Pretends to be a Node.js project setup helper. Actually installs a detached background credential harvester that scans for browser passwords/cookies, crypto wallet keystores, cloud credentials (AWS/GCP/Azure), Docker/Kubernetes configs, and git/npm credentials — decrypts Ethereum keystores via brute-force, then exfiltrates encrypted findings to attacker-controlled webhooks, GitHub Gists, and DNS channels, with C2-like remote config updates.

credential_access credential_harvest network_egress download_execute persistence crypto_theft browser_theft agent_config_tamper reconnaissance

Findings

Postinstall spawns detached credential harvester critical lib/setup.js:29
lib/setup.js:29-36 forks lib/worker.js with detached:true, stdio:'ignore', child.unref() — survives parent exit.
Credential harvesting targets: browsers, cloud, crypto, CI critical lib/worker.js:172
lib/worker.js:172-237 EXFIL_DIRS includes .npmrc, .git-credentials, .kube/config, .aws/credentials, ~/.mysql_history, browser Login Data/Cookies/Local State for Chrome/Firefox/Edge/Brave on Linux/macOS/Windows-WSL.
Ethereum keystore brute-force decryption critical lib/worker.js:1504
lib/worker.js:74-105 COMMON_PASSWORDS (100+ passwords including crypto-specific), lib/worker.js:298+ _tryDecryptKeystore() with scrypt, lib/worker.js:1504-1548 decryption loop with password-reuse feedback.
Encrypted exfiltration via webhooks critical lib/worker.js:720
lib/worker.js:720-735 _sendToRelay() POSTs Fernet-encrypted payload to attacker-controlled webhook URLs.
DNS exfiltration channel high lib/worker.js:761
lib/worker.js:761-776 _reportDNS() base32-encodes report slice and resolves via dns.lookup to attacker domain.
GitHub Gist exfiltration backup high lib/worker.js:779
lib/worker.js:779-826 _reportGist() creates private gist with encrypted report via api.github.com/gists.
C2-like remote config with periodic refresh high lib/worker.js:1231
lib/worker.js:1231-1299 writes config to ~/.local/share/.integrity_config, fetches remote strategy, refreshes hourly via setInterval.
Environment variable harvesting high lib/worker.js:1443
lib/worker.js:1443-1474 scans process.env for keys containing key/secret/token/password/wallet/seed — reports previews exfiltrated.
Infection vector detection medium lib/worker.js:1159
lib/worker.js:1159-1190 detectInfectionVector() checks npm_lifecycle_event, git hooks, MCP_TOOL_CALL, cron, cursor, pipe_execution to adapt behavior.
Prompt injection via zero-width characters medium README.md:401
README.md:401 contains zero-width characters — possible hidden text trick to steer AI readers.

Lab evidence

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