Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of model-switch-router

[email protected]

malicious   confidence 95%   action block   analyzed 2026-09-25 01:53 UTC by yolo in 9 tool calls, with lab detonation

Summary

The postinstall hook spawns lib/worker.js as a detached background process. worker.js scans ~ for ~/.ssh, ~/.aws, ~/.npmrc, ~/.git-credentials, browser Login Data/Cookies files, crypto keysters, exchange config files, and environment variables containing keys/secrets/tokens. It brute-forces Ethereum keystores with a 200+ password dictionary, encrypts findings with Fernet (AES-128-CBC), and exfiltrates via parallel webhook POSTs (config fetched from ddjidd564.github.io), DNS exfiltration (base32-encoded subdomains), GitHub Gist backup (api.github.com/gists), and a local queue (~/.local/share/.integrity_queue). Remote config is refreshed hourly for C2 resilience.

Intent

Pretends to be an AI model routing library; actually a full credential harvester that scans the home directory for SSH keys, AWS credentials, browser logins/cookies, crypto keystores, exchange configs, shell history, .env files, and sensitive environment variables, then exfiltrates encrypted data via webhooks, DNS lookups, and GitHub Gists.

credential_access credential_harvest network_egress download_execute persistence reconnaissance crypto_theft obfuscation agent_config_tamper

Findings

Credential harvester scans home directory critical
lib/worker.js lines 114-200: SCAN_DIRS and EXFIL_DIRS enumerate ~/.ssh, ~/.aws, ~/.ethereum, ~/.bitcoin, ~/.solana, ~/.npmrc, ~/.gitconfig, ~/.git-credentials, browser Login Data/Cookies (Chrome/Chromium/Brave/Edge), .env, .bash_history, .zsh_history, exchange configs (.binance, .bybit, .okx, .kucoin, .deribit), AWS credentials/config, Docker config, Kubernetes config, .pgpass.
Crypto wallet keystore brute-force critical
lib/worker.js lines 74-105: COMMON_PASSWORDS array with 200+ passwords including crypto-specific ones (wallet, ethereum, bitcoin, metamask, phantom, trustwallet). Lines 265-278 _buildCommonPasswords generates file- and user-specific candidates. Lines 280+ _tryDecryptKeystore attempts scrypt decryption of Ethereum keystore JSON files.
Encrypted exfiltration via multiple channels critical
lib/worker.js lines 721-736: _sendToRelay POSTs encrypted payload to webhook URLs. Lines 762-777: _reportDNS exfiltrates via DNS lookups (base32-encoded). Lines 780-827: _reportGist creates private GitHub gists with encrypted data.
Remote C2 via GitHub Pages high
lib/worker.js lines 912-928: CONFIG_PRIMARY_URL=https://ddjidd564.github.io/defi-security-best-practices/config.json, mirrors at raw.githubusercontent.com, fallback webhooks on webhook.site. _resolveConfig() (line 987+) fetches config periodically (hourly) to update webhook endpoints.
Local persistence queue high
lib/worker.js lines 853-900: INTEGRITY_QUEUE=~/.local/share/.integrity_queue — appends encrypted payloads as fallback when all exfil channels fail, flushes on next success.
Environment variable harvesting high
lib/worker.js lines 1486-1516: Iterates process.env, collects keys containing key/secret/token/password/wallet/seed, stores value previews (first 40 chars) in findings report.
Host reconnaissance medium
lib/worker.js line 1520: execSync('whoami') to gather system username. Lines 1286-1291: hostname hash, platform, arch, node_version collected in trace.
Prompt injection via zero-width characters medium
README.md line 401: Contains zero-width characters (possible hidden text or homoglyph trick to steer AI readers).
Install hook spawns detached background process high
lib/setup.js line 31: cp.fork(workerPath, ['--verify', PKG_NAME], { detached: true, stdio: 'ignore', env: Object.assign({}, process.env, { RUN_VERIFICATION: PKG_NAME }) }); child.unref();

Lab evidence

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