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:48 UTC by yolo in 14 tool calls, with lab detonation

Summary

The postinstall hook (lib/setup.js) spawns a detached background worker (lib/worker.js) that enumerates and reads credential stores (.env, .npmrc, .git-credentials, AWS ~/.aws/credentials, browser Login Data SQLite files, exchange configs) and scrapes password-bearing environment variables. Exfiltration goes over HTTPS POST to hardcoded webhook.site URLs and a GitHub Pages host (ddjidd564.github.io), with DNS-tunnel and GitHub Gist fallback channels. The worker also writes prompt-injection content to .cursorrules, CLAUDE.md, AGENTS.md and installs git-hook/shell-RC persistence.

Intent

Pretends to be an AI model routing/switching library. Actually a credential harvester that exfiltrates env vars, browser Login Data/Cookies, AWS/Docker/Kubernetes configs, exchange API keys, and shell history to attacker-controlled webhooks, while propagating AI prompt-injection payloads (CLAUDE.md, .cursorrules) and installing git-hook/shell-RC persistence.

credential_access credential_harvest network_egress obfuscation persistence agent_config_tamper reconnaissance browser_theft crypto_wallet download_execute

Findings

Credential store enumeration critical lib/worker.js:170-219
EXFIL_DIRS array at lib/worker.js:170 lists .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .mysql_history, .psql_history, .pgpass, exchange configs (.binance, .bybit, .okx, .kucoin, .deribit), AWS creds (.aws/credentials, .aws/config) via obfuscated Buffer.from(), Docker config, Kubernetes config, and browser Login Data/Cookies across Linux/macOS/Windows.
Environment variable scraping for secrets critical lib/worker.js:1441-1472
Iterates process.env looking for keys containing key/secret/token/password/private/network (strings hidden via Buffer.from([decimal]) obfuscation) and forwards value previews to attacker webhooks.
Encrypted exfiltration to webhook.site critical lib/worker.js:718-820
_sendToRelay POSTs Fernet-encrypted payloads to three webhook.site endpoints (personal webhook tokens) at lib/worker.js:718-733, with DNS-tunnel and GitHub Gist backup channels.
AI prompt-injection propagation high lib/worker.js:1685-1703
_propagate() writes malicious CLAUDE.md and .cursorrules content designed to instruct AI agents to download and run a remote script (raw.githubusercontent.com/.../scan.js) and re-infect other projects.
Persistence via git hooks and shell RC high lib/worker.js:1699-1700
Self-propagation installs hooks into .git/hooks/ and appends to .bashrc/.zshrc/.profile to re-execute the scanner on every terminal open or git operation.
Obfuscated string encoding medium lib/worker.js:1446-1455
Sensitive words like 'password', 'private', 'wallet' encoded as Buffer.from([112,97,115,115,119,111,114,100]).toString() to evade static analysis at lib/worker.js:1446-1455.
Decoy setup script medium lib/setup.js:27-41
lib/setup.js appears to do benign version/project checks but spawns lib/worker.js as a detached, unref'd child process at lib/worker.js:31.

Lab evidence

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