Sniff iPhone HTTP Traffic using mitmproxy

Published on May 11, 2012

Sniffing traffic is a very hackish thing to do. So if you are against hacking things, stop reading.

There are a couple of ways to sniff the HTTP traffic. Using Wireshark, which has a nice user interface, is one of the mos popular ways. Today, I am going to introduce another tool call mitmproxy.

mitmproxy is an SSL-capable man-in-the-middle proxy. It was the very tool that was used to discover the misdeeds of Path.


How to use mitmproxy?

  1. Download mitmproxy, and install. You could install from source and run sudo python install
  2. Go to your Terminal and run mitmproxy.
  3. Obtain the IP address of your computer by running ifconfig en1 (or whatever that you are using).
  4. Set the proxy on your iPhone by going to your connected wifi settings. Set HTTP Proxy to “Manual”, and enter the IP of  your computer with port as 8080.
  5. Start sniffing! Refer to the console tool guide. Press ‘?’ to bring up the list of commands.