Questions tagged [mitmproxy]

mitmproxy is an interactive console tool that allows network traffic to be inspected and edited on the fly.

Its features include:

  • Intercept HTTP/HTTPS requests and responses and modify them on the fly.
  • Save complete HTTP/HTTPS conversations for later replay and analysis.
  • Replay the client-side of an HTTP/HTTPS conversations.
  • Replay HTTP/HTTPS responses of a previously recorded server.
  • Reverse proxy mode to forward traffic to a specified server.
  • Transparent proxy mode on OSX and Linux.
  • Make scripted changes to HTTP/HTTPS traffic using Python.
  • SSL certificates for interception are generated on the fly.

Project Homepage

441 questions
2
votes
0 answers

How to intercept requests from a specific app?

This is a rather conceptual question than a line of code question. I'm trying to proxy an android app in order to inspect its API calls, without having root access to the device. I'm using mitmproxy, and I've managed to create a system wide proxy…
Lior Pollak
  • 3,362
  • 5
  • 27
  • 48
2
votes
2 answers

How to listen to GET and POST requests for all connections using GO

I am using python and mitmproxy to listen to all incoming and outgoing traffic so that I can capture the URLs. I run the script and it tells me all URLs my computer is trying to connect to. I need to implement the same using Go but have not got a…
Han Hanz
  • 41
  • 4
2
votes
2 answers

MITM proxy ignore SSL certificate verification for android apps

Problem Description Trying to capture the traffic from an Android device using reverse tethering and then proxying the traffic to mitmproxy, we've installed the MITM certificate in the device. Browser traffic is working fine but application traffic…
Sawan Garg
  • 99
  • 1
  • 8
2
votes
0 answers

MITMProxy: TCP/UDP and WebSockets not captured on Android

I try to capture requests on an Android application and it works very well for the HTTP/HTTPS protocol but it seems that the proxy defined in the wifi settings is not taken into account for requests other than HTTP (TCP, UDP, WSS).The MITM Proxy…
2
votes
0 answers

SSL Pinning to avoid mitm and encrypting api request/response

I'm building an Android app and the client want me to do SSL Pinning to avoid any Mitm attacks. I've already implemented complete encryption and decryption on my API requests (JSON Format) and the corresponding responses (JSON Format). By searching…
Joe
  • 173
  • 1
  • 15
2
votes
1 answer

Certificate ending on 28/06/21 how to update it?

I'm using mitm on ios to test some app, but since yesterday I can't log in any website, or even use google. It seems that the certificate has expired on the 28/06. I've tried to download a new one on mitm.it, but it's already expired. Do someone…
2
votes
1 answer

Modify json body with mitmproxy

I am trying to intercept and modify a graphql response's body. Here is my addon code: from mitmproxy import ctx from mitmproxy import http import json def response(flow: http.HTTPFlow) -> None: if flow.request.pretty_url ==…
dilaver
  • 674
  • 3
  • 17
2
votes
0 answers

Caching proxy for all traffic

I am trying to find (or write) a caching proxy tool that accepts all traffic from a specific container in my localhost (using Iptables). What I want to do with this traffic is to save it and cache the response, and later, if I see that a request was…
Gal Shahar
  • 2,695
  • 1
  • 21
  • 29
2
votes
0 answers

Setting up proxy on firefox 89.0

I have changed to manual proxy, 127.0.0.1 on port 8080. That got me through to the certificates at http://mitm.it/ which I have downloaded and installed. But now firefox (latest version 89.0) is rejecting every web page because of mitmproxy. Under…
d8sconz
  • 279
  • 4
  • 14
2
votes
1 answer

how can I interpect all requests between docker containers?

I am looking for a way to intercept all the HTTP requests between docker containers, for debugging purposes. I am using MitmProxy and I can intercept the requests done from the containers to the internet (configured the HTTP_PROXY and HTTPS_PROXY…
brpaz
  • 3,618
  • 9
  • 48
  • 75
2
votes
1 answer

Client may not trust proxy certificate although add_upstream_certs_to_client_chain is set to True

I'm trying to perform MITM between a remote server and IoT internet bridge device but even though I set add_upstream_certs_to_client_chain=true, I'm still getting 'The client may not trust the proxy's certificate' error so basically it means proxy…
2
votes
0 answers

Python request to a CloudFlare protected API returning 403

I am running mitmproxy with an upstream to remote proxy. mitmweb --set mode=upstream:http://proxyIp:proxyPort --set ssl_insecure=true The application flow is: Make a HTTP request in Python and use mitmproxy server as proxies argument Intercept the…
Dino
  • 7,779
  • 12
  • 46
  • 85
2
votes
0 answers

Limit MITMproxy memory usage

We plan on using mitmproxy for our test and staging environments. However, we are running into the issue that these environments have limited memory available. MITMproxy seems (according to spec?) to simply store all our HTTPS API communications in…
Mat Ha
  • 53
  • 4
2
votes
0 answers

How can I switch mitmproxy mode based on attributes of the proxied request

I'm running mitmproxy in upstream mode. In my script I'm inspecting for a header, X-Direct, which indicates that the request should not be sent to the upstream proxy and instead be sent directly to the server. I figured out how to modify the proxy…
Brad Dixon
  • 168
  • 1
  • 12
2
votes
1 answer

A proxy inside a kubernetes pod doesn't intercept any HTTP traffic

What I am craving for is to have 2 applications running in a pod, each of those applications has its own container. The Application A is a simple spring-boot application which makes HTTP requests to the other application which is deployed on…