Nutek Security

We are here to help, we are here to protect, we are here to deliver.

Setup mitmproxy

By Neosb

Published: 2024-12-10 07:57

Last Modified: 2024-12-10 07:57

Tags: transparent proxymitmproxynetwork analysissecurity

Categories: networksecuritymitmproxy

Setup mitmproxy

What is mitmproxy? It is a free and open source interactive HTTPS proxy. It is a console tool that allows interactive examination and modification of HTTP traffic. It differs from mitmdump in that all flows are kept in memory, which means that it's intended for taking and manipulating small-ish samples. It has a web interface that allows you to browse the traffic that has been intercepted.

Visit the official website

mitmproxy.org

Prerequisites

  • Homebrew
  • Firefox browser

Installation

Language: bash

brew install mitmproxy

Start mitmproxy

Language: bash

mitmproxy -p 9992

Start mitmweb

Language: bash

mitmweb -p 9992

Start mitmdump

Language: bash

mitmdump -p 9992

Mitmproxy setup process

  1. Open firefox browser (it can managa security certificates out of the system trust store)
  2. Install FoxyProxy add-on
  3. Open FoxyProxy and in options set the proxy to Type: HTTP, Hostname: localhost, Port: 9992 and save it with your desired name
  4. Enable the proxy through FoxyProxy
  5. Visit http://mitm.it and download the certificate for Firefox
  6. Open Preferences -> Privacy & Security -> View Certificates -> Authorities -> Import and import the certificate, and allow it to identify websites
  7. Visit neosb.net and see the request in mitmproxy or mitmweb

Conclusion

You have successfully setup mitmproxy on your system. You can now intercept and modify HTTP/S traffic.

References