
The other thing that you’ll need to do before decrypting TLS-encrypted traffic is to configure your Web browser to export client-side TLS keys.

The first step in using it for TLS/SSL encryption is downloading it from here and installing it. Utilizing Homebrew run the following in your terminal.Wireshark is a commonly-known and freely-available tool for network analysis. The installation of mitmproxy is straightforward depending on your OS. When streaming is enabled message bodies are not buffered and are sent directly to the client/server. When used in conjunction with client replay you can record the authentication process and simply replay it on start when you need to access secured resources. The stickycookie option will add the most recently set cookie to all cookie-less requests. HTTP Authorization headers are replayed to the server once they have been seen. The stickyauth option is similar to the sticky cookie option. The server_replay option lets you replay server responses from saved HTTP conversations. The proxyauth option asks the user for authentication before they are permitted to use the proxy. In this example we are setting the User-Agent header from ~/useragent.txt on all requests. A typical block_list pattern uses mitmproxies filter expression to construct patterns.

You can instruct mitmproxy to return an HTTP status code or no response. The block_list option uses patterns that allow you to block specific websites or requests. Setting this option is useful if you want to make sure you capture a full HTTP exchange. This response tells the requester that the resource you’ve requested has not been updated since the last time you accessed it. During normal HTTP/S exchanges, these headers might elicit a 304 Not Modified response. The anticache option allows one to set a boolean that removes the if-none-match and if-modified-since headers. You can check out the full feature set from the docs here. Here is a brief overview of some of the features mitmproxy has to offer.

This tool is great in that you can decrypt and modify packets on the fly. Mitmproxy is a free and open-source proxy capable of intercepting SSL/TLS for HTTP/1, HTTP/2, and WebSockets.
