question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can mitmproxy handle SSLv2 ClientHello?

See original GitHub issue

I’m trying to intercept connections for an app that sends an SSLv2 ClientHello, then upgrades to TLSv1 for the handshake. It looks to me like mitmproxy can’t handle that combination, or maybe I’m doing something wrong.

My command-line looks like this:

mitmdump -T --tcp '.*' --insecure -v --ciphers-client RC4-MD5

I need --insecure because this app doesn’t support SNI, and the cipher is just a second easy way to tell whether mitmproxy is doing its job.

The connection with TLSv1 hello/TLSv1 handshake

This is the one that works as expected. It serves the client a certificate with an organization name of mitmproxy, and my one expected cipher. The log looks like this:

192.168.56.101:3275: clientconnect
192.168.56.101:3275: serverconnect
  -> 1.2.3.4:443
192.168.56.101:3275: Establish TLS with server
192.168.56.101:3275: Certificate Verification Error for 1.2.3.4:443: hostname 'no-hostname' doesn't match either of '*.example.com', 'example.com'
192.168.56.101:3275: Ignoring server verification error, continuing with connection
192.168.56.101:3275: ALPN selected by server: -
192.168.56.101:3275: Establish TLS with client
192.168.56.101:3275 -> tcp -> 1.2.3.4:443
192.168.56.101:3275 <- tcp <- 1.2.3.4:443

The connection with SSLv2 hello/TLSv1 handshake

This case fails. It serves the client the server’s original cert with an organization name of GeoTrust, Inc., and ciphers other than the one I specified. The log looks like this:

192.168.56.101:3277: clientconnect
192.168.56.101:3277: serverconnect
  -> 1.2.3.5:443
192.168.56.101:3277 -> tcp -> 1.2.3.5:443
192.168.56.101:3277 <- tcp <- 1.2.3.5:443

So mitmproxy can see the connection, but it decides not to do anything with it. I tried --ssl-version-client TLSv1 on a whim but it had no effect.

Did I screw something up here?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stefcommented, Feb 5, 2018

sslv2 is not unencrypted.

0reactions
tehmooncommented, May 11, 2018

Running into the same issue as @stef. I still trying to debug but I’ve tried everything I could think of. I’m using Kali on docker. The package is at 3.0.4 I believe.

HTTP works fine, but TLS doesn’t. I can provide more info if needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

mitmproxy.tls
A TLS ClientHello is the first message sent by the client when initiating TLS. ... If wrap_in_record is True, the ClientHello will be...
Read more >
Surely No-one Uses SSL v2.0 on their Web site? Yes ...
The flaw itself has been speculated on for a while, and this latest announcement shows that it can actually be used to compromise...
Read more >
MITM attacks on SSL/TLS related to renegotiation
Once an SSL connection has been established, it is possible for both client and server, to require a renogo- tiation, also called a...
Read more >
cryptography - Should we configure all devices to never request SSL ...
An HTTP proxy is supposed to handle HTTP requests and responses. ... This can force SSLv2-aware clients and servers to use SSLv2, even...
Read more >
SSLv2 redux: patching Go crypto/tls to work with IE6
Anyway, Go doesn't support SSLv2, and neither does any other server, since it's ridiculously broken and there are no clients incapable of at ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found