mitmproxy localhost and IIS

Download - install mitmproxy...

Download - install Firefox

Open & Configure Firefox

  • Firefox -> Settings
  • General (tab) bottom of the page Network Settings...
  • Manual Proxy Config
  • HTTP Proxy : localhost Port : 8080
  • HTTPS Proxy : localhost Port : 8080
  • In the URL search bar navigate to 'about:config'
  • Search for 'network.proxy.allow_hijacking_localhost' set to TRUE

Configure mitmproxy certificates

  • Open mitmweb.exe and open the URL in Firefox
  • Click File (top left)
  • Install certificates. (traffic error = not saved firefox proxy settings)

Download Firefox Cert following below instructions...

  • Firefox -> Settings
  • Privacy & Security (tab) bottom of the page View Certificates..
  • Navigate to the Authorities Tab
  • Click Import.. and select the downloaded certificate
  • Enabled Trust this CA to identify websites and click OK.

You may possibly need to Clear Data and Clear History from Firefox for this CA to enable correctly.

Start Injecting, mitmweb.exe (web-interface)

  • Click Options (tab)
  • tick: Don't verify server certificates (enabled)
  • Click Edit Options
  • tick: add_upstream_certs_to_client_chain (enabled)

These settings can take a moment to enable.

Intercept POST requests, mitmweb.exe (web-interface)

Start debugging the application through Firefox you should now see requests being made from localhost within the web-interface.

  • Click Start (tab)
  • Intercept : ~m POST

This will pause Intercept requests in the Flow Window that you can then modify to be run on resume.

If you see a 502 Gateway issue check the mitmproxy(web-interface)