How to install & launch mitmproxy?


Hi all,
     Today I'm going to introduce a very interesting tool - mitmproxy.
     mitmproxy is a free and open source interactive HTTPS proxy. It could help us to capture the packets and investigate if the network flows work as our design.
     Here is the official website of mitmproxy: https://mitmproxy.org/
     
     The machine version I used is Ubuntu 16.04. Please note the latest version of mitmproxy isn't support python 2.7 anymore, so we should install python3 for running mitmproxy. 

     First, we must install python3 development lib: sudo apt-get install python3-dev

     Then, we should install pip3. We could use pip3 -V to check if it is installed.
If pip3 isn't installed, we should install it by sudo apt-get install python3-pip.


    Now, let's start to install mitmproxy by sudo pip3 install mitmproxy.
Wait for the installation completed.
     At this point, we make the mitmproxy installed. However, before we start to use the proxy, we need to know where is the certificate of mitmproxy!
     Modern browser and services usually use certificate to decide whether or not to trust a proxy, so mitmproxy has a default certificate installed. We could also change the certificate to others customized ones if needed.
     The default path of mitmproxy certificate is /root/.mitmproxy and the file name is mitmproxy-ca-cert.pem.


     We must insert the certificate to trusted certificate of browser before we could use this proxy via browser.
     Now, launch the mitmproxy by mitmproxy -p <port you want to listen>.



     Enjoy your proxy & packet investigation : -)


p.s. You can exit the proxy panel by press q



留言

The Hottest Articles

OWASP Security Shepherd Project - My Practice & Solutions

OSCP回顧 & 準備建議

OWASP Security Shepherd Project - SQL Injection 3 (Injection Challenge)