I have a pcap tracefile and private RSA key that should allow me to decrypt the HTTPS data in the pcap file.
With the exact same pcap file, private key and tshark command, I find that decryption fails in Oracle Linux 6 but succeeds in Ubuntu 18 and RHEL 8.
I would like to know what difference in environment/versions allows decryption to succeed on newer OSs but fail on the older OS.
tshark command is as follows (IP, private key path and pcap name simplified here):
tshark -V -n -o ssl.keys_list:220.127.116.11,443,http,/path/to/key.pem -o ssl.desegment_ssl_records:TRUE -o ssl.desegment_ssl_application_data:TRUE -o ssl.debug_file:rsa_private.log -r ./trace.pcap
Client Hello TLS information (as seen on RHEL8):
TLS 1.2 (0x0303) Extension: renegotiation_info (len=1) Extension: server_name (len=24) Extension: extended_master_secret (len=0) Extension: signature_algorithms (len=20) Extension: ec_point_formats (len=2) Extension: supported_groups (len=8)
Server Hello TLS information (as seen on RHEL8):
Version: TLS 1.2 (0x0303) Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f) Extension: renegotiation_info (len=1) Extension: server_name (len=0) Extension: extended_master_secret (len=0)
rsa_private.log log I find the following error messages on the old OS:
ssl_decrypt_record found padding 111 final len -48 ssl_decrypt_record wrong record len/padding outlen 96 ssl_decrypt_record: mac failed
Version information from different environments:
Oracle Linux 6 (fails to decrypt):
- TShark 1.8.10
- GLib 2.28.8
- GnuTLS 2.12.23
- Gcrypt 1.4.5
- Linux 4.1.12-124.30.1.el6uek.x86_64
- libpcap version 1.4.0
Ubuntu 18 (decrypts successfully):
- TShark (Wireshark) 2.6.10
- GLib 2.56.4
- GnuTLS 3.5.18
- Gcrypt 1.8.1
- Linux 4.18.0-22-generic
- libpcap version 1.8.1
RHEL8 (decrypts successfully):
- TShark (Wireshark) 2.6.2
- GLib 2.56.1
- GnuTLS 3.6.4
- Gcrypt 1.8.3
- Linux 4.18.0-80.4.2.el8_0.x86_64
- libpcap version 1.9.0-PRE-GIT
I presume something was added to libcrypt/openssl/gcrypt that allows the newer OS's to decrypt my traffic successfully, but I wonder what?
I have found other traffic using the same TLS version and cipher suite decrypt fine in the older OS.
EDIT: adding detail about TLS extension visibility in OL6 vs RHEL8:
OL6 shows the extension as follows (in both Hello's):
Extension: Extended Master Secret Type: Extended Master Secret (0x0017) Length: 0
RHEL8 shows the extension as follows (in both Hello's):
Extension: extended_master_secret (len=0) Type: extended_master_secret (23) Length: 0