Attacking Active Directory Certificate Services

What is ADCS

Overview of ADCS

Key Components

Enumeration

The first step in attacking ADCS is understanding the configuration of the CA, its templates, and associated permissions. Enumerating these components reveals potential misconfigurations that can be exploited.

Common Vulnerabilities

ADCS often suffers from misconfigurations or insecure defaults that attackers can exploit. Here are the primary vulnerabilities:

Attack Techniques

Exploitation of Misconfigured Certificate Templates Certificate templates define which users can request specific types of certificates. When a template is misconfigured to allow enrollment by “Authenticated Users,” any domain user can request a certificate that provides elevated privileges. This is a common misstep in ADCS deployments.

NTLM Relay with PetitPotam The PetitPotam attack coerces a target server to authenticate to an attacker-controlled machine via NTLM. When relayed to the ADCS web enrollment service, this can be used to request certificates that allow domain escalation.

Machine-in-the-Middle with mitm6 ADCS systems are often vulnerable to IPv6 spoofing attacks. Tools like mitm6 allow attackers to intercept NTLM traffic, relaying it to request certificates for privilege escalation.

Persistence with Certificates

Certificates are an excellent mechanism for persistence because they allow authentication without passwords. By requesting a long-lived certificate, attackers can maintain access even if the compromised user’s password is changed.

Certificate Theft Attackers can extract private keys and certificates from systems to impersonate users or maintain persistence.

Stolen certificates can be used in attacks such as pass-the-certificate to impersonate users or maintain access to systems.