SSL/SSH Inspection

SSL/SSH Inspection

While the profile configuration for this is not found in the Security Profiles section but in the Policy Section, it is set in the policy along with the security profiles. This sort of analysis is some times referred to as deep scanning.

Deep Inspection works along the following lines. If your FortiGate unit has the correct chipset it will be able to scan SSL encrypted traffic in the same way that regular traffic can be scanned. The FortiGate firewall will essentially receive the traffic on behalf of the client and open up the encrypted traffic. Once it is finished it re- encrypts the traffic and sends it on to its intended recipient. It is very similar to a man-in-the-middle attack. By enabling this feature, it allows the FortiGate firewall to filter on traffic that is using the SSL encrypted protocol.

The encrypted protocols that can be inspected are:

  • HTTPS l  SMTPS l  POP3S l  IMAPS
  • FTPS

Before the invention of SSL inspection, scanning regular web traffic can be circumvented by using the prefix https:// instead of http:// in the URL. SSL inspection prevents this circumvention. However, because when the encrypted traffic is decrypted it has to be re-encrypted with the FortiGate’s certificate rather than the original certificate it can cause errors because the name on the certificate does not match the name on the web site.

At one point deep inspection was something that was either turned on or off. Now individual deep inspection profiles can be created depending on the requirements of the policy. Depending on the Inspection Profile, you can:

  • Configure which CA certificate will be used to decrypt the SSL encrypted traffic.
  • Configure which SSL protocols will be inspected.
  • Configure which ports will be associated with which SSL protocols for the purpose of inspection.
  • Configure which websites will be exempt from SSL inspection
  • Configure whether or not to allow invalid SSL certificates.
  • Configure whether or not SSH traffic will be inspected.

 

Inspection Exemption

When you are using a browser to visit SSL encrypted sites and we are using a certificate that does not match the certificate of the site, we are presented with a warning message and the option of continuing, using the untrusted certificate, or terminating the session. However, there are a number of applications that use SSL encrypted traffic. If the application detects SSL traffic that wasn’t signed with a certificate that it trusts it will not allow the traffic. The applications do not give the option to manually indicate that we trust the certificate or the site.

If the option is available, the customer may choose to import needed SSL certificates into Local Certificates and configure a policy for communication for that application.

The assist in preventing loss of access to these site but still enabling the SSL inspection of the rest of the internet traffic, a method of exempting either Website categories or specific sites has been developed. To exempt a large group of sites the profile can be configure to exempt FortiGuard Categories. There are 3 of these categories preselected due to the high likelihood of issues with associated applications with the type of websites included in these categories.

  • Heath and Wellness
  • Personal Privacy
  • Finance and Banking

Other more specific websites can be added to the exemption list by creating addresses for them at Policy & Objects > Objects > Addresses. The adding of addresses is done by selection from a drop down menu. There is an option at the bottom of the list to create a new address, but otherwise only preconfigured addresses that are configured to be on the “Any” interface will be available for selection.

Examples of sites that you may want to configure for exemption so that there will be no interference due to certificate issues:

Apple

  • *.appstore.com
  • *.apple.com
  • *.itunes.apple.com
  • *.icloud.com
  • swscan.apple.com

 

Dropbox

  • *.dropbox.com

Skype

  • *.messenger.live.com

Windows Updates

  • update.microsoft.com

Allow Invalid SSL Certificate

This setting was something that used to be part of the Proxy Options, but now that SSL inspection has it’s own configuration setting it is configured with those. It might seem like a straight forward decision that the allowing of invalid SSL certificates must be bad and therefore should not be allowed, but there can be some reasons that should be considered. The issues at hand are the reasons to use a SSL certificate and the reasons that a certificate will be considered invalid.

At a purely technical level, a properly formed certificate will encrypt the data so that it can only be read by the intended parties and not be read by anyone sniffing traffic on the network. For this reason, people will often use self-signed certificates. These self signed certificates are free and will encrypt the data just as well as those purchased from any of the big vendors of certificates, but if they are not listed as an approved Certificate Authority (CA) the certificates will be considered invalid.

On the other hand, one of the services the vendors provide is verification of identity of those that purchase their certificates. This means that if you see a valid certificate from a site that identified itself as being from “valid- company.com” that you can be reasonably sure that the site does belong to that company and not a false site masquerading as being part of that company.

 

Creating or editing an SSL/SSH Inspection profile

1. Go to Policy & Objects > Policy > SSL/SSH Inspection.

This will open to one of the existing profiles.

The links for the actions are located in the upper right hand corner of the window.

  • To view a list of the exiting profiles select the List icon (a page) at the far right.
  • To clone an existing profile, select the Clone icon (one page behind another), second from the right
  • To create a new profile, select the Create New icon (“+ “symbol), third from the right.
  • To view or edit an existing profile, choose it from the dropdown menu field.

2. Name Field:

Give the Profile an easily identifiable name that references its intent.

3. Comments Field:

Enter any additional information that might be needed by administrators, as a reminder of the profile’s purpose and scope.

4. SSL Inspection Options:

a. Enable SSL Inspection of:

  • Multiple Clients Connecting to Multiple Servers – Use this option for generic policies where the destination is unknown.
  • Protecting SSL Server – Use this option when setting up a profile customized for a specific SSL server with a specific certificate.

b. CA Certificate

Use the drop down menu to choose which one of the installed certificates to use for the inspection of the packets.

c. Inspection Method

The options here are:

  • SSL Certificate Inspection – only inspects the certificate, not the contents of the traffic.
  • Full SSL Inspection – inspects all of the traffic.

d. Inspect All Ports

Enable the ability to inspect all ports by checking the box. If the feature is not enabled, specify in the field next to the listed protocols, the port through which that protocols traffic will be inspected. Traffic of that protocol going through any other port will not be inspected.

5. Exempt from SSL Inspection:

Use the dropdown menus in this section to specify either a FortiGuard Web Category or addresses that will be exempt from SSL inspection.

a. Web Categories

By default the categories of Health and Wellness, Personal Privacy, and Finance and Banking have been added as these are one that are most likely to have applications that will require a specific certificate.

b. Addresses

These can be any of the Address objects that have an interface of “Any”.

6. SSH Inspection Options:

a. SSH Deep Scan

Toggle the grey on button so that it is: Greyed out to disable the feature

Opaque and vibrate to enable the feature

b. SSH Port

The available options are:

  • Any – choosing this option will search all of the traffic regardless of service or TCP/IP port for packets that conform to the SSH protocol
  • Specify – choosing this option will restrict the search for SSH protocol packets to the TCP/IP port number specified in the field. This is not as comprehensive but it is easier on the performance of the firewall.

d. Protocol Actions

  • Exec – Block, Log or neither. Select using check boxes.
  • Port-Forward – Block, Log or neither. Select using check boxes.
  • SSH-Shell – Block, Log or neither. Select using check boxes.
  • X11-Filter – Block, Log or neither. Select using check boxes.

7. Common Options:

a. Allow Invalid SSL Certificates

Check the box to enable the passing of traffic with invalid certificate

b. Log Invalid Certificates

Check the box to have the Logging function record traffic sessions that contained invalid certificates

The Enable SSH Deep Scan feature is enabled by default when creating a new SSL/SSH Inspection profile. There are situations were this feature can cause issues so be sure that you would like it enabled before applying it.

The context location for configuring the SSL/SSH Inspection in the CLI is:

config firewall ssl-ssh-profile


Having trouble configuring your Fortinet hardware or have some questions you need answered? Ask your questions in the comments below!!! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Leave a Reply

Name *
Email *
Website