Decryption Policy

Cisco Secure Firewall Decryption Policy Guidance

Language: English | 日本語

Introduction

Encrypted traffic can carry both legitimate content and threats. Decryption policies help determine which connections to inspect and which to leave encrypted.

Visibility into encrypted traffic is critical for effective network security. However, TLS decryption is a resource-intensive process and, if improperly configured, could potentially allow attacks and even degrade the end-user experience. This document covers the best practices for configuring TLS inspection on Secure Firewall.

The original screenshots illustrate an earlier FMC interface. The TLS 1.3 procedure below requires FMC/FTD 7.2 or later with Snort 3 on the managed device; option names and restrictions vary by release. Use the decryption guide for the target release when planning a deployment.


📘

Note

Before we go any further, you may have already noticed that TLS and SSL are often used interchangeably. We use TLS/SSL to indicate that either protocol is being discussed. The IETF has deprecated the SSL protocol in favor of the more secure TLS protocol, so you can usually interpret TLS/SSL as referring to TLS only.

For more information about SSL and TLS protocols, visit SSL vs. TLS - What's the Difference?

Decryption Policy

The Decryption Policy governs how the Secure Firewall Threat Defense handles encrypted traffic. Visibility into TLS encrypted traffic provides better information for IPS inspection, File and Malware detection, and micro application visibility. Apart from inspecting flows, you can use the TLS/SSL policies to block server connections supporting older TLS/SSL versions or weak ciphers.

If configured, Decryption Policy evaluation occurs before an Intrusion or File Policy, as illustrated here:

**Figure 1:** Encrypted Traffic Processing

Figure 1: Encrypted Traffic Processing

Decryption Rule Evaluation

The Decryption rules are evaluated top-down. Based on the fields used to define the Decryption rule, some flows might match more than one rule, this is called an "ambiguous match." Figure 2 below shows the various fields available to configure a Decryption rule match. The Decryption rule's complexity determines the resources used to establish the policy match's verdict for a flow.


**Figure 2:** SSL Rule Fields

Figure 2: Decryption Rule Fields


The following table is a simplified view of a full, certificate-based TLS 1.2 handshake. In TLS 1.3, the server certificate is encrypted after ServerHello; see Handling TLS 1.3 Servers for certificate discovery and cache considerations.

Before TLS HandshakeTLS Client HelloTLS Server Response
FTD has the L2-L4 information about the flowFTD has the additional information of SNI (Server Name Indication)Server Certificate information and Server Hello
Interface Zones, Networks, Geolocation, VLAN Tags, User Identity, Protocol and PortsApplication, URL Category and ReputationCertificate attributes, Ciphers, Versions, SNI mismatch
TLS handshake inspection not requiredInitial match using SNIAdditional server identity information

Decryption Policy Rule Actions


**Figure 3:** SSL Rule Actions

Figure 3: Decryption Rule Actions

TLS Decryption Deployment Modes

InboundOutbound
Use Server Private Key and certificateResign External Server Certificate using Internal CA
Protects internal serversInspect Outbound traffic
Decrypt -- Known KeyDecrypt -Resign

**Figure 4:**  Outbound - Decrypt with Resign

Figure 4: Outbound - Decrypt with Resign


**Figure 5:** Inbound - Decrypt with Known Key

Figure 5: Inbound - Decrypt with Known Key


  1. A Self-Signed Certificate using the FMC as the Root CA
  2. Use the Internal Organization CA to sign the FMC certificate
  3. Import an Internal CA certificate

**Figure 6:**  PKI Options

Figure 6: PKI Options


**Figure 7:** Internal Certificate Authorities

Figure 7: Internal Certificate Authorities


**Figure 8:**  Internal Certificates

Figure 8: Internal Certificates


👍

Best Practice

Re-signing with a CA certificate that clients do not trust causes certificate warnings. Before enabling outbound decryption, distribute the inspection CA through the organization's approved trust-store process. A self-signed enterprise root can be trusted when deliberately installed; trust is not determined by self-signing alone.


Configuration

You can configure multiple Decryption policies. However, only one Decryption policy is associated with an access control policy, which can be associated with one or more Secure Firewall devices. As explained earlier, Decryption rules require various degrees of information to match a flow and reach a verdict. The recommended Decryption policy configuration is comprised of three sections:

Global Settings ( Trusted CA Certificates and Undecryptable Actions )

Trusted CA Certificates

The Decryption policy includes a wide range of trusted CA root and intermediate certificates issued by third parties. When creating a Decryption policy, a trusted CA group object called "Cisco-Trusted-Authorities" is added by default. These are needed when configuring "Decrypt-Resign" rules using the certificate status of the external server.

To add a Trusted CA, we recommended uploading all certificates within a root CA's chain of trust to the Trusted CA certificates. A requirement to detect certificates issued by intermediate CAs.


**Figure 9:**  Trusted CA Certificates

Figure 9: Trusted CA Certificates

Undecryptable Actions

These settings configure FTD to handle an undecryptable flow.

**Figure 10:**  Undecryptable Actions

Figure 10: Undecryptable Actions


Default Action ( Default Decryption Policy Action and Logging )

When creating a new Decryption policy, the default action for traffic that does not match any Decryption rules is Do Not Decrypt. For most cases, this is the recommended setting. However, to block all TLS connections that do not match a decryption rule, set the Default Action to Block/Block with Reset.

**Figure 11:**  SSL Rule Logging Options

Figure 11: Decryption Rule Logging Options


Decryption Rule Recommendations

Rule Ordering

The recommended order of configuring Decryption rules is to arrange the rules such that the rules that require the least amount of information to determine the outcome are at the top. Also, bear in mind the need to only decrypt necessary traffic. Therefore place the Block and Do Not Decrypt rules before the Decrypt Known Key and Decrypt Resign rules.


**Figure 12:**  SSL Rules

Figure 12: Decryption Rules

Protection from 'weak' TLS Servers

Block Traffic to sites using weak TLS ciphers, older TLS versions or problematic certificates (e.g. invalid, self-signed).

**Figure 13:** Blocking based on Certificate Status

Figure 13: Blocking based on Certificate Status


**Figure 14:**  Blocking based on Weak Ciphers

Figure 14: Blocking based on Weak Ciphers


**Figure 15:** Blocking based on SSL/TLS Version

Figure 15: Blocking based on SSL/TLS Version

Handling TLS 1.3 Servers

TLS 1.3 Introduction

TLS 1.3 was standardized in the original RFC 8446 in August 2018 and introduced security and efficiency improvements over TLS 1.2. The following overview highlights selected properties of that original specification.

The following is the list of the significant improvements introduced in the TLS 1.3 protocol:

  • A full TLS 1.3 handshake can reduce connection setup by one round trip compared with a full TLS 1.2 handshake, which is useful on high-latency links.
  • For PSK resumption, optional 0-RTT permits encrypted early application data to be sent in the first flight alongside ClientHello, rather than inside the ClientHello handshake message. This can reduce response time, but the early data is not forward secret and does not have the same inter-connection replay guarantees as 1-RTT data. Server and application replay handling must be considered.
  • TLS 1.3 improves privacy by:
    • Removing static RSA and static Diffie-Hellman key exchange. Ephemeral (EC)DHE exchanges provide forward secrecy; PSK-only exchanges and 0-RTT do not provide the same guarantees.
    • Encrypting handshake messages after ServerHello, including the server certificate when certificate authentication is used.
  • TLS 1.3 removes legacy features including compression, static RSA/DH key exchange, the Digital Signature Algorithm (DSA), and custom ephemeral Diffie-Hellman groups. Other supported digital-signature schemes remain available; digital signatures as a whole were not removed.
  • The original RFC 8446 defines five TLS 1.3 cipher suites, including TLS_AES_128_GCM_SHA256 and TLS_AES_256_GCM_SHA384. These are cipher-suite identifiers, not five distinct symmetric algorithms or a permanent limit on future registrations.
  • The handshake state machine is more consistent. PSK exchange provides the unified resumption mechanism.

For more details please refer to the RFC 8446 - The Transport Layer Security (TLS) Protocol Version 1.3.

The Effect of TLS 1.3 on the Decryption Policy

The TLS 1.3 protocol enhancements vastly increase the security of the protected session. However, compared to previous versions of TLS, they introduce significant implications for firewalls performing decryption and deep payload inspection. This section outlines the principles of the Decryption policy for both TLS 1.2 and 1.3.

As discussed in the Decryption Rule Evaluation section, depending on the conditions configured in the Decryption policy, the firewall might need visibility into attributes within the Client Hello, Server Hello, and server’s Certificate messages to make a decrypt/do-not-decrypt verdict:

  • The Server Name Indication (SNI) in the Client Hello message is used for the initial Application/URL Category and Reputation-based match.
  • TLS session settings, chosen by the server, are extracted from the Server Hello message and used to evaluate the version and cipher-based conditions.
  • The Certificate message is required for certificate-related conditions and to ensure the client didn’t spoof the SNI.

In the full certificate-based TLS 1.2 handshake depicted in Figure 18, ClientHello, ServerHello and Certificate messages are sent in clear text, so a passive observer can inspect those messages without decrypting application data. Handshake details depend on the negotiated cipher suite; resumed or PSK handshakes need not contain the same certificate exchange.

Refer to The Illustrated TLS 1.2 Connection for a very detailed, packet-by-packet and byte-after-byte example of a TLS 1.2 handshake.


**Figure 18:** TLS 1.0-1.2 Handshake

Figure 18: TLS 1.0-1.2 Handshake


The following TLS 1.3 example depicts a certificate-based (EC)DHE handshake with SNI. Other TLS 1.3 modes need not contain the same fields.

For the TLS 1.3 handshake, the key exchange starts with the initial packet sent from the client, as illustrated in Figure 19. The client provides key share information upfront to allow the server to calculate the shared keying material. In effect, most handshake messages, including the server’s certificate, are encrypted and not available to the firewall for Decryption policy processing.


**Figure 19:** TLS 1.3 Handshake

Figure 19: TLS 1.3 Handshake


The client initiates the TLS 1.3 session with a Client Hello message that contains key share and cryptographic parameters along with the SNI extension. The server processes the Client Hello and determines the appropriate cryptographic parameters for the connection. It then responds with a Server Hello, containing the negotiated connection parameters and the server’s key share.
All handshake messages, including server extensions and the certificate, are encrypted after this phase.

Refer to The Illustrated TLS 1.3 Connection for a very detailed, packet-by-packet and byte-after-byte example of a TLS 1.3 handshake.

The only moment in the TLS 1.3 session lifetime when the firewall can slip in between the client and the server as a Man-in-the-Middle (MITM) proxy is when the firewall receives the Client Hello. At this time, the firewall must decide to decrypt/do-not-decrypt before forwarding the Client Hello message to the server.

  • If the decision is to decrypt, the firewall has to replace the key-share in the Client Hello with its own cryptographic material. From then on, the firewall maintains two encrypted connections in parallel, one towards the client and one towards the server.
  • If the firewall decides not to decrypt, the Client Hello packet is forwarded unmodified. The client and server continue negotiating a secure connection, opaque to the firewall.
📘

Note

Once the firewall decides to modify the Client Hello message, it cannot back off from being the MITM without breaking the connection altogether. There is no way to stitch back the TLS session between the client and server. The firewall may either continue decryption or deactivate the SSL proxy, causing the session to fail.


At the ClientHello stage, an uncached server certificate is not yet available. SNI is client-provided and can be spoofed; the firewall can also have L2–L4 and cached information. Certificate discovery can supply additional server identity information before a policy verdict, subject to the supported feature and deployment.


👍

Best Practice

Cisco Secure Firewall Threat Defense provides an elegant solution to this “chicken and egg” dilemma with the TLS Server Identity Discovery feature described in the following section.

TLS Server Identity Discovery

TLS Server Identity Discovery is an access control policy advanced setting for obtaining server certificate information for application and URL decisions without decrypting the entire client connection. Figures 20–21 illustrate an earlier TLS 1.2-probe example; they are conceptual flows, not a guarantee that every server, topology or release uses the same probe. Check the applicable discovery guidance and the separate adaptive-probe options.

**Figure 20:** TLS 1.3 Session with Uncached Target Server Certificate

Figure 20: TLS 1.3 Session with Uncached Target Server Certificate


Figure 20 depicts a sample TLS 1.3 handshake flow with the TLS Server Identity Discovery feature enabled with no server certificate in the cache. The steps are as follows:

  1. The client initiates the TLS 1.3 connection with a Client Hello. The firewall intercepts the packet and reads the SNI extension. The firewall checks whether a suitable certificate for the requested server is already cached for policy evaluation.
  2. The certificate for the client’s SNI is unavailable in the cache, and the firewall pauses the TLS 1.3 connection. The firewall initiates a TLS 1.2 “probe” connection request to the target server to obtain its clear text certificate. The firewall terminates the “probe” connection once it receives the certificate from the server.
  3. When the TLS Server Identity Discovery engine obtains the server’s certificate using the probe, it stores the certificate for subsequent policy evaluation.
  4. With the cached certificate, the firewall now has enough data to process the Decryption Policy and give a decrypt/do-not-decrypt verdict.
  5. The firewall resumes the original TLS 1.3 connection and continues with the handshake. If the verdict was to decrypt, the firewall will modify the Client Hello message and become a MITM proxy for the connection.

📘

Note

The Server Certificate Cache is available to all Snort instances running on a firewall appliance. The firewall does not preserve the cached content across reboots.


Figure 21 illustrates the case of a subsequent TLS 1.3 session towards a server whose certificate is available in the Server Certificate Cache on the firewall.

**Figure 21:** TLS 1.3 Session with Cached Target Server Certificate

Figure 21: TLS 1.3 Session with Cached Target Server Certificate


The steps are as follows:

  1. The client initiates the TLS 1.3 connection with a Client Hello. The firewall intercepts the packet and reads the SNI extension. A suitable certificate for the requested server is found in the cache.
  2. The firewall evaluates Decryption Policy rules and gives a decrypt/do-not-decrypt verdict.
  3. Depending on the verdict, the firewall passes the TLS 1.3 connection unchanged or enables the MITM proxy.

⚠

️ Warning

Disabling the ACP TLS Server Identity Discovery setting does not itself disable TLS 1.3 decryption. Certificate availability also depends on the adaptive-probe setting and cache. Without certificate information, a decision has less server identity information and may rely on client-provided SNI. Select both settings according to the applicable deployment guidance.


Enabling TLS Server Identity Discovery

To enable TLS Server Identity Discovery, open the advanced settings of your Access Control Policy and ensure the Early application detection and URL categorization option is enabled as per Figure 22.

**Figure 22:** Enabling TLS Server Identity Discovery

Figure 22: Enabling TLS Server Identity Discovery


👍

Best Practice

Select certificate discovery according to the policy conditions and deployment.

TLS Server Identity Discovery is the ACP setting illustrated here. It is distinct from the decryption policy's adaptive TLS server identity probe. The 7.6 guide explains when each is appropriate and the ACP setting's precedence. Probing consumes resources; performance depends on hardware, traffic and cache behavior. Do not assume its cost is universally negligible.


By default, the TLS Server Identity Discovery probe connections are not recorded by the firewalls. You can enable logging the probe connection events with the following CLI command on your individual firewalls:

system support ssl-certificate-visibility-probe-logging true

Once enabled, you will start seeing probe connections in your logs. You can recognize a probe connection by a Reason “TLS Probe” and the fact that they are triggered shortly after the Client Hello packet of the initial connection. Figure 23 provides an example of a TLS connection followed by a probe.

**Figure 23:** TLS Server Identity Discovery Probes Log

Figure 23: TLS Server Identity Discovery Probes Log


Enabling TLS 1.3 Decryption

FMC/FTD 7.2 introduced TLS 1.3 decryption for managed devices running Snort 3. On a supported release, enable the corresponding option in the decryption policy's advanced settings. Figure 24 shows the earlier interface; consult the applicable advanced options for your release.

**Figure 24:** Enabling TLS 1.3 Decryption

Figure 24: Enabling TLS 1.3 Decryption


⚠

️ Warning

The policy option and the device's aggressive-downgrade control are separate. The 7.6 policy guide states that leaving TLS 1.3 decryption unchecked limits decryption-rule coverage to TLS 1.2 or lower. Actual downgrade behavior also depends on the device setting and endpoint negotiation. The command reference documents this control and recommends consulting Cisco TAC before changing it:

system support ssl-client-hello-enabled aggressive_tls13_downgrade { true | false }

A downgrade attempt or a subsequent Do Not Decrypt match can cause a connection to fail. Do not infer that every unchecked policy necessarily downgrades every connection.


If you would like to watch TLS 1.3 decryption in action, have a look at the TLS 1.3 demo video on our Cisco Secure Firewall YouTube channel .


Special Considerations

Replace Key Only for Decrypt - Resign

The self-signed server certificate option is named Replace Key Only in the current rule guide. It controls how Decrypt - Resign handles self-signed origin certificates; use the exact option and guidance for the deployed release.

When Replace Key Only is disabled, the firewall replaces the key and re-signs the server certificate using the inspection CA. The client trusts the re-signed certificate only if its trust configuration accepts that CA and certificate.

When Replace Key Only is enabled for a self-signed server certificate, the device replaces the key while preserving self-signed certificate handling, rather than converting it into a certificate trusted through the inspection CA. The client can still display a self-signed certificate warning, depending on its trust settings.

EUN (End User Notification) for Blocked Traffic


**Figure 16:**  End User Response Configuration

Figure 16: End User Response Configuration


The Block Response Page is not displayed for TLS traffic not decrypted by FTD, irrespective of the reason for the traffic block.

TLS Client Hello Modification

If the TLS Client Hello message matches a Decrypt - Resign rule, FTD will modify it. This function is enabled by default. Along with other information present in the TLS Client Hello packet, FTD uses the SNI field to predict the need for modification. However, since the TLS SNI can be spoofed, the final decision is based on the Server response.

**Figure 17:**  TLS SNI Matching

Figure 17: TLS SNI Matching


  1. FTD might have to modify the TLS Client Hello more often

  2. If the TLS Client Hello has already been modified, but the TLS flow was not supposed to be decrypted, FTD cannot disengage and direct the TLS connection to Do Not Decrypt. Due to the Client Hello modification, the Message Authentication Codes (MAC) computed by the client and the server no longer match, so FTD still has to proxy the complete TLS/SSL handshake between the client and server.


📘

Note

More information about how the changes to the TLS Client Hello are done is available here.

Browser Errors related to Untrusted Certificates

Clients can warn that a re-signed server certificate is untrusted when they do not trust its inspection CA. Distribute the required CA certificate through the organization's approved domain or client trust-store process. Re-signing itself does not guarantee a trust error.

Exceptions from Decryption

You might exempt traffic from decryption for various reasons: performance gain or end-user experience. Many mobile devices and enterprise SaaS cloud applications use mutual authentication or certificate pinning to validate the application server's certificate. Since FTD modifies the server certificate during outbound decryption ( decrypt -- resign ), the client application does not accept the server certificate causing the TLS connection to fail.

Suggested exemptions from Decryption:

  1. Trusted Vendor domains and Trusted Subnets ( Low risk )
  2. Guest Networks
  3. Internal Server Backups or Trusted Flows
  4. Enterprise SaaS Application Traffic such as Office 365, Microsoft updates, Apple updates etc.
  5. TLS traffic using TLS Heartbeat

Verification/Troubleshooting

The Connection Events Viewer provides insight into flow evaluation against an Decryption policy rule. Not only does the event viewer help identify if the correct rule is being matched, it also reports any encryption errors as part of the TLS handshake. If you do not see encryption information for the flow of interest, ensure that logging is enabled in the Decryption rules and corresponding Access Control Policy rules.

Use the output of the following commands to check for TLS oversubscription and various TLS processing statistics:

show snort tls-offload

show counters

Gather advanced information by using a combination of debugs such as:

system support debug

system support ssl-debug
🚧

Warning

The SSL debugs should only be enabled and collected under supervision by TAC. As SSL debugs are verbose, the right level of debugging information needs to be configured depending on the issues.

Summary

Decryption policies help inspect threats in encrypted traffic and evolve as organizational needs change. Supported platforms can use TLS crypto acceleration; verify model, software and deployment restrictions in the target-release guide. Decryption adds processing load, so validate capacity and user experience in the intended deployment.

📚 Additional Resources

Demystifying TLS Decryption and Encrypted Visibility Engine on Cisco Secure Firewall Threat Defense – BRKSEC-3320

Cisco Secure Firewall YouTube channel

FMC - Understanding Traffic Decryption

The Illustrated TLS 1.2 Connection

The Illustrated TLS 1.3 Connection

RFC 8446 - The Transport Layer Security (TLS) Protocol Version 1.3


Did this page help you?
Title of the document The current suggested release is 7.6.6 Release 10.1 is live!