Live data from Hacker News

Mitmproxy 8

mitmproxy.org

31–40 of 63 posts

Re: Mitmproxy 8

#31
post #27

I've used several other apps like Mitmproxy, and some of them have nicer UIs... but Mitmproxy is the only one I've found that supports MITM'ng connections using client certificates.

FWIW, Burp also does this. But I'm not sure I'd argue that it actually has a nicer UI ;)

Re: Mitmproxy 8

#32

Is there any benchmark against squid proxy in regards of cpu and memory usage? Anyone has expiernce with it or can recommend something else?

FWIW from experience MITMproxy eventually reaches a point on my 2019 MacBook Pro where the whole computer becomes unusable. I have to restart MITMproxy.

I don't think they are doing all the necessary GC when disposing of flows from the UI.

Re: Mitmproxy 8

#33
When I was a teenager I wrote generic proxy in Borland C++ Builder. I say generic because it was not protocol specific, at the time I called it a "bridge". I had lots of fun convincing 'friends' to try my "own IRC server" and watch they interact with other people.

These days I think it would be a simple matter of using tee and netcat, but it was fun at the time.

It is a shame getting a "real ip" is such a hassle nowadays.

Re: Mitmproxy 8

#35

This is cool. I’m learning a lot reading through the docs. Why is subversion so instructive? I’ve read about SSL certificates a gazillion times and it’s simple enough in theory but for some reason this is making everything click. What’s the use most common use case for something like this, by the way?

Believe it or not, the most common use-case is simply discovering what your code is actually doing. Modern frameworks are often so far removed from the nuts and bolts of HTTP and TCP that it can be difficult to know what's actually happening on the wire without using a tool like this.

A similar frustration is the tendency for SDK / library vendors to document their product using code snippets in various languages, but without simply showing you what the raw HTTP requests look like. Typically the closest you can get is a set of curl commands.

When you show me a python/ruby/swift/js snippet, I have a guess as to what's happening. When you show me HTTP, I know exactly what's going on. And if you won't show me HTTP, time to fire up mitmproxy.

Re: Mitmproxy 8

#36

Earlier quoted context omitted.

You can use this to debug stuff happening over TLS connections, but there are also other practical ways to use it. For example, install the CA certificate on your phone (with root if you have Android) and set up a WiFi network that transparently proxies everything through mitmproxy. Let it collect data for a while and you'll be surprised how many random servers even well known apps try to contact. You'll also be able…

I haven't tried it for replacing TLS certificates, but you do not need a rooted phone to mess with 3rd party apps on android. You can unpack an APK and re-sign it using your own key, allowing you to make whatever modifications to the APK you want. In addition to making whatever changes you want to directly (such as just replacing the pinned certificates), you can update the manifest to set the android:debuggable flag…

You're right, but this does have side effects. APIs like in app purchases and DRM freak out about the rogue signature.

It's also a huge hassle if you just want to see what metadata your phone is leaking.

If you're only going after a few specific apps then sure, you can just alter the APK. It's not hard to disassemble and patch the custom validation code most apps use either. The downside is just that it's a huge bother.

Re: Mitmproxy 8

#38

Neat! Anyone happen to know if there's progress on interactive interception of TCP TLS streams (non-http)?

Not yet. What works reasonably well is to iteratively work with a custom addon (addons are livereloaded on every change). But I'd love to see progress on that front, it'd make a great GSoC project! :)

Re: Mitmproxy 8

#39
post #27

I've used several other apps like Mitmproxy, and some of them have nicer UIs... but Mitmproxy is the only one I've found that supports MITM'ng connections using client certificates.

er. don't they all? at least all the sophisticated ones. otherwise you can't see the contents of https/etc requests. Charles does this as well for example, and it's reasonably popular: https://www.charlesproxy.com/

AFAICT it's roughly as widely used as mitmproxy, and e.g. google trends favors Charles by a moderate amount: https://trends.google.com/trends/explore?geo=US&q=%22charles...

or are you referring to some other cert-related feature?

Re: Mitmproxy 8

#40
post #31
post #27

I've used several other apps like Mitmproxy, and some of them have nicer UIs... but Mitmproxy is the only one I've found that supports MITM'ng connections using client certificates.

FWIW, Burp also does this. But I'm not sure I'd argue that it actually has a nicer UI ;)

Shameless plug: We (mitmproxy) have a somewhat reasonable web UI (React/Typescript), but I think there's a lot more potential here. We're also looking for Google Summer of Code students at the moment, so if someone wants to spend a few months hacking on cool FOSS stuff while getting a nice stipend for it, please check out https://github.com/mitmproxy/mitmproxy/issues/5048 and reach out to me. I'd love to work with good front end folks on this! :)
Post reply on HN