News for hackers. Stuff that matters.
Re:Mitmproxy 5.3 by cjbprime on Sunday November 01, 2020 @10:54AM (#24960262)
mitmproxy is great! I wish there was a way to conveniently look at non-HTTP TLS traffic, though. I saw a few documented "TCP mode" options but they don't seem to get me access to plaintext. Any ideas?
Re:Mitmproxy 5.3 by mhils on Sunday November 01, 2020 @11:04AM (#24960338)
You can view TCP contents in the mitmproxy UI since a few months (thanks to some excellent community contributions). Minimal example:

  mitmproxy --mode reverse:http://example.com --tcp-hosts example.com
  curl http://localhost:8080/
There's still quite a bit we want to improve on (e.g., our protocol detection currently fails for protocols that start with a server-side greeting), but the basic TCP viewing functionality is there. :)
Re:Mitmproxy 5.3 by e12e on Sunday November 01, 2020 @11:54AM (#24960721)
If you just need to look at the traffic, maybe wireshark in combination with SSLKEYLOGFILE can help, if your client supports that option (eg: libssl):

https://gitlab.com/wireshark/wireshark/-/wikis/TLS#using-the...

Re:Mitmproxy 5.3 by cjbprime on Sunday November 01, 2020 @04:43PM (#24962775)
Yeah, sadly the clients I care about never seem to support that.
Re:Mitmproxy 5.3 by e12e on Sunday November 01, 2020 @05:08PM (#24962958)
Which ssl libraries do they use?
Re:Mitmproxy 5.3 by smilliken on Sunday November 01, 2020 @11:03AM (#24960329)
mitmproxy will generate a certificate for you to install on the client.
Re:Mitmproxy 5.3 by H4sh3 on Sunday November 01, 2020 @10:57AM (#24960288)
Can you even do this if the client hasn't installed your cert?
Re:Mitmproxy 5.3 by dewey on Sunday November 01, 2020 @11:02AM (#24960321)
No, only works if there's a way to install custom certificates on the device you are monitoring. Otherwise that would defeat the whole purpose of https (If there are no bugs in the implementation or other security issues of course).

For mitmproxy that would be achieved like this: https://docs.mitmproxy.org/stable/concepts-certificates/

Re:Mitmproxy 5.3 by H4sh3 on Sunday November 01, 2020 @11:07AM (#24960356)
Thought so i played around with this and my phone, self hacking ;)

It's also very nice to intercept app traffic. Some use cert pinning, so the custom certificate won't work.

Re:Mitmproxy 5.3 by feanaro on Sunday November 01, 2020 @12:13PM (#24960877)
In most cases you can get away with simply connecting to the application with `objection` (mentioned in a sibling post) and running `android sslpinning disable`.

This will fail in some cases when the application is obfuscated or uses a non-standard pinning mechanism. In this case you can decompile the application to determine the methods used to accomplish the pinning and use frida (https://frida.re) directly in order to manually override them.

Re:Mitmproxy 5.3 by capableweb on Sunday November 01, 2020 @11:35AM (#24960561)
Think there are a few tools for getting around the certificate pinning, projects like sensepost/objection
Re:Mitmproxy 5.3 by colechristensen on Sunday November 01, 2020 @11:01AM (#24960318)
It depends on how the client will treat an untrusted cert.
Re:Mitmproxy 5.3 by arkadiyt on Sunday November 01, 2020 @11:00AM (#24960313)
Wireshark might be a better tool for this
Re:Mitmproxy 5.3 by cjbprime on Sunday November 01, 2020 @04:42PM (#24962770)
Wireshark doesn't natively decrypt TLS traffic, though. And SSLKEYLOGFILE is not supported by many network apps.