Skip to main content
shafiq23
Staff & Editor
Staff & Editor
Jul 24, 2024 7:26 AM UTC

Technical Tip: Decrypt L7 HTTPS Virtual Server with TLS1.3 traffic

Description This article describes how to decrypt the L7 HTTPS virtual server with TLS1.3 traffic.
Scope FortiADC, FortiADC-VM
Solution
  1. Prepare debugging commands and SSH to FortiADC (log session to a file):


diagnose debug module httproxy set-filter vsname=<vs> <----- Replace <vs> with respective virtual server name
diagnose debug module httproxy ssl_ae_info
diagnose debug module ssl-of-httproxy all set
diagnose debug enable

 

  1. Packet capture:

 

4.png

 

  • Define Interface, Host IP/Netmask, Port, and other settings.
  • Possible to capture both frontend and backend traffic depending on the filters used.

 

  1. Simulate access to L7 HTTPS VS while debug and packet capture running at the same time.

 

Sample of TLS1.3 keys output:

 

1.png

 

  • Once complete, disable debugging using below commands:


diagnose debug module httproxy unset-filter
diagnose debug module httproxy all unset
diagnose debug disable

 

  • Stop packet capture and download the .pcap file

 

Note:

If 'diagnose debug module httproxy all set' is used, debugging outputs include all features debugging. Use the below command in a Linux machine to filter TLS1.3 keys in the debug file.

 

awk '/EXPORTER_SECRET|SERVER_HANDSHAKE_TRAFFIC_SECRET|SERVER_TRAFFIC_SECRET_0|CLIENT_HANDSHAKE_TRAFFIC_SECRET|CLIENT_TRAFFIC_SECRET_0/{print $1" "$2" "$3}' tls1.3_flow.log > tls1.3_key.file <----- Replace 'tls1.3_flow.log' with the respective source debug file.

 

  1. Download the packet capture file and open the file with Wireshark.

 

Encrypted HTTP content packet capture:

 

2.PNG

 

Go under Edit -> Preferences:

 

5.png

 

In the new window, select Protocols -> TLS:

 

6.png

 

Under (Pre)-Master-Secret log filename -> Browse, select TLS1.3 keys file and 'OK'.

 

Decrypted HTTP content packet capture:

 

3.PNG

 

Refer below article to decrypt TLS1.2 traffic
Troubleshoot Tip: Decrypt FrontEnd and BackEnd traffic on HTTPS TCP/443 

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024