Skip to content

Instantly share code, notes, and snippets.

@ayosec
Created November 30, 2018 14:12
Show Gist options
  • Save ayosec/52ef4942bf3e0e8dd310d40298749814 to your computer and use it in GitHub Desktop.
Save ayosec/52ef4942bf3e0e8dd310d40298749814 to your computer and use it in GitHub Desktop.

Debug HTTPS Connections

  1. Set SSLKEYLOGFILE to a path where private keys will be stored:

    $ export SSLKEYLOGFILE=/some/path/keylog
    $ firefox
  2. Capture HTTPS traffic:

    $ sudo tcpdump -s0 -i any -w /some/path/data.pcap
  3. Analyze the captured traffic:

    $ tshark                                 \
        -o ssl.keylog_file:/some/path/keylog \
        -r /some/path/data.pcap              \
        -Tjson                               \
        -e http.request.method               \
        -e http.request.full_uri             \
        -e http.file_data                    \
        -e http.response.code                \
        -Y http.request.method==POST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment