TLSKEYLAB · TLS LAB
TLS 1.2 / 1.3 · SSLKEYLOGFILE · VISUAL GUIDE
Look inside TLS without touching the wire.
A Windows tool that sets up SSLKEYLOGFILE, captures with dumpcap and opens Wireshark with your own HTTPS traffic decrypted. A single Go binary, reversible, with no attack on the cryptography.
- a single Go binary
- ~2 MB
- reversible
- 100 %
- screens in the guide
- 3
- parts explained
- 10
What it is and what it is for
tlskeylab is a Windows tool to practise decrypting your own HTTPS traffic in Wireshark with the standard SSLKEYLOGFILE mechanism, in a local lab. It is a single self-contained Go binary of about 2 MB, idempotent, logs every action and is 100 % reversible.
Wireshark never “breaks” TLS: it reuses the session secrets the browser itself writes to the key file when the SSLKEYLOGFILE variable is set. Each line pairs the ClientHello Random with a secret (CLIENT_RANDOM in TLS 1.2; CLIENT/SERVER_HANDSHAKE_TRAFFIC_SECRET, CLIENT_TRAFFIC_SECRET_0 or EXPORTER_SECRET in TLS 1.3), from which the symmetric keys are derived.
The kit includes integrated capture with dumpcap, a lab HTTPS login server (labserver.exe) and tlsviewer.py, which opens Wireshark with its own profile and the keylog already loaded. It only decrypts sessions from processes that inherit the variable and it is not retroactive.
When to use it
Really understanding TLS 1.3
See what travels in the clear and what is encrypted, and how a keylog lets you read content without attacking the protocol.
Debugging your own app
Inspect HTTP/2 requests from your browser to your test service without disabling TLS.
Hands-on security class
Set up labserver.exe’s login in an isolated lab and decrypt the test credentials in Wireshark.
How it works
User variable
setup sets SSLKEYLOGFILE in HKCU\Environment and notifies the system with WM_SETTINGCHANGE so new shells pick it up.
Scoped share and firewall
It shares the key folder read-only and opens SMB only to the local subnet; everything goes to tool.log.
Browser with the variable
launch starts Chrome or Edge with the variable injected, because Chromium browsers only read it at start-up.
Decryption in Wireshark
With the capture and the keylog, Wireshark derives the keys and shows HTTP/2 in the clear under “Decrypted TLS”.
What changes on pwn3d.es
- On pwn3d.es the tool is explained with a visual guide: its interface recreated in CSS, screen by screen, with each part numbered and explained.
- pwn3d.es neither runs nor hosts the tool: to use it there are its official site and repository, always at their latest version.
Installation and usage
Installation
tlskeylab.exe setup # crea %USERPROFILE%\tlskeylab\sslkeys.log, fija SSLKEYLOGFILE y comparte la carpeta en solo lectura
tlskeylab.exe status # variable, número de claves, recurso y regla de firewallUsage
tlskeylab.exe launch chrome # o: launch edge
tlskeylab.exe capture 30 -i 4 # pcapng junto al keylog; Ctrl+C para terminarpython3 tlsviewer.py # detecta keylog, pcapng y Wireshark; crea el perfil TLSKeyLab
python3 tlsviewer.py --list # muestra qué usaría sin abrir nadatlskeylab.exe uninstall # deja keylog y logs
tlskeylab.exe uninstall --purge # borra también los ficherosReal examples
CLIENT_HANDSHAKE_TRAFFIC_SECRET 3e5d3293ba6af... 5c82d8575aae33...
First hex: ClientHello Random (identifies the session). Second: the secret the keys derive from.
Stack and dependencies
- Go
- Self-contained tlskeylab.exe and labserver.exe
- dumpcap (Wireshark)
- Integrated pcapng capture
- Python 3
- tlsviewer.py to open Wireshark with the keylog
- PowerShell
- End-to-end tests on Windows
- SQLite
- Lab login database
git · repository code
Explore the repository
Related tools
Concept and documentation adapted from tlskeylab, released under the MIT licence. The handshake, key schedule, NSS parser, fictional capture and entire interface were rewritten for pwn3d.es. No binaries are rehosted and no traffic is captured.