How to find your Certification Authorities and determine what type they are

By | May 12, 2009

The other day I was in an environment where I had to find what Certification Authorities (CAs) were in place.  With nobody immediately available to help me out, I stumbled around for bit before I worked out how to find them.

Method 1

Query the membership of the Cert Publishers group.  Cert Publishers is a built-in AD group.  When you create a new CA on a member server or a DC, the computer will be added to the group membership.

cert-publishers.jpg

While it worked for me in terms of identifying the server names the CAs were hosted on, it did not provide me with the CA names themselves.   In any case, I’m not convinced this is wholly reliable method of finding servers that host CAs, because there is always the potential for someone with permissions to manually edit the Cert Publishers group membership.  Also, I’m not sure what happens if someone does an ugly decommissioning of a CA.  Does the membership get cleaned up?  Probably not.

Method 2.

Search Active Directory for objects with an objectClass of certificationAuthority.  These are stored in the Configuration partition under CN=Certification Authorities,CN=Public Key Services,CN=Services,CN=Configuration,<ForestRootDN>.  Here’s an example of how to find them using adfind.exe.

C:\>adfind -b “CN=Certification Authorities,CN=Public Key Services,CN=Services,C
N=Configuration,DC=widget,DC=com” -f (objectclass=certificationAuthority) 1.1

The problem with looking in AD is that it provides you with the name of the CA, but not the server that’s hosting it.  Ok, in my example the server name is part of the CA name, but this may not always be the case.   The server name is probably buried within the cACertificate attribute of the certificationAuthority object, which is unfortunately not human-readable.

Method 3.

Open a command prompt and type certutil – dump.  You will see output similar to that shown below.

 Entry 0: (Local)
  Name:                    `widget-ADLDS1-CA’
  Organizational Unit:     `’
  Organization:            `’
  Locality:                `’
  State:                   `’
  Country/region:          `’
  Config:                  `ADLDS1.widget.com\widget-ADLDS1-CA’
  Exchange Certificate:    `’
  Signature Certificate:   `ADLDS1.widget.com_widget-ADLDS1-CA.crt’
  Description:             `’
  Server:                  `ADLDS1.widget.com’
  Authority:               `widget-ADLDS1-CA’
  Sanitized Name:          `widget-ADLDS1-CA’
  Short Name:              `widget-ADLDS1-CA’
  Sanitized Short Name:    `widget-ADLDS1-CA’
  Flags:                   `13′

Entry 1:
  Name:                    `widget-RWDC1-CA’
  Organizational Unit:     `’
  Organization:            `’
  Locality:                `’
  State:                   `’
  Country/region:          `’
  Config:                  `RWDC1.widget.com\widget-RWDC1-CA’
  Exchange Certificate:    `’
  Signature Certificate:   `’
  Description:             `’
  Server:                  `RWDC1.widget.com’
  Authority:               `widget-RWDC1-CA’
  Sanitized Name:          `widget-RWDC1-CA’
  Short Name:              `widget-RWDC1-CA’
  Sanitized Short Name:    `widget-RWDC1-CA’
  Flags:                   `1′
CertUtil: -dump command completed successfully.

This shows me that I have two CAs and provides me with information about the CA names and what servers they are hosted on.  But what if I wanted to find out what type of CA they are (i.e. Enterprise or Stand Alone and whether it is a root or subordinate CA)?  The certutil.exe tool can help with that too.  Here’s an example using certutil with the -cainfo parameter.

C:\>certutil -cainfo -config RWDC1.widget.com\widget-RWDC1-CA type

CA type: 0 — Enterprise Root CA
    ENUM_ENTERPRISE_ROOTCA — 0
CertUtil: -CAInfo command completed successfully.

This tells me that my CA running on server RWDC1.widget.com is an Enteprise Root CA.

The syntax of the certutil.exe tool takes a bit of getting used to, but otherwise seems to do the job nicely!

Tony

15 thoughts on “How to find your Certification Authorities and determine what type they are

  1. Mike Kline

    Very nice use of adfind in method 2. I always like using adfind for tasks and always enjoy seeing how others use it too, good job there.

    Thanks
    Mike

    Reply
  2. Mike Kline

    Very nice use of adfind in method 2. I always like using adfind for tasks and always enjoy seeing how others use it too, good job there.

    Thanks
    Mike

    Reply
  3. etdot

    You can cheat and search for the CRL distribution point (objectClass=cRLDistributionPoint). This will look something like:
    CN=CAName,CN=Hostname,CN=CDP,CN=Public Key Services,CN=Services,CN=Configuration,DC=widget,DC=com
    where CAName is the Name of your CA and Hostname is the windows hostname of the machine it is hosted on.

    Reply
  4. etdot

    You can cheat and search for the CRL distribution point (objectClass=cRLDistributionPoint). This will look something like:
    CN=CAName,CN=Hostname,CN=CDP,CN=Public Key Services,CN=Services,CN=Configuration,DC=widget,DC=com
    where CAName is the Name of your CA and Hostname is the windows hostname of the machine it is hosted on.

    Reply
  5. MrShannon

    I found myself in the same situation this morning. With your help here I was able to find this customer’s internal CA, and later found out they didn’t know they even had one. Thanks for the tip!

    Reply
  6. Dan Aquinas

    Is the value of the “Name” field also known as the “Common name” used when setting up/configuring the Certificate Authority?

    Reply
  7. Dan Aquinas

    Is the value of the “Name” field also known as the “Common name” used when setting up/configuring the Certificate Authority?

    Reply
  8. Hughesy

    Still relevant and helped me figure out that a client only has a root CA

    Thanks 🙂

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.