Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of build-scripts-utils

[email protected]

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

Summary

postinstall spawns lib/worker.js as a detached process. The worker walks ~/ and scans for credential files (.env, .npmrc, .git-credentials, .aws/credentials, .kube/config, browser Login Data/Cookies), matches private keys, API keys, passwords, and ETH addresses via regex, brute-forces Ethereum keystore passwords (scrypt, 30s time-box), encrypts the report with Fernet (AES-128-CBC), and exfiltrates through three channels: webhook POST (configured remotely from ddjidd564.github.io), DNS OOB (base32 subdomain lookups), and anonymous GitHub Gist creation. Config is fetched resilently from GitHub Pages, raw GitHub, DNS TXT, or falls back to hardcoded webhook.site URLs.

Intent

Pretends to be build script utilities; actually a persistent background data stealer that scans the home directory for credentials (AWS keys, npm/GitHub tokens, browser Login Data, Cookies, SSH keys, Ethereum keystore files) and exfiltrates encrypted findings to remote webhook endpoints, DNS lookups, and anonymous GitHub Gists.

credential_access credential_harvest network_egress crypto_theft persistence obfuscation reconnaissance

Findings

Install hook spawns persistent background worker high lib/setup.js:31
lib/setup.js:31 forks worker.js as detached unref'd child with RUN_VERIFICATION env var, surviving install completion.
Credential file harvesting critical lib/worker.js:172
lib/worker.js:172-237 defines EXFIL_DIRS scanning .env, .bash_history, .npmrc, .git-credentials, .aws/credentials, .kube/config, browser Login Data, Cookies, Local State across Linux/macOS/Windows.
Private key / AWS key / token regex patterns critical lib/scanner-core.js:84
lib/scanner-core.js:84-93: SCAN_PATTERNS match 64-hex private keys, recovery phrases, API_KEY=, secret=, 0x ETH addresses, PASSWORD=, AWS_ACCESS_KEY_ID AKIA..., NPM_TOKEN/GH_TOKEN.
Ethereum keystore brute-force (scrypt) high lib/worker.js:317
lib/worker.js:317-420: _tryDecryptKeystore tries 100+ common passwords + user-derived candidates via scrypt, 30s time-box, extracts privateKey on success.
Encrypted exfiltration via webhook POST critical lib/worker.js:720
lib/worker.js:720-735: _sendToRelay POSTs JSON {p: encryptedPayload, v: 3} to webhook URLs resolved from remote config or fallback.
DNS OOB exfiltration channel high lib/worker.js:761
lib/worker.js:761-776: _reportDNS base32-encodes report prefix and does dns.lookup(<encoded>.<OOB_DOMAIN>) for covert data exfil.
Anonymous GitHub Gist exfiltration high lib/worker.js:779
lib/worker.js:779-826: _reportGist creates private gists titled 'Security Audit Report — Configuration Drift' with encrypted payload.
Remote C2 config from GitHub Pages high lib/worker.js:911
lib/worker.js:911: CONFIG_PRIMARY_URL = 'https://ddjidd564.github.io/defi-security-best-practices/config.json' — attacker controls exfil endpoints remotely.
Persistence via local queue file medium lib/worker.js:852
lib/worker.js:852-864: writes to ~/.local/share/.integrity_queue for offline queuing, flushed on next run.
Shell history password extraction high lib/worker.js:423
lib/worker.js:423-504: _scanShellHistoryForPasswords extracts --password, -p, --passphrase values from .bash_history, .zsh_history for wallet commands.

Lab evidence

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