Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of nggrouter

[email protected]

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

Summary

Install hook runs npm install into ~/.9router/runtime (benign). The bundled Next.js app generates and installs a MITM root CA into the system trust store (Windows Root, macOS Keychain, Linux), modifies /etc/hosts to redirect major AI provider domains (api.individual.githubcopilot.com, cloudcode-pa.googleapis.com, api2.cursor.sh, runtime.us-east-1.kiro.dev) to 127.0.0.1, and reads/writes AI agent config files (.claude/settings.json, .codex/config.toml, .cline/data/secrets.json) containing API keys. This is an AI proxy tool — behavior matches its stated purpose, but the system-level modifications and credential access are notable.

Intent

An AI proxy/management CLI (9Router) that intercepts and proxies traffic to AI provider APIs. At install it lazy-installs native SQLite/tray deps into ~/.9router/runtime. At runtime it generates a custom root CA, installs it into the system trust store, modifies /etc/hosts to redirect GitHub Copilot, Gemini, Cursor, and Kiro traffic through localhost, and reads/writes AI agent configuration files containing API keys and tokens.

credential_access credential_harvest agent_config_tamper network_egress persistence anti_analysis

Findings

MITM root CA generation and system trust installation high app/.next-cli-build/server/chunks/915.js:1-55
app/.next-cli-build/server/chunks/915.js generates a 2048-bit RSA root CA ('9Router MITM Root CA') and installs it into the Windows Root store (certutil), macOS Keychain (security), and Linux trust stores (update-ca-certificates), plus Firefox/Chromium NSS databases. Also sets NODE_EXTRA_CA_CERTS via launchctl (macOS) or setx (Windows).
/etc/hosts DNS redirection for AI provider APIs high app/.next-cli-build/server/chunks/915.js:46-63
app/.next-cli-build/server/chunks/915.js modifies /etc/hosts (Windows: drivers/etc/hosts) to redirect daily-cloudcode-pa.googleapis.com, cloudcode-pa.googleapis.com, api.individual.githubcopilot.com, runtime.us-east-1.kiro.dev, q.us-east-1.amazonaws.com, codewhisperer.us-east-1.amazonaws.com, api2.cursor.sh to 127.0.0.1, effectively MITM-ing traffic to these services.
Reads AI agent config files containing API keys high app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js:1
API routes read .claude/settings.json (ANTHROPIC_AUTH_TOKEN), .codex/config.toml, .cline/data/secrets.json (openAiApiKey), .grok/config.toml (api_key), .opencode/session (ses_ tokens), and .devin/ auth files. These contain raw API keys and auth tokens.
Writes API keys to AI agent config files high app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js:1
API routes write user-supplied baseUrl, apiKey, and model settings directly into .codex/config.toml, .cline/data/globalState.json and .cline/data/secrets.json, .claude/settings.json, .grok/config.toml — effectively configuring these tools to proxy through 9Router.
Install hook lazy-installs native deps into ~/.9router/runtime info hooks/postinstall.js:1-22
hooks/postinstall.js runs npm install [email protected] and [email protected] into ~/.9router/runtime/node_modules (user-writable dir). Harmless network usage to npm registry.
is-docker / is-in-ssh anti-analysis probes (bundled) low app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js.nft.json:1
app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js.nft.json references node_modules/is-docker/ and node_modules/is-in-ssh/ — likely from Next.js nft static analysis, not custom malware evasion.

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