Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get master secret TLS
#3
Thx for the answer. I just found out myself .... it is all about using the right search keywords...It has just been incorporated in Python.

The functionality is made available through this project:

https://sslkeylog.readthedocs.io/en/latest/

The module can be downloaded here:

https://pypi.org/project/sslkeylog/#history

I use a Mac, for which installation works if you have Xcode command line utilities installed otherwise =u get an error xcrun .... developer path not found.

installed through xcode-select --install.

Use the demo code snippet.

import sslkeylog
sslkeylog.set_keylog("sslkeylog.txt")

The client random is written in this file.
To view the decrypted text, start wireshark, have it capture the transmission.
Run the python code setting up and exchanging stuff over TLS.
Then go to wireshark, stop the capture, select the TLS packet send or received from the host one is interested in, right click, choose TLS prefs, select the path and filename sslkeylog.txt as source for the premaster secret, close interface, select follow tls stream and it will display the decrypted text. I will post a more exact 'click and menu' options later for wireshark. But there are enough how to's around on how to configure it to use a (PRE)-master secret file as source for the sectret so it can decrypt the tls stream.

Such as here: https://wiki.wireshark.org/TLS

or here: http://www.root9.net/2012/11/ssl-decrypt...ivate.html
Reply


Messages In This Thread
Get master secret TLS - by robcordes - Oct-23-2019, 12:41 PM
RE: Get master secret TLS - by Larz60+ - Oct-23-2019, 02:20 PM
RE: Get master secret TLS - by robcordes - Oct-23-2019, 03:34 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020