|
Hello I'm debugging my SSL application and would be great if I could capture SSL stream using Wireshark and then follow it decrypted. It is not possible to obtain server's private key in my case But as a client application I can read the whole stream fine and can dump all needed information for decryption, like Session-ID and Master-key, ex:
Is it possible somehow to follow decrypted stream in Wireshark without server's private key but having client's Master-Key and Session-ID? |
|
OK, forget my last answer... as of today, it is possible to use the "openssl s_client" output to do decryption. I added this to the keylog option that was already there. You can now use the format:
In the key log file to decrypt the session. In your case that would be:
You will need to build your own version from "trunk" or use an automated build which will be available in a couple of hours. Please use a version with a number higher or equal to 37401. I hope this works for you :-) Great, that works!!! Thank you very much! Only one small note: if keylog file does not contain trailing CRLF I receive this error:
But after adding CRLF at the end - all works perfect!
(26 May '11, 03:22)
tosiara
I'm glad it works for you too :-) Indeed the code requires all lines to be terminated with a newline character.
(26 May '11, 04:59)
SYN-bit ♦♦
|
|
At the moment "No, not directly". There has been code added that reads in a file with a list of decrypted PreMasterSecrets, indexed by the first 8 bytes (IIRC) of the Encrypted PreMasterSecret. It has been added by a developer that also added a debug option to the SSL library of Firefox/Chrome to export this data (see Bug 4349) So at the moment, you might be able to fabricate the file yourself based on the tracefile and the "openssl s_client" output. In the future there might be more options added to import/export session keys to make decryption possible without obtaining (or exposing) the private key. I'm glad you knew this SYN..my knee-jerk reaction to this question was "No - never". It makes sense that this would be possible, but considering the work necessary on the user end I figured it would never be an option.
(25 May '11, 08:16)
GeonJay
I'm sorry, the route of creating a keylog file yourself based on the openssl s_client output won't work. I just tried it myself, but the input from the key-log file is a PreMasterSecret, while the output of openssl s_cient is the MasterSecret. I need to dig into SSL some more again to see whether the MasterSecret contains enough information to decrypt the session. If it does, then it is possible to extend the decryption engine to also take the MasterSecret from the s_client output. But someone needs to find the time to code it...
(25 May '11, 09:28)
SYN-bit ♦♦
|
