Skip to content

Capture Modes

Wireshark Decryption Workflows ​

Use a request you can identify by its path or response token. Start the collector and any independent packet recorder before making the connection. The result to check is that application message in the decrypted stream.

Open a capture with embedded secrets ​

bash
sudo ecapture tls --model pcapng --pcapfile session.pcapng -i lo 'tcp port 8443'

This example assumes your own OpenSSL-backed HTTPS service listens on loopback port 8443. Generate a fresh request and stop eCapture. Open session.pcapng in Wireshark, select the test connection and follow the TLS stream. Packet blocks contain the encrypted traffic and DSBs provide the secrets. If you captured with --model text --text-source pcapng --pcapfile session.pcapng, the optional file contains the same pcapng stream the live decoder received.

A DSB may arrive after the packets it decrypts. To check the embedded secrets independently with Wireshark tools 4.4 or newer, extract them from this capture into a private temporary file, then preload them while reading it. This example reads TLS stream 0.

bash
keys=$(mktemp)
editcap --extract-secrets session.pcapng - > "$keys"
tshark -n -r session.pcapng -o "tls.keylog_file:$keys" -q -z follow,tls,ascii,0
rm -f -- "$keys"

For a capture containing several TLS connections, choose the target stream. Look for the test token rather than relying on a packet count. Embedded-secret verification

Combine a separate packet capture and key log ​

  1. Start a packet recorder on the interface carrying the test connection, for example sudo tcpdump -i lo -w network.pcap 'tcp port 8443'.
  2. In a second terminal run sudo ecapture tls --model keylog --keylogfile session.keys. Generate the request after both tools are ready. Stop both captures.
  3. Open network.pcap in Wireshark. In Preferences → Protocols → TLS, set the (Pre)-Master-Secret log filename to session.keys. Follow the test connection and verify its known request or response.

With TShark, the following command reads TLS stream 0 from the saved trace.

bash
tshark -n -r network.pcap -o tls.keylog_file:session.keys -q -z follow,tls,ascii,0

A key log from another connection or a trace that missed the handshake can leave a flow encrypted. Check the interface, test time and session before changing protocol settings. Standalone key log example

Inspect process attribution ​

The optional utils/ecapture.lua Wireshark plugin displays PID, process name and capture-time arguments when eCapture recorded them. Argument snapshots can be truncated at 256 bytes. A packet without attribution supplies no process identity. The plugin adds process fields independently of Wireshark's TLS decryption. For a quick view of an HTTP request without opening a trace, use text mode. Wireshark plugin

Wireshark Decryption Workflows has loaded

Released under the MIT License.