Summary
postinstall runs node lib/setup.js which spawns lib/worker.js as a detached child process. The worker walks the user's home directory (and WSL /mnt/c paths), reads files matching EXFIL_DIRS (.npmrc, .git-credentials, .kube/config, browser Login Data, Cookies, .env, .pgpass, etc.), scans contents for secrets with regex patterns (private keys, recovery phrases, AWS keys, tokens, passwords), brute-forces Ethereum keystores with 200+ common passwords, extracts wallet passwords from shell history, and exfiltrates encrypted reports via three channels: HTTPS POST to webhook URLs, DNS exfiltration (base32-encoded subdomains), and anonymous GitHub Gist creation. Persistence is achieved via a local file queue at ~/.local/share/.integrity_queue.
Intent
A credential harvester and data exfiltrator disguised as "build script utilities and helpers for JavaScript and TypeScript projects." On install it spawns a persistent background worker that scans the user's home directory for browser login data, cookies, SSH keys, AWS credentials, crypto keystores, shell history passwords, and environment secrets — then encrypts and exfiltrates findings over multiple channels (HTTPS webhooks, DNS lookups, anonymous GitHub Gists).
credential_access credential_harvest network_egress persistence crypto_wallet browser_theft obfuscation reconnaissance agent_config_tamper
Credential harvester — EXFIL_DIRS lists hundreds of sensitive files critical lib/worker.js:172-237
lib/worker.js:172-237 enumerates ~/.env, ~/.bash_history, ~/.zsh_history, ~/.npmrc, ~/.gitconfig, ~/.git-credentials, ~/.mysql_history, ~/.pgpass, ~/.kube/config, browser Login Data/Cookies/Local State files, exchange config files, AWS credentials, Docker config, and many more for reading.
Crypto wallet keystore brute-forcer critical lib/worker.js:317-420
lib/worker.js:317-420 reads Ethereum keystore JSON files and tries 200+ common passwords (including wallet-specific ones like 'ethereum', 'metamask', 'bitcoin') via scrypt to decrypt private keys.
Shell history password extraction high lib/worker.js:422-504
lib/worker.js:422-504 scans .bash_history, .zsh_history, .fish_history for wallet commands and extracts passwords from --password, -p, --passphrase arguments and export statements.
Multi-channel encrypted exfiltration critical lib/worker.js:746-853
lib/worker.js:746-853 encrypts findings with Fernet (AES-128-CBC + HMAC-SHA256) and sends via: Channel 1 HTTPS POST to webhooks (line 751), Channel 2 DNS exfiltration via base32-encoded subdomain lookups (line 796), Channel 3 anonymous GitHub Gist creation (line 824).
Persistence via local file queue high lib/worker.js:879-891
lib/worker.js:879-891 writes encrypted payloads to ~/.local/share/.integrity_queue for later exfiltration.
Browser data theft targets high lib/worker.js:146-169,198-236,596-626
lib/worker.js:146-169,198-236,596-626 target browser Login Data, Cookies, Local State files for Chrome, Chromium, Brave, Edge, Firefox across Linux/macOS/Windows-WSL.
ECDH-x25519 + Fernet hybrid encryption for C2 high lib/crypto-ecdh.js:82-94
lib/crypto-ecdh.js:82-94 uses x25519 key exchange to derive per-session encryption keys, making traffic harder to inspect.
Prompt injection via zero-width characters in README medium README.md:55
README.md:55 contains 200+ zero-width Unicode characters (U+200B, U+200C, U+200D, U+FEFF) — possible hidden text or homoglyph trick to inject instructions into AI readers.
Suspicious external URLs in documentation medium README.md:22
README.md:22 references https://ddjidd564.github.io/defi-security-best-practices/config.json and https://ddjidd564.github.io/defi-security-best-practices/portfolio.html — likely attacker-controlled infrastructure.
Idempotency tokens written to user home low lib/scanner-core.js:223-272
lib/scanner-core.js:223-272 writes operation tokens to ~/.local/share/.p2024_tokens and log files to ~/.local/share/.p2024_logs.