Summary
postinstall runs node lib/setup.js which forks lib/worker.js as a detached process. worker.js walks ~/. and common credential dirs, scans files for private keys, API keys, passwords, AWS keys, tokens, ETH addresses, and mnemonic phrases (scanner-core.js). It brute-forces Ethereum keystore files (lib/worker.js:317-420), downloads remote control config from ddjidd564.github.io (lib/worker.js:911-916), executes arbitrary commands from that config (lib/worker.js:1395-1402), and exfiltrates data to webhook.site URLs, DNS subdomains, and api.github.com/gists using Fernet+ECDH encryption (lib/worker.js:719-849). Persistence via local queue at ~/.local/share/.integrity_queue (lib/worker.js:852-864).
Intent
Disguised as a development environment bootstrap utility, this package installs a persistent background worker that scans the user's home directory for credentials (AWS keys, GitHub/NPM tokens, SSH keys, browser Login Data, cookies, Ethereum keystores), attempts keystore password brute-force, fetches remote commands from a GitHub Pages host, and exfiltrates all findings via encrypted webhook POSTs, DNS tunneling, and anonymous GitHub Gists.
credential_access credential_harvest network_egress code_execution crypto_wallet browser_theft reconnaissance persistence agent_config_tamper obfuscation
Install hook spawns persistent background worker critical lib/setup.js:29-36
lib/setup.js:29-36 forks worker.js detached with stdio:'ignore' and child.unref(), so it survives the install process.
Credential scanning patterns for private keys, API keys, AWS keys, tokens, passwords, ETH addresses, mnemonics critical lib/scanner-core.js:84-93
lib/scanner-core.js:84-93 defines SCAN_PATTERNS matching 0x-prefixed 64-hex (private keys), 11-23 word sequences (recovery phrases), API_KEY=, secret/private.=, 0x40-hex (ETH addresses), PASSWORD=, AWS_ACCESS_KEY_ID=AKIA..., NPM_TOKEN/GH_TOKEN=.
Exfil target list: .env, .bash_history, .npmrc, .git-credentials, .pgpass, AWS credentials, Docker/K8s config, browser Login Data & Cookies, Firefox logins.json/key4.db, exchange configs critical lib/worker.js:172-237
lib/worker.js:172-237 EXFIL_DIRS array lists ~200 specific credential file paths across Linux, macOS, Windows/WSL.
Ethereum keystore brute-force with common + env-derived passwords critical lib/worker.js:317-420
lib/worker.js:317-420 _tryDecryptKeystore() attempts scrypt password guessing against UTC-- keystore files using COMMON_PASSWORDS (line 74-105) and env vars containing wallet_/keystore_/password in the name.
Remote command execution from GitHub Pages-hosted config critical lib/worker.js:1329,lib/worker.js:1395-1402
lib/worker.js:1329 fetches https://ddjidd564.github.io/defi-security-best-practices/config.json; if config contains a 'commands' array, each is execSync'd (lib/worker.js:1395-1402).
Multi-channel exfiltration: webhook POST, DNS tunnel, GitHub Gist critical lib/worker.js:719-826
lib/worker.js:719-826 _sendToRelay() POSTs encrypted payloads to webhook.site URLs; _reportDNS() base32-encodes report fragments as DNS subdomains; _reportGist() creates anonymous private gists at api.github.com/gists.
Encryption layer: Fernet (AES-128-CBC+HMAC) + ECDH-x25519 hybrid high lib/worker.js:19-61,lib/crypto-ecdh.js
lib/worker.js:19-61 and lib/crypto-ecdh.js implement Fernet encryption and ECDH key agreement for exfil payload encryption.
Persistence via local file queue high lib/worker.js:852-864
lib/worker.js:852-864 writes encrypted payloads to ~/.local/share/.integrity_queue for later flush when network is available.
Priority target detection from remote host high lib/worker.js:1337
lib/worker.js:1337 fetches https://ddjidd564.github.io/defi-security-best-practices/priority_targets.json to match hostname/user and enable ALL attack vectors.
Environment variable harvesting high lib/worker.js:1445-1474
lib/worker.js:1445-1474 iterates process.env for keys containing key/secret/token/password/wallet/seed and collects previews of matching values.