Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of 9router-imagefix

[email protected]

suspicious   confidence 65%   action isolate   analyzed 2026-09-24 16:11 UTC by yolo in 15 tool calls, with lab detonation

Summary

Postinstall hook installs npm packages into ~/.9router/runtime/ (npm registry — standard). The bundled Next.js server, when started, generates a MITM Root CA and installs it to Windows Root store, macOS System.keychain, Linux ca-certificates, and Firefox/Chrome NSS databases; modifies /etc/hosts; reads and writes AI agent config files to steal/redirect API keys. The canary ~/.gitconfig read was npm's own behavior, not the package's.

Intent

A CLI proxy/relay for AI API calls (9Router) that ships a bundled Next.js web app. The postinstall hook installs runtime SQLite/tray deps into ~/.9router/runtime/ — standard behavior. The bundled app, when run as a server, installs a self-signed Root CA into system trust stores, modifies /etc/hosts, and reads/writes AI agent configuration files (~/.claude/settings.json, ~/.codex/config.toml, etc.) to redirect traffic through the proxy.

credential_access credential_harvest agent_config_tamper persistence privilege

Findings

Postinstall installs runtime deps into user directory info hooks/postinstall.js:6-7
hooks/postinstall.js → hooks/sqliteRuntime.js installs sql.js and better-sqlite3 into ~/.9router/runtime/node_modules via npm install.
MITM Root CA generation and system trust store installation high app/.next-cli-build/server/chunks/915.js:1-63
app/.next-cli-build/server/chunks/915.js generates a 2048-bit RSA Root CA (CN=9Router MITM Root CA) and installs it to Windows Root store (certutil), macOS System.keychain (security), Linux ca-certificates (update-ca-trust), and Firefox/Chrome NSS databases.
/etc/hosts modification high app/.next-cli-build/server/chunks/915.js:46-51
app/.next-cli-build/server/chunks/915.js appends DNS entries to /etc/hosts with sudo.
AI agent config file read/write high app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js:1
app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js reads and writes ~/.codex/config.toml and ~/.codex/auth.json (including API keys). Similar routes exist for Claude (~/.claude/settings.json), Cursor, Devin, Qwen, Grok, and others.
Canary credential read is npm's own behavior info hooks/postinstall.js
The lab detected a read of /home/andy/.gitconfig, but this was performed by npm itself (URL rewrites), not by the package's code.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 8. Hooks: postinstall (timed out).

DNS names requested: registry[.]npmjs[.]org

Direct connections: socket 127[.]0[.]0[.]1:53

Canary credential files read: /home/andy/.gitconfig

Files written outside the package: /home/andy/.9router/runtime/package.json