Skip to main content
Version: 2.2.1-preview

AD-CFG-13 - Certificate templates count should be retrievable

Overviewโ€‹

Certificate templates define which certificate types can be issued and under what conditions. Overly permissive or unexpected templates can allow broader enrollment than intended, enabling privilege escalation through misconfigured enrollment permissions, risky EKUs, or unintended autoenrollment.

Security Recommendationโ€‹

  • Establish and document the set of approved certificate templates for each CA.
  • Review template permissions (who can enroll, who can manage) and enrollment constraints at least quarterly.
  • Remove templates that are unused, deprecated, or risky (e.g., excessive EKUs, weak key protection settings, misconfigured subject name rules).
  • Alert on unexpected additions/removals or unusual counts of templates.

How the Test Worksโ€‹

  • Queries Active Directory for configured certificate template objects.
  • Counts the total number of certificate templates present.
  • Compares the observed count to an expected baseline and flags unexpected deviations.

Test Metadataโ€‹

FieldValue
Test IDAD-CFG-13
SeverityInfo
SuiteActive Directory
CategoryAD.Config
PowerShell testTest-MtAdCertificateTemplatesCount
TagsAD, AD-CFG-13, AD.Config

Sourceโ€‹

  • Pester test: tests/ad/config/Test-MtAdCertificateTemplatesCount.Tests.ps1
  • PowerShell source: powershell/public/ad/config/Test-MtAdCertificateTemplatesCount.ps1