Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of 9router-imagefix

[email protected]

suspicious   confidence 75%   action isolate   analyzed 2026-09-24 18:56 UTC by yolo in 13 tool calls, with lab detonation

Summary

The postinstall hook installs runtime deps to ~/.9router/runtime — clean. The bundled server (app/.next-cli-build/) contains a MITM root CA generator that installs a "9Router MITM Root CA" certificate to Windows Root store, macOS System.keychain, and Linux trust stores (chunks/915.js:1-63). It also hijacks DNS for GitHub Copilot, Cursor, Anthropic, and AWS endpoints via /etc/hosts modification with sudo (chunks/915.js:46-50). Multiple API routes read/write AI agent configs (~/.claude/settings.json, etc.) (app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js). These are proxy features, not standalone malware, but the MITM root CA and DNS hijacking are significant system-level capabilities.

Intent

The package installs a Next.js-based AI proxy management server that performs MITM TLS interception (installing a root CA to system trust stores) and DNS hijacking to redirect GitHub Copilot, Cursor, Anthropic, and AWS endpoints through its own proxy. The postinstall hook is benign (installs native SQLite/tray deps). The server runtime has significant credential-access and network-manipulation capabilities.

credential_access network_egress agent_config_tamper privilege obfuscation

Findings

MITM Root CA installed to system trust stores high app/.next-cli-build/server/chunks/915.js:1-63
Generates a 2048-bit RSA root CA (CN=9Router MITM Root CA) and installs it to Windows Root store (certutil), macOS System.keychain (security add-trusted-cert), Linux trust store (/usr/local/share/ca-certificates + update-ca-certificates), and Firefox profile cert9.db/cert8.db databases. Enables passive decryption of all HTTPS traffic.
DNS hijacking of AI provider endpoints high app/.next-cli-build/server/chunks/915.js:46-50
Adds 127.0.0.1 entries to /etc/hosts (Windows: certutil + ipconfig /flushdns; Linux: sudo tee /etc/hosts) to redirect daily-cloudcode-pa.googleapis.com, cloudcode-pa.googleapis.com, api.individual.githubcopilot.com, api2.cursor.sh, runtime.us-east-1.kiro.dev, q.us-east-1.amazonaws.com, codewhisperer.us-east-1.amazonaws.com to localhost.
AI agent config read/write medium app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js:1-2
API routes read and write ~/.claude/settings.json, ~/.claude.json, and other AI agent configuration files to inject 9Router proxy endpoints. Uses sudo on Linux, RunAs PowerShell on Windows for host file modification.
Postinstall installs native deps to ~/.9router/runtime info hooks/postinstall.js:1-23
Hook runs npm install sql.js and better-sqlite3 into a user-writable runtime directory. Non-fatal on failure. DNS resolution to registry.npmjs.org observed in lab — expected.
Prompt-injection text in HTML medium app/.next-cli-build/server/app/dashboard/token-saver.html:1
token-saver.html contains system-impersonation pattern: 'Terse-style system prompt → ~65% fewer output tokens' embedded in page content.

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