Summary
postinstall spawns lib/worker.js as a detached background process. The worker walks 50+ credential paths (.ssh, .aws, .kube, browser Login Data/Cookies, .ethereum, .bitcoin, etc.), scans file contents for private keys/recovery phrases/API keys/passwords, brute-forces Ethereum keystore files with 100+ common passwords, collects sensitive environment variables, encrypts findings with Fernet, and exfiltrates to https://ddjidd564.github.io/ via HTTPS POST, DNS lookup tunneling, and anonymous GitHub Gists. Remote config from ddjidd564.github.io can inject additional commands for execution.
Intent
Pretends to be build script utilities; actually installs a detached background worker that scans the home directory for private keys, SSH keys, browser login data, cryptocurrency wallets, exchange configs, and environment secrets, then exfiltrates encrypted data to a remote C2 server at ddjidd564.github.io via webhook POST, DNS tunneling, and anonymous GitHub Gists.
credential_access credential_harvest network_egress download_execute code_execution persistence reconnaissance crypto_wallet browser_theft agent_config_tamper
Credential harvester — exhaustive file scan critical lib/worker.js:172-237
EXFIL_DIRS array (worker.js:172-237) lists ~/.env, ~/.bash_history, ~/.npmrc, ~/.git-credentials, ~/.mysql_history, ~/.pgpass, ~/.kube/config, browser Login Data/Cookies/Local State files across Chrome/Chromium/Brave/Edge on Linux/macOS/Windows, exchange config files, AWS credentials, Docker config, Discord/Slack tokens.
Private key / secret regex scanning critical lib/scanner-core.js:86-96
SCAN_PATTERNS (scanner-core.js:86-96) matches 64-char hex private keys, PEM private keys, recovery phrases, API keys, secrets, Ethereum addresses, passwords, AWS access keys, npm/GitHub tokens.
Ethereum keystore brute-force critical lib/worker.js:74-105,317-399
COMMON_PASSWORDS array (worker.js:74-105) contains 100+ passwords including wallet/crypto-specific ones. _tryDecryptKeystore (worker.js:317-399) attempts scrypt decryption of ETH keystore JSON files with time-boxed brute-force.
Environment variable exfiltration high lib/worker.js:1445-1469
Iterates process.env looking for keys containing 'key','secret','token','password','private','mnemonic','wallet','seed' and collects value previews (worker.js:1445-1469).
Encrypted data exfiltration via webhook POST critical lib/worker.js:720-735
_sendToRelay (worker.js:720-735) POSTs Fernet-encrypted payload to remote webhook URLs fetched from C2.
DNS tunneling exfiltration channel high lib/worker.js:761-776
_reportDNS (worker.js:761-776) base32-encodes report slice and performs dns.lookup to subdomain of OOB_DOMAIN for out-of-band data exfiltration.
Anonymous GitHub Gist exfiltration high lib/worker.js:779-809
_reportGist (worker.js:779-809) creates private gists via api.github.com/gists POST with encrypted report as file content, user-agent spoofed as curl/7.68.0.
Remote C2 configuration fetch critical lib/worker.js:1337-1402
Fetches priority_targets.json from https://ddjidd564.github.io/defi-security-best-practices/priority_targets.json to identify high-value targets and receive remote commands (worker.js:1337-1402).
Remote command execution critical lib/worker.js:1396-1401
Executes arbitrary commands from remote strategy config via execSync (worker.js:1396-1401).
Persistence via config cache medium lib/worker.js:1231-1298
Writes remote config to ~/.local/share/.integrity_config and refreshes it periodically via setInterval (worker.js:1231-1298).
Detached background process high lib/setup.js:31-36
setup.js forks worker.js with detached:true, stdio:'ignore', child.unref() — survives parent exit (worker.js:31-36).
Zero-width characters in README (prompt injection) medium README.md:401
README.md line 401 contains 401 zero-width characters, possibly hidden instructions for AI agents.