![]() In this case it is easy enough to use a tool like tcpdump to capture the packets and inspect them with a tool like Wireshark.įor the demonstrations below, tshark is used instead of Wireshark. This is trivial when HTTP requests are sent over an unencrypted channel. To debug HTTP requests, it may be useful to capture traffic and look at the packets that are sent back and forth between the client and the server. ![]() In that case, feel free to open a bug with a capture file and PSK and ping me (and/or submit a patch).This entry was posted in Security and tagged apache security ssl tcpdump tls tshark wireshark on by Simon Studer Note: in theory TLS 1.3 with psk_ke should allow decryption, but I have not verified that not considered that in the implementation. If you want to skip the technical details, you can also just check the walkthrough linked on top of that post. It describes how to use a LD_PRELOAD libsslkeylog.so library to extract the required secrets. Since OpenSSL appears to be in use, have a look at this post. So you have to resort to techniques to extract the session secret. PSK Key Exchange Mode: PSK with (EC)DHE key establishment (psk_dhe_ke) (1) TLSv1.3 Record Layer: Handshake Protocol: Client HelloĮxtension: psk_key_exchange_modes (len=2) Your trace clearly advertises the former, psk_dhe_ke: Transport Layer Security If it is psk_ke, then the PSK should be sufficient to decrypt the session.In this case, an ephemeral Diffie-Hellman key exchange will be performed which requires additional secrets to allow Wireshark to decrypt the sessions. If it is psk_dhe_ke, then the PSK itself is no longer sufficient to decrypt the application traffic.In TLS 1.3, whether decryption is possible depends on the psk_key_exchange_modes extension: In TLS 1.2 and before, the PSK can be used with PSK cipher suites such as TLS_PSK_WITH_AES_128_CCM to decrypt sessions in Wireshark. Record: offset = 200, reported_length_remaining = 58ĭissect_ssl3_record: content_type 23 Application. Record: offset = 172, reported_length_remaining = 86ĭissect_ssl3_record: content_type 23 Application Dataĭecrypt_ssl3_record: app_data len 23, ssl state 0x97 Record: offset = 166, reported_length_remaining = 92ĭissect_ssl3_record: content_type 20 Change Cipher Spec Tls13_load_secret Cannot find SERVER_HANDSHAKE_TRAFFIC_SECRET, decryption impossible Tls13_load_secret Cannot find CLIENT_HANDSHAKE_TRAFFIC_SECRET, decryption impossible ![]() Tls13_load_secret transitioning to new key, old state 0x97 Ssl_load_keyfile dtls/tls.keylog_file is not configured! Ssl_set_cipher found CIPHER 0x1303 TLS_CHACHA20_POLY1305_SHA256 -> state 0x97 ![]() Ssl_dissect_hnd_hello_common found SERVER RANDOM -> state 0x93 Ssl_try_set_version found version 0x0304 -> state 0x91 Ssl_try_set_version found version 0x0303 -> state 0x91ĭecrypt_ssl3_record: app_data len 161, ssl state 0x91ĭecrypt_ssl3_record: using server decoderĭissect_ssl3_handshake iteration 1 type 2 offset 5 length 157 bytes Record: offset = 0, reported_length_remaining = 258 Packet_from_server: is from server - TRUE Ssl_dissect_hnd_hello_common found CLIENT RANDOM -> state 0x01 Record: offset = 0, reported_length_remaining = 312ĭissect_ssl3_record: content_type 22 Handshakeĭecrypt_ssl3_record: app_data len 307, ssl state 0x00ĭecrypt_ssl3_record: using client decoderĭecrypt_ssl3_record: no decoder availableĭissect_ssl3_handshake iteration 1 type 1 offset 5 length 303 bytes Packet_from_server: is from server - FALSEĬonversation = 000002F97BB5FA40, ssl_session = 000002F97BB605E0 Update: TLS debug file (-o tls.debug_file:debug.txt) says: dissect_ssl enter frame #4 (first time) What puzzles me as well is the output of "tshark -G userprefs": # Pre-Shared-Key as HEX string. TLSv1.3 Record Layer: Application Data Protocol: Application DataĮncrypted Application Data: 6e493a8a471ddd55eb82d095f02d88e037db62 Transmission Control Protocol, Src Port: 60130, Dst Port: 10050, Seq: 433, Ack: 407, Len: 24 PSK Identity is "psk" in Zabbix but I don't think that's relevant for TLS decryption in Wireshark. I'm not able to see the traffic unencrypted however. I have configured Wireshark 3.2.1 (or tshark 3.2.1) to use the configured TLS PSK. This is configured with pre-shared key as described in the documentation in. Hi, I'm trying to decrypt TLS 1.3 traffic, generated by Zabbix.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |