Visual guide
TLSKeyLab
What each part of tlskeylab does to read your own HTTPS traffic in Wireshark: the console, the key log file and the already-decrypted capture.
- ~2 MB
- a single Go binary
- 100 %
- reversible
- TLS 1.2/1.3
- both versions
- 0
- attacks on the crypto
3 screens · 10 parts explained
The console: set up, launch and capture
Everything is done with tlskeylab.exe subcommands on Windows. Every action is logged and can be undone.
tlskeylab.exe setup
✔ %USERPROFILE%\tlskeylab\sslkeys.log
✔ SSLKEYLOGFILE (user)
folder shared read-only
tlskeylab.exe status
- SSLKEYLOGFILE
- OK
- keys
- 148
- share
- RO
- firewall
- rule
tlskeylab.exe launch chrome
chrome inherits the variable
tlskeylab.exe capture 30 -i 4
dumpcap → capture_1042.pcapng
✔ 30 s · 2 318 packets
- setup
- launch
- capture
- tlsviewer
- uninstall
setup
Creates the key log file and sets SSLKEYLOGFILE for your user. It is the only system change, and it is reverted later.
status
Shows at a glance the variable, how many keys have been written, the share and the firewall rule.
launch and capture
Opens the browser so it inherits the variable and records traffic with dumpcap next to the key log.
Full cycle
From setup to uninstall. uninstall keeps the files; --purge deletes them too.
The file that changes everything
Wireshark does not break TLS: it uses the secrets the browser itself writes to sslkeys.log, one line per secret.
sslkeys.log
1CLIENT_HANDSHAKE_TRAFFIC_SECRET 3f9a…c21e 8b41…07d2 2SERVER_HANDSHAKE_TRAFFIC_SECRET 3f9a…c21e 61cc…9f0a 3CLIENT_TRAFFIC_SECRET_0 3f9a…c21e a7e0…44b9 4SERVER_TRAFFIC_SECRET_0 3f9a…c21e 1d95…be63 5EXPORTER_SECRET 3f9a…c21e 0c7f…e118 6CLIENT_RANDOM 5e21…aa04 9d3b…7c11
Anatomy of a line
- label
- ClientHello Random
- secret
- TLS 1.35 secrets per sessionHANDSHAKE / TRAFFIC
- TLS 1.21 master secretCLIENT_RANDOM
One line per secret
The browser appends them while you browse. Only processes inheriting the variable do so, and never retroactively.
How it is matched
The ClientHello Random identifies the session in the capture; the secret lets the symmetric keys be derived.
TLS 1.2 versus 1.3
1.2 uses a single CLIENT_RANDOM; 1.3 splits handshake and application-traffic secrets.
The result: readable HTTP in Wireshark
tlsviewer.py opens Wireshark with its own profile and the key log loaded: TLS frames now show the HTTP they carry.
http2 || http
Profile: TLSKeyLabTLS keylog ✔
| No. | Source | Destination | Protocol | Info |
|---|---|---|---|---|
| 112 | 192.168.56.10 | 192.168.56.20 | TLSv1.3 | Client Hello |
| 118 | 192.168.56.10 | 192.168.56.20 | HTTP2 | HEADERS: POST /login |
| 121 | 192.168.56.20 | 192.168.56.10 | HTTP2 | HEADERS: 302 Found |
| 130 | 192.168.56.10 | 192.168.56.20 | HTTP2 | HEADERS: GET /panel |
Decrypted segment (labserver.exe)
1:method: POST 2:path: /login 3content-type: application/x-www-form-urlencoded 4 5user=lab&password=••••••
Profile and filter
The TLSKeyLab profile ships columns and the key log configured; just filter by http or http2.
Decrypted frames
Where there was only “Application Data”, HTTP requests now show with their method and path.
Your own lab
labserver.exe is a test HTTPS login on your own machine, to practise without touching anyone else’s services.
How it is used
setup
Create the key log and set the variable.
Browse and capture
Launch the browser through tlskeylab and record with capture.
Open in Wireshark
tlsviewer.py prepares everything and shows the decrypted traffic.
Undo
uninstall returns the system to its previous state.
Key concepts
- SSLKEYLOGFILE
- A standard environment variable: if set, browsers and TLS libraries write their session secrets there.
- ClientHello
- The first TLS handshake message; its Random field identifies the session.
- pcapng
- The network capture format Wireshark opens.
- ECDHE
- Ephemeral key exchange: without each session’s secret it cannot be decrypted, not even with the server key.
Want to use it for real?
tlskeylab only decrypts traffic from your own processes on your own machine. The full tool and its download are on the official site.