How to Implement and Test SSL Decryption

Objective

This document describes how to implement and test SSL Decryption on Palo Alto Networks Firewalls.

Overview

Inbound SSL Decryption

Outbound SSL Decryption (SSL Forward Proxy)

Environment

Procedure

To configure SSL decryption:

  1. Configure the firewall to handle traffic and place it in the network
  2. Make sure the proper Certificate Authority (CA) is on the firewall
  3. Configure SSL decryption rules
  4. Enable SSL decryption notification page (optional)
  5. Commit changes and test decryption

Steps to Configure SSL Decryption

1. Configure the Firewall to Handle Traffic and Place it in the Network

Make sure the Palo Alto Networks firewall is already configured with working interfaces (i.e., Virtual Wire, Layer 2, or Layer 3), Zones, Security Policy, and already passing traffic.

2. Load or Generate a CA Certificate on the Palo Alto Networks Firewall

A Certificate Authority (CA) is required to decrypt traffic properly by generating SSL certificates on the fly. Create a self-signed CA on the firewall or import a Subordinate CA (from your own PKI infrastructure). Select one CA for the Forward Trust Certificate and a different CA for the Forward Untrust Certificate to enable the firewall to decrypt traffic.

NOTE: Because SSL certificate providers such as Entrust, Verisign, Digicert, and GoDaddy do not sell CAs, they are not supported in SSL Decryption.

From the firewall web interface, go to Device > Certificates . Load or generate a certificate for either inbound inspection or outbound (forward proxy) inspection.

Generating a Self-Signed Certificate

Using a Self-Signed Certificate is recommended. For information on generating a Self-Signed Certificate, please review the following article: Create a Self-Signed Root CA Certificate .

Generating and Importing a Certificate from Microsoft Certificate Server

  1. On the Microsoft Certificate Server for your organization, request an advanced certificate using the certificate template “subordinate CA.” Download the cert.
  2. After downloading, export the certificate from the local certificate store. In Internet Explore (IE), access the Internet Options dialog, select the Content tab , then click the Certificates button . The new certificate can be exported from the personal certificates store. Select Certificate Export Wizard , export the private key, then select the format. Enter a passphrase and a file name and location for the resulting file. The certificate will be in a PFX format (PKCS #12).
  3. To extract the certificate, use this openSSL[4] command:
    openssl pkcs12 –in pfxfilename.pfx –out cert.pem –nokeys
  4. To extract the key, use this openSSL command:
    openssl pkcs12 –in pfxfilename.pfx –out keyfile.pem -nocerts
  5. Import the cert.pem file and keyfile.pem file into the Palo Alto Networks firewall on the Device tab > Certificates screen .
  6. In the case of a High Availability (HA) Pair, also load these files into the second Palo Alto Networks firewall, or copy the certificate and key via the High Availability widget on the dashboard.

Example - Certificates needed using a Self-Signed Certificate (SSL Forward Proxy)

A screenshot of a computer AI-generated content may be incorrect.

The self-signed " Trusted Root CA ":
please review the following article: Create a Self-Signed Root CA Certificate

A screenshot of a certificate AI-generated content may be incorrect.

A screenshot of a computer AI-generated content may be incorrect.

The " Forward Trust " certificate (signed by above Trusted Root CA):

A screenshot of a certificate AI-generated content may be incorrect.

A screenshot of a computer AI-generated content may be incorrect.

The " Forward Untrust " certificate (not signed)

A screenshot of a certificate AI-generated content may be incorrect.

A screenshot of a computer AI-generated content may be incorrect.

NOTE : If you're using a self-signed CA, export the Trusted Root CA certificate from the firewall and install the certificate as a Trusted Root CA on each machine's browser to avoid Untrusted Certificate error messages inside your browser. Network administrators usually use GPO to push out this certificate to each workstation.
IMPORTANT NOTE : Never set both checkboxes "Forward Trust Certificate" and "Forward Untrust Certificate" in the same certificate, and do not have the "Forward Untrust Certificate" deployed under a trusted certificate chain. If you do this, it will cause the firewall to present client devices with a CA certificate they trust, even when they connect to websites or applications that are presenting with invalid certificates to the firewall.

Below are some examples of browser errors if the self-signed CA Certificate is not trusted.

Firefox untrusted CA error:

Firefox browser giving an error due to untrusted CA certificate being presented

Chrome untrusted CA error:

Chrome browser giving an error due to untrusted CA certificate being presented

Internet Explorer untrusted CA error:

Internet Explorer (IE) browser giving an error due to untrusted CA certificate being presented

3. Configure SSL Decryption Rules

The network administrator determines what needs to be decrypted. A few suggestions for configuring SSL decryption rules:

Here is an example of an outbound rule base following suggestions for decryption:

A screenshot of a computer AI-generated content may be incorrect.

4. Enable SSL Decryption Notification Web Page (optional)

The default SSL Opt-out page can be exported, edited via an HTML editor, and imported to provide company-specific information:

A screenshot of a computer AI-generated content may be incorrect.

5. Test Outbound Decryption

To test outbound decryption:

The file was successfully detected by one of our threat prevention signatures in an SSL-encrypted session.

To test the “no-decrypt” rule:

To Test Inbound Decryption:

Helpful CLI Commands