

The simple file structure that we would be using looks like: CLIENT_RANDOM Wireshark can accept a NSS Key Log Formatted file containing the client random and corresponding master secret for the session and use it to decrypt TLS traffic. To decrypt TLS traffic we need access to the master secret that is negotiated as part of the TLS connection process. We start from the point where we have a setup to capture and view the network traffic in Wireshark (v3.0.6-0-g908c8e357d0f). I will not be going into the details of how the Wi-Fi traffic was sniffed. The communication uses MQTT protocol and we need to decrypt the application level exchanges happening over the TLS1.2 transport layer. In the case I am describing below, the communication is happening between a PIC32 device running WolfSSL and AWS IoT core. So we resort to the second (and most foolproof) method. Getting access to the server’s private key in the case of a cloud service like AWS IoT is impractical. Even if the network traffic is sniffed, this data cannot be decrypted unless you get access to either the negotiated key or the server’s private key. All data in this communication will be encrypted using a set of session specific keys derived at the time of connection. In addition, there will be a Decrypted TLS tab at the bottom of the packet bytes view.A typical cloud connected device communicates with the server over a TLS connection.


You will now notice packets containing the protocol under the TLS layer.For (Pre)-Master-Secret log filename, click Browse then select the log file you created for step (3).If you are using a previous version of Wireshark, navigate to SSL If you are using Wireshark 2.9+, navigate to the TLS protocol.In Wireshark, navigate to Edit and open Preferences.to create a new user variable and then fill out the dialog with the variable name SSLKEYLOGFILE and set the value to the file path you would like keys written to, e.g: C:\temp\sslkeylog.log. On the System Properties dialog that appears, click Environment Variables.In Windows, navigate to Control Panel > System and Security > System then click Advanced System Settings.Wireshark has the functionality to read the session keys from this file and use them to decrypt the TLS sessions. Applications like Mozilla Firefox and Google Chrome support symmetric session key logging to a file.
