WebNet0: Decrypting TLS Traffic with RSA Private Keys

1. The Scenario & The Encrypted TLS Problem
We are handed two files:
- capture.pcap: A packet capture of a client browsing a website over HTTPS (port 443).
- picopico.key: An RSA private key in PEM format.
Opening capture.pcap in Wireshark shows traffic between client port 57581 and server port 443. If you attempt to follow the stream, the application data is encrypted inside TLS records:
2. Loading the RSA Private Key in Wireshark
Because the web server in this capture negotiated an RSA key exchange cipher suite (TLS_RSA_WITH_AES_...), having the server's private key allows us to decrypt the session pre-master secret.
- In Wireshark, press Ctrl + Shift + P (or go to Edit -> Preferences).
- In the left sidebar, click RSA Keys.
- Click Add new keyfile... and select
picopico.key. - Click OK.

3. Inspecting Decrypted HTTP Traffic & Finding the Flag
Once the key is saved, reload the capture (Ctrl + R). Wireshark decrypts the TLS payloads on the fly, and bright green HTTP packets immediately appear in the packet list!

Look at Packet 32: it's an HTTP/1.1 200 OK response from the web server.
Pico-Flag)
Expanding the Hypertext Transfer Protocol tree reveals that the server returned a custom HTTP response header:
HTTP/1.1 200 OK
Server: Apache/2.4.29 (Ubuntu)
Pico-Flag: picoCTF{nongshim.shrimp.crackers}
Content-Length: 821
4. The Fast Terminal Route (tshark CLI)
Once Wireshark has the key loaded in its preferences profile, you can dump decrypted HTTP headers straight from the terminal with a single command:
& "C:\Program Files\Wireshark\tshark.exe" -r .\capture.pcap -Y "http" -V | Select-String "pico"
tshark -r capture.pcap -Y "http" -V | grep -i "pico"5. Forensic Takeaway: Why RSA Key Exchange is Obsolete
RSA Key Exchange vs. Perfect Forward Secrecy (PFS):
The client encrypts the session key using the server's static public key. If an investigator (or attacker) gets the server's private key years later, 100% of historical recorded traffic can be passively decrypted.
Every session negotiates unique, disposable keys (ECDHE). Even if the server's master private key is leaked, past captures cannot be decrypted. In modern DFIR, analysts must capture the browser's SSLKEYLOGFILE in memory to decrypt traffic.
Decrypted Final Flag:
picoCTF{nongshim.shrimp.crackers}