Subordinate certification authority for Sophos UTM HTTPS CA (Web Filter)

My small Sophos UTM filters HTTP traffic (Web Filter) and scans it for viruses and malware, which works quite reliably, unless the websites are encrypted (HTTPS). By default, the UTM cannot scan encrypted traffic and therefore cannot filter out viruses/malware.

However, this can be easily changed. In the Web Protection feature of the UTM, there is the option "Scan HTTPS (SSL) traffic" which can simply be ticked:

image

This is what happens:

When a user accesses an encrypted website, the UTM terminates the SSL connection, scans the data stream, re-encrypts the page and presents it to the client. To re-encrypt the website, the UTM requires a CA, which it conveniently provides directly

image

This example shows how the whole thing works:

First the call from Google without "SSL Traffic Scan"

image

The certificate comes from Google, is valid, no problem. Now with "SSL Traffic Scan" switched on:

image

Nothing works anymore. The background is as follows. The certificate of the Sophos UTM certification authority is not trusted by the client. The browser even recognizes that something is very wrong and reports a man-in-the-middle attack:

The security certificate problems may indicate an attempt to trick you or intercept data that you have sent to the server.

Now you could of course simply import the certificate of the Sophos CA on each client so that it is recognized as valid and no error message appears (see next picture), but that would only be half as nice, since I have already written so much about certificates and CAs in MS environments.

image

Since I have a CA on a Windows server anyway, I can also set up an intermediate certification authority directly on the UTM, which is signed by the Windows CA (my root CA). This gives me the advantage that I can also revoke the certificate of the UTM if there is a security problem, which would not be possible if I imported the certificate of the standard UTM CA on the clients. Since the UTM apparently cannot generate a certificate request for its CA (at least I have not found it), I generate the certificate on another server. More on this in a moment. First prepare the Windows CA.

Duplicate the "Subordinate certification authority" template in the certificate templates

image

Give the new template a nice name and check the "Publish certificate in AD" box

image

On the Security tab, give the Domain Admin and the computer account of the CA itself full access to the template

image

Publish the new template now

image

The CA is ready to create a sub-CA. Time to obtain the certificate for the subordinate CA by requesting a new certificate in the Certificates MMC on the CA

image

Then select the new template

image

If the template is ticked, click on the text below and add the values:

  • General name
  • Country
  • Location
  • Organization
  • Organizational unit
  • e-mail
  • DNS (the external name of the UTM can be entered here)

image

Assign a display name on the "General" tab and click OK

image

Now register the certificate and it should look like this

image

The certificate for the sub-CA can now be found in the MMC

image

The certificate must now be exported

image

Important! The certificate must be exported twice, once with a private key, and once without. Here is the example with a private key:

image

Also export the extended properties in the next dialog

image

Then enter a password and save the certificate. Once the certificate has been exported, it can be deleted from the MMC. The certificate with the private key (PFX) is now imported to the Sophos UTM

image

If the import was successful, it looks like this:

Web Filter

You must now import the certificate _WITHOUT THE PRIVATE KEY_ (.CER) to the clients, best via GPO in the "Trusted Intermediate Certification Bodies"

image

As soon as this is done, you can check the "Scan HTTPS (SSL) Traffic" box and Google will look like this:

image

That's how I like it.

13 thoughts on “Untergeordnete Zertifizierungsstelle für Sophos UTM HTTPS CA (Web Filter)”

  1. Hallo,

    Falls jemand mal einen SBS 2011 migriert hat mit der integrierten Zertifizierungsstelle, dann kann es sein, das die neue Vorlage nicht Aktiviert werden kann, da diese nicht gefunden wird. Geholfen hat das hier:
    https://securitymusings.com/article/1733/cant-create-a-new-certificate-template-to-issue
    Das Flag in der AD für Konfiguration -> CN=Configuration,DC=domain.DC=Local -> CN=Services -> CD=Public Key Services -> Rechtklick auf die CA auf der rechten Seite „Attribut-Editior“ -> Flags von 2 auf 10 Stellen. AD Zertifikatsdienste neustarten. Dann geht es.

    Reply
  2. Hallo Zusammen,

    der letzte post ist schon eine Zeit her, aber trotzdem würde mich gerne interessieren ob man die windows ca auch an meine apple iphones und so ausrollen kann , wenn ja wie ? muss theoretisch blos das zertifizierungsstellen root zertifikat in die iphone prügeln oder ?

    Reply
  3. Hallo,
    ich plane die Umsetzung auf dem oben genannten Weg, habe aber als Tücke noch vereinzelte Systeme mit Firefox. Dort läßt sich mittlerweile per Schalter der Zugriff auf die Windows-Trusted-Roots freischalten „security.enterprise_roots.enabled=true“. Greift dieser Schalter auch für die Zwischenzertifizierungsstellen?
    Falls nicht, gehe ich mal davon aus, ich kann die Sophos-Sub-CA per GPO auch in die Vertrauenswürdigen Stammzertifizierungsstellen importieren?

    Grüße Steve

    Reply
  4. Hallo,

    ich habe bemerkt dass das Zertifikat für die UTM (Untergeordnete CA) nur ein dieses eine Zertifikat in der Zertifikatskette enthält. Ich verstehe nicht wieso ich habe die Vorlage Untergeordnete Zertifizierungsstelle dupliziert und diese dann verwendet. Im Zertifikat steht: Augestellt von Proxy CA Antragsteller: Proxy CA, allerdings müsste da stehen wie bei deinem Zertifikat Antragsteller : Proxy CA ausgestellt von: Root CA

    LG Davide

    Reply
  5. Hallo,

    ich finde deinen Post wirklich interessant.
    Leider funktioniert das nicht so bei mir obwohl ich exakt die Anleitung befolgt habe.
    Kann das sein dass in der Version 9.4 ein Bug ist?
    Wenn ich nämlich das Sub CA Zertifikat im PKCS #12 Format in die Sophos UTM hochlade bekomme ich beim surfen nur noch Fehlermeldungen… Und das nicht weil das Zertifikat nicht vertraut wird, sondern weil es jetzt keine Zertifikatskette mehr gibt, sprich beim Browser wird nur mehr ein Zertifikat angezeigt.

    LG
    Davide

    Reply
    • Hi Davide,
      ich hatte ein ähnliches Problem, ich konnte es lösen indem ich die Root-CA auf der Sophos hinterlegt habe, das funktionierte allerdings nur, wenn das Zertifikat Base64 Format vorlag, sonst gab es einen Fehler. Nachdem das Zertifikat installiert war, wurde auch die Chain sauber aufgebaut.
      Gruß, Frank

      Reply
  6. Hallo,

    mich würde interessieren, warum du eine Sub-CA wählst? Könntest du theoretisch auch deine Root CA importieren und welche Vor- oder Nachteile hat das? Ich bin auch noch am überlegen, warum es lt. Sophos nicht funktionieren soll, wenn man ein „gekauftes“ Zertifikat verwendet:

    „Can I purchase a public certificate from a CA to avoid certificate warnings?

    While it may be tempting to purchase a publicly signed signing certificate to avoid a certificate warning, the HTTPS security model will prevent this from succeeding. If the signing certificate itself (NOT the issuer of the certificate) is not a trusted signing authority in the user’s browser, then a certificate error will still be shown to users. A certificate purchased from a signing authority offers no advantages in this instance, over a self-signed certificate.“
    (https://www.sophos.com/de-de/support/knowledgebase/115592.aspx).

    Hat das damit zu tun, dass die zu kaufenden Zertifikate keine geeigneten Zertifikate sind? Die bekannten Zertifizierungsstellen sind doch eigentlich auf allen Clients im Zertifikatsspeicher vorhanden….

    Gruß
    Sebastian

    Reply
  7. Habe es erst jetzt gesehen du Exchange-Mongo :D sehr gute Anleitung! Cool wäre noch das Thema SubCA und Zertifikate für SSL VPN, zerbeiße mir gerade den Kopf damit wegen Kunden die per Softwareverteilung das hinbekommen wollen :(

    Reply
    • Hi,
      schau doch mal ob man auch das Zertifikat für die VPN CA austauschen kann, dann wäre das einfach nur eine weitere Sub-CA die von der Root-CA signiert ist.

      Frank

      Reply
  8. Vielen Dank für die ausführliche Anleitung. Warum genau muss das SubCA Zertifikat noch auf die Clients verteilt werden, obwohl das RootCA Zertifikat bereits importiert ist und die gesamte Zertifikatskette bekannt sein müsste?

    Reply
    • Hallo, es wird zwar der Root-CA vertraut und auch den Zertifikaten die von der Root-CA ausgestellt werden, jedoch nicht Zertifikaten die von der UTM Sub-CA ausgestellt werden.
      Gruß, Frank

      Reply

Leave a Comment