Categories ArticlesISA Server

Implementing a CNG HTTPS Inspection Certificate for Forefront Threat Management Gateway (TMG) 2010 (Part 1)

If you would like to be notified when Richard Hicks releases the next part of this article series please sign up to the ISAserver.org Real time article update newsletter.

Introduction

The HTTPS inspection feature of Forefront Threat Management Gateway (TMG) 2010 is arguably the single most powerful tool the TMG platform provides for protecting clients accessing the public Internet. In last month’s article I described in detail the benefits and challenges associated with HTTPS inspection. One of those challenges for TMG today is handling SSL/TLS protected web sites that use Cryptographic Next Generation (CNG) Suite-B cryptography. I also demonstrated how to resolve this shortcoming by using a special script developed by Microsoft to enable support for CNG certificates when using a self-signed HTTPS inspection certificate on the TMG firewall. This month I’ll demonstrate how to configure TMG HTTPS inspection using an internal Windows Server 2008 R2 Enterprise Public Key Infrastructure (PKI) with support for CNG.

Preparing the Certificate Template

Before we begin configuring TMG for HTTPS inspection, we must first prepare our internal PKI Certificate Authority (CA). We’ll need to configure and deploy a certificate template that TMG can use to create its own certificates to issue to users on behalf of public web sites. Begin by opening the Certification Authority management console, highlighting Certificate Templates and choosing Manage.


Figure 1

When the Certificate Templates Console opens, right-click the Subordinate Certification Authority template and choose Duplicate Template.


Figure 2

Choose Windows Server 2008 Enterprise.


Figure 3

On the General tab provide a descriptive name for the certificate template, review and optionally adjust the Validity period if required.


Figure 4

Select the Extensions tab, highlight Key Usage, and click Edit. In the Signature section select Certificate signing and clear all other options. Leave Make this extension critical selected.


Figure 5


Figure 6

Also on the Extensions tab highlight Basic Constraints, click Edit, and select the option Do not allow subject to issue certificates to other CAs.


Figure 7

On the Security tab, ensure that the user who will be requesting the certificate on the TMG firewall has Enroll permissions.


Figure 8

In the Certification Authority management console, right-click Certificate Templates and choose New and Certificate Template to Issue.


Figure 9

Choose the certificate template you just created and click Ok.


Figure 10

Requesting the Certificate on the TMG Firewall

On the TMG firewall, open a management console window and add the Certificates snap-in for the Computer account. Expand Certificates, and then right-click the Personal folder and choose All Tasks, Advanced Operations, and Create Custom Request.


Figure 11

Click Next, highlight Active Directory Enrollment Policy and click Next, and then select the certificate template you created earlier and click Next again.


Figure 12

Click Details and then click Properties.


Figure 13

On the Subject tab, in the Subject name field, select Common name for the Type, provide a descriptive name for the certificate, and then click Add.


Figure 14

On the General tab enter a Friendly name for the certificate request.


Figure 15

On the Private Key tab, expand Key Options and ensure that the Key size is 2048 and that the Make private key exportable option is selected.


Figure 16

On the same tab also expand Select Hash Algorithm and choose SHA256 from the drop-down list and then click Ok.


Figure 17

Click Next and then provide a file name for the certificate request file and then click Finish.


Figure 18

Open an elevated command prompt and submit the certificate request to the CA by executing the following command.

certreq.exe -submit -config “<ca_hostname\ca_name>” <request_filename> <certificate_response>


Figure 19

If automatic approval is configured the certificate request will be automatically retrieved after submission. If approval is required, the certificate can be retrieved after approval by executing the following command.

certreq.exe -retrieve -config "<ca_hostanme\ca_name>” <request_id> <certificate_response>

Note:
If you receive an error message stating that the request failed because the RPC server was unavailable, be sure your firewall policy settings are configured to allow this access. More details on configuring the TMG firewall to allow RPC access to a CA can be found here.

Once the certificate request has been made and has been approved, accept it on the TMG firewall by executing the following command.

certreq.exe -accept -config “<ca_hostname\ca_name>” <certificate_response>


Figure 20

In the certificate management MMC, expand Personal and then Certificates. Right-click the new certificate and choose All Tasks and then Export.


Figure 21

Select Yes, export the private key.


Figure 22

Select Personal Information Exchange – PKCS #12 (.PFX). Make sure that no other options are selected.


Figure 23

Provide a password and the location to save the file to complete the certificate export process.

Configure TMG HTTPS Inspection

Open the Forefront TMG management console, select Web Access Policy in the navigation tree, and then click Configure HTTPS Inspection in the Tasks pane. On the General tab, select Enable HTTPS Inspection if it is not already enabled. Under HTTPS Inspection Certificate Settings choose Import a certificate and then click Import.


Figure 24

Locate the certificate you just exported, provide the password, and then click Ok. Click Ok again, and then apply the configuration.

Client Testing

When a client browses to a secure web site, TMG with HTTPS inspection enabled will present to the client a certificate created dynamically and is signed by a certificate issued by our PKI. Since this is an Enterprise CA, the root certificate is trusted by all domain members. Here you can see that the certificate for twitter.com was issued by my lab network’s root CA.


Figure 25

A closer look at the certificate for this web site indicates that although the certificate is issued to twitter.com, it was issued by the Forefront TMG HTTPS Inspection service.


Figure26

Summary

The HTTPS inspection feature of Forefront TMG 2010 is an extremely powerful tool that security administrators can employ to perform more complete and thorough network traffic inspection and substantially improve their overall security and protection. HTTPS inspection works by terminating HTTPS communication in the same way it does for regular HTTP traffic. The TMG firewall then creates a new SSL certificate for the site and provides that to the client. The certificate issued by TMG can be a self-signed certificate or a certificate issued by an internal private PKI. In my last article I provided details for using the self-signed certificate option. In this article I demonstrated using a PKI to issue the HTTPS inspection signing certificate to TMG. While the self-signed option is quick and easy, the PKI option is much more elegant and is the preferred method for configuring HTTPS inspection, in my opinion. By following the guidance in this article you can configure HTTPS inspection using your PKI and also provide support for web sites that use modern Cryptographic Next Generation (CNG) certificates.

If you would like to be notified when Richard Hicks releases the next part of this article series please sign up to the ISAserver.org Real time article update newsletter.

Richard Hicks

Share
Published by
Richard Hicks

Recent Posts

Business email compromise cybercrime group members busted

Business email compromise cyberattacks have been on the rise, and now some allegedly prominent players…

21 hours ago

Making retail mobile e-commerce apps more secure

Many e-commerce mobile apps are insecure, opening the businesses that use them to severe risks.…

2 days ago

With eyes on the ‘Zoom boom,’ Microsoft launches Teams apps for meetings

Microsoft continues to leverage its hot Microsoft Teams. With an eye on the popularity of…

2 days ago

Exchange 2019 and 2013: Is coexistence possible? Yes, here’s how

Exchange 2019 and 2013 coexistence can be achieved, but the road is winding and filled…

2 days ago

Finding API code vulnerabilities before they reach production

A powerful add-on for GitHub’s code-scanning feature lets you get your API code analyzed for…

3 days ago

Pray.com app exposes millions of users in massive data leak

Pray.com is one of the most popular faith-based apps, so a data leak is a…

3 days ago