I've spent most of the day ripping my hair out trying to get SSL traffic to decrypt... Here is the capture i've taken which should just be a simple hit to IIS splash screen. https://dl.dropboxusercontent.com/u/8208314/Wireshark/Capture.pcapng The private key to the certificate is here: https://dl.dropboxusercontent.com/u/8208314/Wireshark/privatekey.pem I've checked the private key matches the certificate. The modulus has been compared. I can decrypt snake oil example. My debug log is here: https://dl.dropboxusercontent.com/u/8208314/Wireshark/debug.txt I've removed from IIS all the cipher suites for Diffie-Hellman and ECDH so am at a loss why this won't decrypt. The debug log is just saying there is no enough material to generate the key... what else does it need? asked 01 Jul '15, 08:39 ingybing |
One Answer:
Your SSL capture uses SSL session resumption and skips the ServerKeyExchange. Therefore the encrypted key is not transmitted over the wire and you cannot decrypt the traffic even if you have the private key. See the client request:
and the server response:
and the full communication (note: missing ClientKeyExchange):
See this figure from RFC 5246 for a flow diagram for the abbreviated handshake due to the use of session resumption (be sure to read the preceding text as well for a background). answered 01 Jul '15, 08:46 Lekensteyn edited 01 Jul '15, 08:52 |
Ok i think i understand... so i reset iis, closed my client ran another trace: https://dl.dropboxusercontent.com/u/8208314/Wireshark/capture2.pcapng and it's still not sending the serverkeyexchange during the server hello even through the client hello had no session id... so that ones no resuming an existing session is it? Shouldn't that be sending the server key exchange now? Is it due to the cypher why its not?
Also the snakeoil example doesn't have a server key exchange... i'm confused.....
@ingybing FYI, I have been working on this issue for the past days. The problem is within the parameters from your RSA private key. It upsets the crypto library (libgcrypt). I am now trying to find out the cause and a solution.
@ingybing It took some time to understand the cryptography behind it, but the fix such that your traffic is recognized can be found at: https://code.wireshark.org/review/9573