Anyone interested in sharing use-cases where it has helped you?
Anyone interested in sharing use-cases where it has helped you?
One that sticks out in my mind is trying to receive Slack webhooks in Mattermost. I was unaware of Slack’s new BlockKit message format until I saw what was being sent. Then I wrote a simple python script to transform the payload, all within mitmproxy. It’s not the most efficient long term solution, but the fact I could diagnose and resolve the issue with a single tool, all within a few hours of first discovering it, was very satisfying.
Here’s the result for anyone interested (warning: it’sa quick hack, not a polished/maintained project)
https://github.com/thinkmassive/mattermost-webhook-slack-pro...
Edit: this doesn’t use TLS at all. I understand that’s probably the primary use case for the tool, but I thought this was a cool example of other ways it can be useful too.
Even if we don't need to manipulate the data, it's a very useful tool for watching requests go back and forth.
Development:
- Debug your own apps/devices (which do not come with Chrome Devtools).
- Simple Python scripts to replace/inject website content. (https://docs.mitmproxy.org/stable/addons-overview/)
- Capture a web page/API and then replay the responses offline. (https://docs.mitmproxy.org/stable/overview-features/#server-...).
- Replay requests for testing. (https://docs.mitmproxy.org/stable/overview-features/#client-...)
Privacy:
- Figure out what your Covid app is sending out (https://seancoates.com/blogs/how-i-helped-fix-canadas-covid-...)
- Look at how evil IoT devices for pets are (https://www.nytimes.com/2018/12/11/realestate/spying-on-the-...)
- Generally find more evil stuff (https://mitmproxy.org/publications/)
Security:
- Reverse-engineering custom binary protocols is never fun, but with mitmproxy you can at least write custom contentviews to dissect stuff. (https://github.com/mitmproxy/mitmproxy/blob/main/examples/ad...)
- Fiddle with generic TLS-protected TCP streams. (https://github.com/mitmproxy/mitmproxy/blob/main/examples/ad...)
- Dump TLS master secrets for WireShark. (https://docs.mitmproxy.org/stable/howto-wireshark-tls/)
The biggest problem was the server only syncing the player position every second or so which means my middleware has can only provide exact calculations when I stand still. Solving this would require reading the process memory but that is exactly what I wanted to avoid :/
Thank you for your work, @mhils & the team. Enjoy your moments of glory on HN :)