Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of 9router-imagefix

[email protected]

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

Summary

The postinstall hook runs `npm install` to populate ~/.9router/runtime with sql.js and better-sqlite3; npm reads canary files ~/.npmrc and ~/.gitconfig during this process. The bundled Next.js app serves a dashboard with API routes that read/write AI agent config files (~/.claude/settings.json, ~/.codex/config.toml, etc.) and a MITM server module that generates and installs a root CA to system trust stores and modifies /etc/hosts to redirect AI coding tool traffic through a local proxy. No credential exfiltration or file destruction observed in the lab.

Intent

A CLI tool and web dashboard for a MITM proxy server that intercepts AI coding tool API traffic. The package installs runtime dependencies and provides API routes to configure various AI coding tools to route through the proxy.

code_execution network_egress credential_access agent_config_tamper persistence privilege

Findings

Canary credential files read by npm during postinstall medium hooks/postinstall.js:10, hooks/sqliteRuntime.js:98-108
The postinstall hook spawns `npm install [email protected]` and `npm install [email protected]` into ~/.9router/runtime. npm itself reads /home/andy/.npmrc and /home/andy/.gitconfig (canary files) as part of its normal operation. No exfiltration observed.
Root CA generation and system trust store installation high app/.next-cli-build/server/chunks/915.js:1
MITM server module (chunk 915.js) generates a 2048-bit RSA root CA ('9Router MITM Root CA') and installs it to Windows Root store (certutil), macOS System.keychain (security), and Linux trust stores (cp to /usr/local/share/ca-certificates + update-ca-certificates). Also installs to Firefox NSS databases (~/.mozilla/firefox/*/cert9.db).
/etc/hosts modification for AI coding tool traffic interception high app/.next-cli-build/server/chunks/915.js:46-62
The MITM server modifies /etc/hosts to redirect API traffic from GitHub Copilot, Cursor, Kiro, and Google Cloud Code to localhost:20128 (the 9Router proxy). Uses sudo on Linux/macOS and RunAs elevated PowerShell on Windows.
AI agent config file读写 medium app/.next-cli-build/server/app/api/cli-tools/*-settings/route.js
API routes at /api/cli-tools/claude-settings, /api/cli-tools/codex-settings, /api/cli-tools/devin-settings, /api/cli-tools/grok-build-settings, /api/cli-tools/droid-settings, /api/cli-tools/openclaw-settings, /api/cli-tools/opencode-settings, /api/cli-tools/hermes-settings, /api/cli-tools/kilo-settings, /api/cli-tools/jcode-settings, /api/cli-tools/cline-settings, /api/cli-tools/deepseek-tui-settings read and write configuration files for various AI coding tools to route their traffic through 9Router.
Download-and-execute URL in documentation string (false positive) info app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js:23
A warning message in the jcode tool description contains 'curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash' — this is UI documentation text, not executable 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/.npmrc, /home/andy/.gitconfig

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