Networking/Computing Tips/Tricks

Check out these great references as well: 

 Our custom profiles repository for Wireshark
 Our Udemy course on Wireshark 
 Our Udemy course on Wireless Packet capture

I am often asked how SSL and TLS can be decrypted in Wireshark captures.  I have written a separate article on HTTS Decryption in Wireshark here. 

NOTE: Wireshark no longer supports this decryption process.  You have to use an older version of Wireshark.   The reason decrypting SSL with an RSA key isn’t commonly used anymore is that Perfect Forward Encryption (PFE) has made it obsolete. Sessions negotiated with Diffie-Hellman don’t use the RSA key directly; instead they generate a one-time key, stored only in RAM, that is encrypted using the key on disk.

The procedure/experiment below will allow you to uncover this process and practice it using a capture provided and SSL/TLS keys - also provided.  

Let's start by first downloading a ZIP file here.  I suggest unzipping this to your desktop, as all procedures below are illustrated that way.

Assuming you have done so, you will have the following three files:

Screen Shot 2017 07 15 at 10.35.58 AM

Step 1: Open the .pcapng File

If you have Wireshark installed, you should simply be able to double click it.  The Wireshark screen should look like this if you are in the default profile:

Screen Shot 2017 07 15 at 10.41.15 AM

A little note:  We have the TRANSUM plugin enabled.  It is not necessary, so do not worry about the TRANSUM information.

A quick study of the capture reveals TCP and the content is encrypted.  So we have no real idea of what is going on.  Looking at packet #4:

Screen Shot 2017 07 15 at 10.44.41 AM

By the way the Random field is part of the TLS key!

You also see that packet 11 is just application data and we have no idea what it is.

Step 2: Using the SSL Key

To unlock this capture, we need two things:  the SSL key, and the TLS key.

We begin by configuring the SSL Key.

Go to Wireshark> Preferences on a MAC or Edit> Preferences on a Windows machine.  With either you will get the following screen:

Screen Shot 2017 07 15 at 10.48.20 AM

Now select the Protocols, and scroll down to the SSL Protocol:

Screen Shot 2017 07 15 at 10.49.44 AM

Next, click the Edit button next to RSA Keys list.  The following pop up will appear:

Screen Shot 2017 07 15 at 10.51.14 AM

This screen allows you to configure multiple keys.  The cool thing is that Wireshark will use whatever key works!

Click the "+" sign to add a new key, and enter the information as shown (the system will begin expecting the IP Address, then tab to the Port and Protocol fields; you have to click the area just below the Key File to open the file navigation and ofcourse you will select TheSSL.key file that was unzipped to your desktop):

Screen Shot 2017 07 15 at 10.54.18 AM

Click OK.

Step 3: Adding the TLS Key

Now, select the browse button to configure the Master Secret log filename (TheTLS.key that should be on your desktop):

Screen Shot 2017 07 15 at 10.59.24 AM

Click the OK button.

At this point the display in Wireshark is going to change:

Screen Shot 2017 07 15 at 11.01.39 AM

Now we see that packet 11, for instance, is actually OpenFlow, and Wireshark has been able to dissect the protocol.

Congratulations!  

You have successfully configured Wireshark to decrypt SSL and TLS.  Hope you find this article helpful, and if you would like to see more articles like this, please support us by clicking the Amazon links, or buying us a cup of coffee!

Anything you would add?

I hope you find this article and its content helpful.  Comments are welcomed below.  If you would like to see more articles like this, please support us by clicking the patron link where you will receive free bonus access to courses and more, or simply buying us a cup of coffee!, and all comments are welcome!

 

Comments powered by CComment

Did you learn something?
Did I save you time? 

Buy me a coffeeBuy me a coffee!

Find by Tag

4G Networks 5G Networks 6LoWLAN 6LoWPAN 802.11 802.11ah 802.11ax 802.11ay 802.11az ACL Addressing Analysis Ansible Architecture ARP AToM Backup Bandwidth BGP Biography Bloom's Taxonomy CBRS CellStream Cellular Central Office Cheat Sheet Chrome Cisco Clock Cloud Computer Consulting CPI Data Center Data Networking Decryption DHCPv4 DHCPv6 Display Filter DNS Documentation dumpcap ECMP EIGRP Ethernet Ethics Flipping the Certification Model Follow Me Fragmentation G-MPLS Git GNS3 Google GQUIC Hands-On History Home Network HTTPS ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 In A Day Internet IOS Classic IoT IPsec IPv4 IPv6 IS-IS L2 Switch L2VPN L3VPN LDP Linux LLN Logging LoL M-BGP MAC Macro Microsoft mininet Monitoring Monitor Mode MPLS Multicast Name Resolution Netcat Netflow NetMon netsh Networking Network Science nmap Npcap nslookup Online Learning Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX Parrot PIM Ping Policy POTS POTS to Pipes PPP Profile Profiles Programming Project Management PW3E Python QoS QUIC Remote Desktop Requirements RIP Routing RPL RSVP Rural SAS SDN Security Self Certification Service Provider Small Business Smartport SONET Speed SSH SSL Subnetting T-Shark TCP TCP/IP Telco Telecom 101 Telecommunications Telephone Telnet Terminal TLS Tools Traceroute Traffic Analysis Traffic Engineering Training Travel Tunnel Ubuntu Utility Video Virtualbox Virtualization VoIP VRF VXLAN Webex Wi-Fi Wi-Fi 6 Wi-Fi 6/6E Windows Wireless Wireless 5G Wireshark Wireshark Tip WLAN ZigBee Zoom

Twitter Feed