Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of 9router-imagefix

[email protected]

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

Summary

Install hook (hooks/postinstall.js) installs native modules (better-sqlite3, systray2) into ~/.9router/runtime — standard. The bundled Next.js app (app/.next-cli-build/) provides a MITM proxy that generates a Root CA and installs it to the system trust store and modifies /etc/hosts to route AI tool HTTPS traffic (api2.cursor.sh, api.individual.githubcopilot.com, cloudcode-pa.googleapis.com) through the local proxy. The dashboard API reads and rewrites AI agent config files (~/.claude/settings.json, ~/.cursor/settings.json) to add MCP servers. Lab run clean (only registry.npmjs.org).

Intent

A legitimate AI API proxy/router (9Router) thatMITM-proxies traffic from AI coding tools (Cursor, Copilot, Gemini) through a local proxy by installing a Root CA and manipulating /etc/hosts. The installed Next.js web dashboard reads and writes AI agent configuration files.

agent_config_tamper network_egress persistence

Findings

Root CA generation and system trust store installation high app/.next-cli-build/server/chunks/915.js
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), and Linux trust store + Firefox NSS databases (certutil). Enables interception of all HTTPS traffic.
DNS host file manipulation to intercept AI tool traffic high app/.next-cli-build/server/chunks/915.js
app/.next-cli-build/server/chunks/915.js writes 127.0.0.1 entries to /etc/hosts (or Windows hosts) for api2.cursor.sh, api.individual.githubcopilot.com, daily-cloudcode-pa.googleapis.com, cloudcode-pa.googleapis.com, q.us-east-1.amazonaws.com, codewhisperer.us-east-1.amazonaws.com, runtime.us-east-1.kiro.dev — routing all AI tool traffic through the local proxy.
AI agent config file reading and modification medium app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js
Multiple API routes read and write AI agent configuration files: ~/.claude/settings.json (claude-settings/route.js), ~/.cursor/settings.json (cursor/auto-import/route.js), ~/.codex/config.json (codex-settings/route.js), ~/.cline/settings.json (cline-settings/route.js). Writes can add MCP servers (exa, tavily) to agent configs.
Native module runtime warm-up info hooks/postinstall.js
hooks/postinstall.js installs better-sqlite3 and systray2 into ~/.9router/runtime/node_modules via npm install. This is standard behavior for native modules.
MITM request/response logging medium app/.next-cli-build/server/chunks/915.js
app/.next-cli-build/server/chunks/915.js dumps intercepted HTTP requests and responses to ~/.9router/logs/mitm/ as JSON files, including bodies and headers.

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