GO KALI FREE

mitmproxy

Sniffing & Spoofing

Intermediatelow risk

mitmproxy is an interactive, SSL/TLS-capable intercepting HTTP proxy. It allows users to inspect, modify, and replay web traffic flowing through an application layer proxy.

Installation

sudo apt install mitmproxy

Basic Syntax

mitmproxy

Quick Facts

Full Name
mitmproxy
License
MIT
Language
Python
Interface
Console / Web / CLI
Category
Traffic Interception
Requires
CA Certificate for HTTPS

Tool Overview

mitmproxy is an interactive SSL/TLS-capable man-in-the-middle HTTP proxy. It allows security researchers to intercept, inspect, modify, and replay web traffic for testing and debugging purposes.

With support for inline Python scripting, transparent proxying, and multiple interface modes, mitmproxy is an essential tool for web application security testing, API analysis, and traffic manipulation.

Common Commands

mitmproxyLaunch interactive proxy - Initialize console interface on the default port 8080
mitmproxy -p 8888Custom port - Bind the proxy server listener to port 8888 instead of the default
mitmdump -w traffic.flowDump to file - Record streamed connection properties to a flow file quietly without the console UI
mitmdump -r traffic.flowRead flow - Open and replay traffic data saved inside a structured flow file
mitmwebWeb interface - Launch a browser-based graphical console dashboard to review intercepted traffic
mitmdump -s script.pyInline scripting - Pass Python scripts to automatically intercept, process, and alter running traffic states
mitmproxy --mode transparentTransparent mode - Configure traffic interception without requiring explicit client proxy configurations
mitmproxy --ignore-hosts "^example\.com:443$"Ignore traffic - Bypass specific destination domains entirely to exclude them from interception workflows
mitmproxy -p 8080Custom port
mitmweb --web-port 8081Web UI port - Launch the browser dashboard on a custom port
mitmproxy --mode reverse:https://example.comReverse proxy - Front a specific upstream server for API testing
mitmdump -s addon.py -w out.flowScript + save - Run a Python addon while recording all flows
mitmproxy --set block_global=false --mode transparentTransparent tuning - Allow non-local clients in transparent mode
mitmdump "~u /api/" -w api.flowFilter capture - Record only flows whose URL matches a filter

Step-by-Step Guide

  1. 1Initiate the program via the command line or utilize the web-based UI
  2. 2Adjust the target device to send its web requests to your listening address
  3. 3Navigate to the installation portal on the target to download the security certificate
  4. 4Install and trust the certificate to enable decryption of secure sites
  5. 5Examine the captured requests, alter variables on the fly, and study the responses

Warnings

Use Cases

HTTPS Decryption

Intercept and decrypt SSL/TLS traffic.

Traffic Modification

Modify requests and responses in real-time.

Request Replay

Replay captured requests for testing.

API Testing

Analyze and debug REST/GraphQL API calls.

Key Features

Related Tools

Wireshark

Sniffing & Spoofing

Wireshark tutorial for beginners: capture packets, read the three panes, filter traffic and follow TCP streams — a hands-on guide to the world's foremost network protocol analyzer.

Burp Suite

Web Application

Burp Suite is the industry-standard web application security testing platform from PortSwigger, free as Community Edition on Kali Linux. Learn how to use Burp Suite: install it, route your browser through its proxy, intercept your first request, and test it with Repeater and Intruder.

Netcat

Sniffing & Spoofing

Learn how to use Netcat (nc) in Kali Linux to open a TCP or UDP connection, check a port, and see what a service sends back. Follow the examples to send your first message, inspect HTTP and SMTP responses, and transfer a test file without exposing sensitive data.

tcpdump

Sniffing & Spoofing

tcpdump is a powerful, lightweight command-line packet analyzer that allows users to capture, parse, and filter TCP/IP and other packets transmitted or received over a network.

arpspoof

Sniffing & Spoofing

arpspoof redirects packets from a target host on the LAN to another host by forging ARP replies. It is a simple and effective utility part of the dsniff suite.

Bettercap

Sniffing & Spoofing

Bettercap is a powerful, flexible network attack and monitoring framework. It is the complete modular successor to ettercap, offering wide-ranging capabilities for WiFi, Bluetooth, and IP network security auditing.

Related Cybersecurity Guides

Web Security · Beginner

HTTP vs HTTPS: Understanding the Differences and Why HTTPS Matters

Compare HTTP and HTTPS protocols, understand SSL/TLS handshakes, certificate types, common attacks, and learn how to implement HTTPS correctly.

Tools · Beginner

Wireshark Guide: Network Protocol Analysis

Master Wireshark for network traffic capture, protocol analysis, filtering, and troubleshooting with practical examples.

Web Security · Intermediate

Command Injection: Exploiting System Commands in Web Apps

Understand command injection attacks where attackers execute arbitrary system commands through vulnerable applications and how to prevent them.

Wireless Security · Advanced

Aircrack-ng Guide: Complete Wireless Security Assessment

A comprehensive guide to the Aircrack-ng suite for wireless security testing including monitor mode, packet capture, deauthentication attacks, WPA/WPA2 cracking, and WEP analysis.

Frequently Asked Questions

What is mitmproxy used for?

mitmproxy is an interactive HTTPS proxy used for intercepting, inspecting, modifying, and replaying HTTP/HTTPS traffic. It is widely used for web security testing, API debugging, and penetration testing.

How does mitmproxy decrypt HTTPS traffic?

mitmproxy acts as a man-in-the-middle by generating per-host SSL certificates signed by a mitmproxy CA. Once the CA certificate is installed and trusted by the client, mitmproxy can decrypt and inspect HTTPS traffic.

What is the difference between mitmproxy, mitmdump, and mitmweb?

mitmproxy is the interactive console UI, mitmdump is the command-line equivalent for scripting and automation, and mitmweb provides a browser-based web interface for traffic inspection.

Can mitmproxy automate request modification?

Yes, mitmproxy supports Python scripting for automating traffic interception and modification. You can write inline scripts to modify requests/responses, inject content, or perform custom analysis.

Tags

#sniffing-spoofing#proxy-tools#http-analysis

Output Explanation

Displays an organized list of web transactions, allowing you to drill down into the headers, parameters, and payloads. It offers real-time editing capabilities.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.