Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

Odin Research / What is / Offensive and testing tools

What Is mitmproxy? How the HTTPS Interception Proxy Works

A favorite tool of developers and testers for reading HTTPS traffic. It becomes a threat when its root certificate is trusted and its private key is not private.

By
Odin by Brandefense
Updated
21 Nov 2026
Reading time
7 min read
Type
Interception proxy

In short

mitmproxy is a free, open-source interactive proxy that intercepts HTTP and HTTPS traffic so a user can inspect, change and replay it. To read encrypted traffic it creates its own certificate authority, which the client device must trust. Developers and testers use it daily, and attackers can abuse the same trick.

Key takeaways

What it is
An open-source Python intercepting proxy with a console UI (mitmproxy), a command-line tool (mitmdump) and a web UI (mitmweb).
How it works
It sits between a client and a server, signs a fresh certificate for each site with its own root CA, and decrypts the traffic for inspection.
Why it matters
Any device that trusts a mitmproxy root will accept certificates signed by its key. If that key leaks, anyone holding it gains the same power.
What Odin Research saw
An open server in Monograph 18 exposed a mitmproxy root CA with its private key. Among 2,066 mitmproxy endpoints, 208 were confirmed or suspected listeners.
What to do first
Audit endpoint root stores for mitmproxy roots nobody approved, and lock browser proxy auto-config settings to corporate hosts.

What is mitmproxy?

mitmproxy is a free, open-source interactive proxy that intercepts HTTP and HTTPS traffic. It lets a user see, change and replay requests between a client and a server. Developers use it to debug apps, and penetration testers use it to test them. Its HTTPS trick depends on a root certificate the client must trust.

The project's README describes mitmproxy as an interactive, TLS-capable intercepting proxy with a console interface for HTTP/1, HTTP/2 and WebSockets. It ships with two siblings: mitmdump, a command-line version the project compares to tcpdump for HTTP, and mitmweb, a web interface. It is written in Python and scriptable with add-ons.

mitmproxy is a standard tool for penetration testing. The same capability matches the attacker technique known as adversary-in-the-middle, which is why defenders track where it runs.

How mitmproxy works

mitmproxy can run in several modes. The documentation lists regular proxy mode (clients are pointed at the proxy, default port 8080), reverse proxy mode, local capture, WireGuard, transparent, upstream, SOCKS5 and DNS modes.

For HTTPS, mitmproxy acts as a certificate authority:

  1. On first start it creates a CA unique to that installation in ~/.mitmproxy.
  2. When a client connects to a site, mitmproxy signs a certificate for that site on the fly with its CA key.
  3. If the client trusts the mitmproxy root, it accepts that certificate and mitmproxy can read the decrypted traffic.

The documentation names the files. mitmproxy-ca.pem holds the certificate and the private key. mitmproxy-ca-cert.pem, mitmproxy-ca-cert.p12 and mitmproxy-ca-cert.cer hold only the public certificate in formats for different platforms. To install the root on a device, a user browses to the special address mitm.it through the proxy. Apps that pin certificates will not accept mitmproxy certificates without modification.

See Certificate Authority for why a trusted root carries so much power.

How attackers abuse mitmproxy

mitmproxy is not malware. Abuse comes from getting a victim device to route traffic through it and to trust its root. Common building blocks are:

  • Root certificate installation. MITRE ATT&CK tracks this as Subvert Trust Controls: Install Root Certificate (T1553.004). A trusted rogue root stops browsers from warning about attacker certificates.
  • Proxy auto-config (PAC). A PAC file tells the browser which proxy to use for each URL. Setting Windows AutoConfigURL to an external PAC file can send only chosen domains to the proxy, which is quieter than a VPN.
  • Session capture. Once traffic flows through the proxy, cookies and tokens are visible. This maps to Adversary-in-the-Middle (T1557).

Pinned apps and origin-bound authentication, such as passkeys, limit what an interception proxy can capture.

What Odin Research observed

mitmproxy appears in five Odin Research monographs. Most listeners are dual-use, so addresses stay withheld.

  • A leaked root CA key. Monograph 18 found an open server on Scaleway in France with 9 files (11.89 MB). They included mitmproxy-ca.pem and mitmproxy-ca.p12 with the root CA private key, the public certificate files, a 300-byte proxy.pac and two 5.94 MB logs. Anyone holding that key could sign certificates that every device trusting the root would accept. Address, port and key stay withheld.
  • A large, mostly benign fleet. The same study counted 2,066 mitmproxy endpoints on 1,345 addresses. Only 208 were confirmed or suspected interception listeners. The leading ports were 32300 (505), 8080 (192) and 8081 (125).
  • Commercial proxy collisions. Monograph 06 saw 1,877 mitmproxy banner records globally. Of 156 confirmed rows, 44 (28.2%) carried certificate names that matched a commercial proxy network, so they stayed on the watchlist as possible collisions.
  • Next to noVNC. The same monograph found one confirmed mitmproxy listener on a server that also hosted a complete noVNC client. No live session or victim was seen.
  • Feeds and neighbors. Monograph 02 counted 157 mitmproxy records in scanner and OAST feeds. Monograph 17 found one host with mitmproxy on three ports, and Monograph 19 saw it next to DarkSword C2.

How to detect mitmproxy abuse

  • Root stores. Search endpoint root certificate stores for the CN=mitmproxy subject. Compare every root with your approved PKI list. Windows root-store queries use the certificate's SHA-1 thumbprint, not a file hash.
  • Certificate imports. Alert on command-line imports of root certificates, such as certutil -addstore Root, outside of IT tooling.
  • Proxy settings. Alert on changes to AutoConfigURL that point to an external PAC file.
  • Files on disk. Search for the default file names mitmproxy-ca.pem and mitmproxy-ca-cert.cer outside developer machines.
  • Egress to proxy ports. Browser traffic to ports such as 8080, 18080, 31280 or 32300 is a lead only when a PAC or certificate signal backs it up.

Odin Research publishes rules for these. Monograph 18 carries Suricata signatures for mitmproxy CA downloads and external PAC files. It adds a Sentinel KQL hunt for root CA imports and AutoConfigURL edits, a Sigma rule for mitmproxy root imports and a YARA rule for PEM root CA bundles and PAC scripts. All are in the Defense Kit.

How to defend against rogue mitmproxy roots

  1. Control root stores. Manage trusted roots through Group Policy or MDM, remove any mitmproxy root nobody approved, and block user-level root imports on managed devices.
  2. Lock proxy settings. Set browser proxy and PAC values centrally and alert on changes.
  3. Keep testing roots off production. Developers who need mitmproxy should use a dedicated test device or profile, never their daily browser.
  4. Treat a leaked key as an incident. If a mitmproxy CA key you trusted is exposed, remove that root everywhere and hunt back through logs. See How to respond to misconfigurations.
  5. Use phishing-resistant MFA. See multi-factor authentication.

mitmproxy compared with similar tools

ToolWhat it isMain useNotes
mitmproxyOpen-source scriptable proxyDebugging, testing, interceptionRoot CA created per install in ~/.mitmproxy
YakitGUI suite on the Yaklang engineMITM, fuzzing, PoC scanningDensest high-signal share in Monograph 18
EvilginxPhishing reverse proxySession cookie theftNo root install needed; victim visits a lookalike domain
Burp CollaboratorOut-of-band callback serverDetecting blind vulnerabilitiesPart of a commercial testing suite

Frequently asked questions about mitmproxy

What is mitmproxy?

mitmproxy is a free, open-source interactive proxy for HTTP and HTTPS. It lets users inspect, modify and replay traffic, and comes with mitmdump for the command line and mitmweb for the browser.

Is mitmproxy malware?

No. mitmproxy is a legitimate tool for developers and security testers. It can be abused when an attacker gets a device to trust its root certificate or routes traffic through it without consent.

Is mitmproxy legal?

Yes, for traffic you own or are authorized to test. Intercepting other people's traffic without consent is illegal in most countries.

Where is the mitmproxy certificate stored?

mitmproxy creates its CA on first run in ~/.mitmproxy. The file mitmproxy-ca.pem holds the certificate and private key; the mitmproxy-ca-cert files hold only the public certificate.

What port does mitmproxy use?

In regular and reverse proxy modes the documented default is 8080. Odin Research found many listeners on other ports, led by 32300, 8080 and 8081.

How do I find a mitmproxy root on my computers?

Search root certificate stores for the CN=mitmproxy subject and compare all roots with your approved list. Odin Research publishes Sigma and KQL rules for mitmproxy root imports in its Defense Kit.

Why is a leaked mitmproxy key dangerous?

Anyone with the private key of a root your devices trust can sign valid-looking certificates for any site, so those devices will accept intercepted connections without a warning.

mitmproxy vs Burp Suite: what is the difference?

Both are intercepting proxies. mitmproxy is free, open source and scripted in Python. Burp Suite is a commercial web testing suite that also includes scanners and the Burp Collaborator callback service.

Sources

  1. mitmproxy, README, GitHub. raw.githubusercontent.com/mitmproxy/mitmproxy/main/README.md (checked 21 November 2026)
  2. mitmproxy documentation, About Certificates. docs.mitmproxy.org/stable/concepts/certificates/ (checked 21 November 2026)
  3. mitmproxy documentation, Proxy Modes. docs.mitmproxy.org/stable/concepts/modes/ (checked 21 November 2026)
  4. MITRE ATT&CK, T1553.004 Subvert Trust Controls: Install Root Certificate. attack.mitre.org/techniques/T1553/004/ (checked 21 November 2026)
  5. MITRE ATT&CK, T1557 Adversary-in-the-Middle. attack.mitre.org/techniques/T1557/ (checked 21 November 2026)

Related tools and terms

All Odin Research explanations · Brandefense glossary

Odin Research

Get the rules, not just the definition

Every Odin Research report ships with verified indicators and detection rules you can load today.

Open the Defense Kit