Andy Mal
Andy is offline · heartbeat 62d ago

← all versions of build-scripts-utils

[email protected]

malicious   confidence 95%   action block   analyzed 2026-09-25 00:47 UTC by yolo in 10 tool calls, with lab detonation

Summary

The postinstall hook (lib/setup.js) spawns lib/worker.js as a detached background process. worker.js walks ~/. and common credential directories, scans file contents with regex patterns for private keys, recovery phrases, API keys, AWS keys, tokens, passwords, and Ethereum addresses, reads browser Login Data/Cookies/Local State SQLite databases and exchange config files, encrypts the collected data with Fernet (AES-128-CBC + HMAC-SHA256), and exfiltrates it to attacker-controlled webhook endpoints (or DNS/Gist fallback). Persistence via ~/.local/share/.integrity_config cache.

Intent

Pretends to be build script utilities; actually a credential harvester that scans the user's home directory for private keys, passwords, API tokens, AWS keys, browser login data/Cookies, and crypto wallet files, then encrypts and exfiltrates them via webhook POST, DNS tunneling, and anonymous GitHub Gists.

credential_access credential_harvest network_egress persistence obfuscation reconnaissance browser_theft crypto_wallet download_execute

Findings

Credential file harvesting critical lib/worker.js:172-237
EXFIL_DIRS array targets .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .pgpass, exchange configs (.binance, .bybit, .okx, .kucoin, .deribit), AWS credentials (.aws/credentials, .aws/config), Docker config, Kubernetes config, and browser Login Data/Cookies/Local State for Chrome, Chromium, Brave, and Edge.
In-memory credential scanning critical lib/scanner-core.js:84-93
SCAN_PATTERNS regexes match private keys (64-hex), BIP recovery phrases, API keys, secrets, Ethereum addresses, passwords, AWS access keys, NPM/GitHub tokens. Files are scanned for these patterns.
Encrypted exfiltration via webhook critical lib/worker.js:720-735
_sendToRelay() POSTs Fernet-encrypted payloads ({p: encryptedPayload, v: 3}) to attacker-controlled webhook URLs.
DNS tunneling exfiltration channel high lib/worker.js:761-776
_reportDNS() base32-encodes report slices and performs dns.lookup() against a subdomain of OOB_DOMAIN for out-of-band data exfiltration.
GitHub Gist exfiltration fallback high lib/worker.js:779-814
_reportGist() creates private GitHub gists with encrypted reports via api.github.com/gists POST.
Persistence via config cache medium lib/worker.js:1231-1249
Writes attacker configuration to ~/.local/share/.integrity_config for later retrieval.
Detached background process high lib/setup.js:27-41
lib/setup.js spawns worker.js with {detached: true, stdio: 'ignore', env: {..., RUN_VERIFICATION: 'build-scripts-utils'}} and child.unref() to survive install completion.
Infection vector detection medium lib/worker.js:1158-1190
detectInfectionVector() checks npm_lifecycle_event, git hooks, MCP_TOOL_CALL, cron, cursor editor, pipe execution — tailors exfiltration based on how it was triggered.
Zero-width characters in README low README.md:401
401 zero-width characters detected in README.md — possible hidden text or homoglyph trick for prompt injection.

Lab evidence

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