The Academy is free // the war room is optional
DAEMONCORE // ACADEMY
TRADECRAFT // ACTIVE DIRECTORY & AD CS DIAGNOSTIC ENGINE

AD Escalation & AD CS Decision Tree

Active Directory Certificate Services (AD CS misconfigurations ESC1 through ESC15), Kerberos delegation abuse (RBCD, Unconstrained, Constrained), and Object DACLs have nuanced prerequisite conditions. Check the indicators discovered during your reconnaissance to evaluate actionable escalation paths, generate execution syntax (Certipy, Rubeus, Impacket, BloodHound Cypher), and review verified defensive countermeasures.

ESC1 to ESC15
Full AD CS Suite
Kerberos & RBCD
S4U2Self / S4U2Proxy
Shadow Credentials
msDS-KeyCredentialLink
Blue Team Controls
Audit, KQL & GPO
OFFLINE AD CS & KERBEROS DIAGNOSTIC ENGINEv3.8 // ESC1-ESC15 + RBCD + SHADOW CREDS

Select the indicators and flags identified during domain reconnaissance to calculate viable privilege escalation vectors, generate targeted tool syntax, and inspect remediation controls.

1. RECONNAISSANCE FINDINGS
3 ACTIVE
Quick Scenario Presets:
Enrollee Supplies Subject (CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT)

The certificate template flag 0x00000001 is enabled, permitting an enrolling requester to supply an arbitrary Subject Alternative Name (SAN) containing any domain identity (e.g. Domain Administrator).

ATTR: msPKI-Certificate-Name-Flag: 0x00000001 (CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT)
Detect: certipy find -vulnerable // Certify.exe find /vulnerable
Client Authentication EKU Present

Template allows Client Authentication (1.3.6.1.5.5.7.3.2), Smart Card Logon (1.3.6.1.4.1.311.20.2.2), PKINIT (1.3.6.1.5.2.3.4), Any Purpose (2.5.29.37.0), or SubCA.

ATTR: pKIExtendedKeyUsage: 1.3.6.1.5.5.7.3.2
Detect: certipy find // Get-DomainCertificateTemplate
Enrollment Rights for Low-Privileged Users

Security descriptor on certificate template grants 'Enroll' or 'AutoEnroll' permission to Authenticated Users, Domain Users, or Domain Computers.

ATTR: ACE: NT AUTHORITY\Authenticated Users -> Certificate-Enrollment
Detect: certipy find // PowerView Get-DomainCertificateTemplate -EnrollmentFlag
No EKU Defined or Any Purpose (2.5.29.37.0)

Certificate template does not specify an Extended Key Usage (meaning it is valid for all cryptographic purposes) or explicitly defines Any Purpose (2.5.29.37.0).

ATTR: pKIExtendedKeyUsage: None or 2.5.29.37.0
Detect: certipy find // Certify.exe find
Certificate Request Agent EKU (Enrollment Agent)

Template contains Certificate Request Agent EKU (1.3.6.1.4.1.311.20.2.1), allowing the holder to act as an Enrollment Agent and co-sign certificate enrollment requests on behalf of other users.

ATTR: pKIExtendedKeyUsage: 1.3.6.1.4.1.311.20.2.1
Detect: certipy find // Certify.exe find
Vulnerable Write ACL on Certificate Template

Low-privileged user has GenericAll, GenericWrite, WriteOwner, or WriteDacl rights over a certificate template object in Active Directory (CN=Certificate Templates,CN=Public Key Services...).

ATTR: ACE: attacker -> GenericAll / WriteDacl on template
Detect: BloodHound (WriteDacl / GenericAll) // certipy find
Vulnerable Write ACL on PKI Objects / Containers

Low-privileged user has write permissions over PKI objects such as the Certificate Authority object, the Enrollment Services container, or NTAuthCertificates.

ATTR: ACE: attacker -> GenericWrite on CN=Public Key Services
Detect: BloodHound // certipy find
CA EDITF_ATTRIBUTESUBJECTALTNAME2 Enabled

The CA has the EDITF_ATTRIBUTESUBJECTALTNAME2 registry flag set. This forces the CA to accept arbitrary Subject Alternative Names for ANY certificate template, even if the template forbids enrollees from supplying a SAN.

ATTR: HKLM\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\<CA>\EditFlags
Detect: certipy find // certutil -getreg policy\EditFlags
ManageCA or ManageCertificates on CA Object

Low-privileged user is granted 'Manage CA' (CA Administrator) or 'Manage Certificates' (Certificate Officer) rights directly on the Certificate Authority object.

ATTR: AccessMask: 0x00000001 (ManageCA) or 0x00000002 (ManageCertificates)
Detect: certipy ca -ca <CA> // certutil -getreg ca\Security
AD CS HTTP Enrollment Endpoints Exposed (No EPA)

AD CS Web Enrollment (/certsrv), Enrollment Service (CES), or NDES (/certsrv/mscep) is running over HTTP without Extended Protection for Authentication (EPA) or channel binding.

ATTR: HTTP endpoints active on CA server port 80/443 without EPA
Detect: certipy find // test-netconnection -port 80 <CA-IP>
CT_FLAG_NO_SECURITY_EXTENSION on Template (CVE-2022-26923/26931)

Template has the CT_FLAG_NO_SECURITY_EXTENSION flag (0x00080000) set in msPKI-Enrollment-Flag, preventing the CA from embedding the ObjectSID extension (szOID_NTDS_OBJECT_SID) in issued certificates.

ATTR: msPKI-Enrollment-Flag: 0x00080000
Detect: certipy find // Certify.exe find
Weak Certificate Mapping Configuration (Registry 0x4 / 0x8)

Domain Controller KDC registry key 'CertificateMappingMethods' is configured to allow weak UPN mapping without SID extension enforcement (e.g. 0x4 / 0x8 / 0x18), enabling identity spoofing via UPN.

ATTR: HKLM\SYSTEM\CurrentControlSet\Services\Kdc\CertificateMappingMethods
Detect: certipy find // remote registry query
AD CS RPC ICPR Interface without Packet Privacy

CA server accepts MS-ICPR RPC certificate requests without requiring RPC_C_AUTHN_LEVEL_PKT_PRIVACY (encryption). This allows NTLM relay attacks over RPC (CVE-2022-26925 / PetitPotam).

ATTR: Interface MS-ICPR exposed via RPC over SMB/TCP without mandatory packet privacy
Detect: certipy relay -target rpc://<CA-IP>
CA Software Private Key Stored / Exportable

The CA certificate private key is stored in software (Windows Certificate Store / DPAPI / registry) rather than a hardware security module (HSM/TPM), allowing local extraction by SYSTEM/Admin.

ATTR: CA Private Key non-HSM backed (Software KSP / CryptoAPI)
Detect: certipy ca -backup // mimikatz crypto::certificates /export
Issuance Policy OID Linked to AD Group (msDS-OIDToGroupLink)

Certificate template includes an Issuance Policy with an OID that is mapped to a privileged Active Directory group via msDS-OIDToGroupLink (e.g. Domain Admins or Tier 0 Operators).

ATTR: msDS-OIDToGroupLink pointing to privileged security group
Detect: certipy find // Get-DomainObject -Filter '(msDS-OIDToGroupLink=*)'
Weak Explicit Mapping via altSecurityIdentities

Target user account has altSecurityIdentities configured using a weak mapping type (X509IssuerSubject or X509RFC822) where the attacker can obtain or forge matching credentials.

ATTR: altSecurityIdentities: X509:<I>...<S>...
Detect: Get-DomainUser -Filter '(altSecurityIdentities=*)'
Schema V1 / Legacy Template with User-Supplied OID / SAN (ESC15)

Template utilizes schema version 1 (or vulnerable version 2 with enrollment filters) permitting enrollee to inject arbitrary application policy OIDs (CVE-2024-49019) or exploit SAN injection.

ATTR: msPKI-Template-Schema-Version: 1 with custom application policy OID acceptance
Detect: certipy find -vulnerable // CVE-2024-49019 scanner
Unconstrained Delegation (TRUSTED_FOR_DELEGATION)

Compromised host or service account has the TRUSTED_FOR_DELEGATION (0x80000) bit set in userAccountControl. When any user connects, their forwardable TGT is cached in the host's LSASS memory.

ATTR: userAccountControl: 0x80000 (TRUSTED_FOR_DELEGATION)
Detect: Get-DomainComputer -Unconstrained // BloodHound (UnconstrainedDelegation)
Constrained Delegation with Protocol Transition (S4U2Self)

Compromised service account has TRUSTED_TO_AUTH_FOR_DELEGATION (0x1000000) set and an allowed SPN list in msDS-AllowedToDelegateTo. It can forge a service ticket for ANY domain user to itself and delegate it to the target service.

ATTR: userAccountControl: 0x1000000 + msDS-AllowedToDelegateTo: [SPNs]
Detect: Get-DomainUser -TrustedToAuth // BloodHound (AllowedToDelegate)
Constrained Delegation without Protocol Transition (Traditional)

Account has msDS-AllowedToDelegateTo configured but lacks TRUSTED_TO_AUTH_FOR_DELEGATION. Requires coercing or capturing a forwardable service ticket from the target user to perform S4U2Proxy.

ATTR: msDS-AllowedToDelegateTo populated, userAccountControl lacks 0x1000000
Detect: Get-DomainUser -SPN // BloodHound
Write Permissions over Target Computer Object (RBCD / RBCD Path)

Attacker possesses GenericWrite, GenericAll, WriteDacl, or WriteProperty over the target computer object, permitting modification of msDS-AllowedToActOnBehalfOfOtherIdentity.

ATTR: ACE: attacker -> GenericWrite on target computer object
Detect: BloodHound (GenericWrite/WriteDacl) // PowerView Get-DomainObjectAcl
Machine Account Quota >= 1 (ms-DS-MachineAccountQuota)

Domain configuration allows any standard authenticated user to create up to N new computer accounts (default is 10), enabling automated creation of an attacker-controlled machine account with SPN.

ATTR: ms-DS-MachineAccountQuota > 0 (Default: 10)
Detect: Get-DomainObject -Identity 'DC=corp,DC=local' -Select ms-ds-machineaccountquota
WriteProperty on msDS-KeyCredentialLink (Shadow Credentials)

Attacker has GenericWrite, GenericAll, or WriteProperty over msDS-KeyCredentialLink on a victim user or computer account, allowing injection of a self-signed X.509 public key for PKINIT authentication.

ATTR: ACE: attacker -> WriteProperty: msDS-KeyCredentialLink
Detect: BloodHound (AddKeyCredentialLink) // certipy shadow
Kerberos Pre-Authentication Disabled (DONT_REQ_PREAUTH)

Target user account has the DONT_REQ_PREAUTH (0x400000) bit set in userAccountControl. Any domain user can request an AS-REP encrypted timestamp without a password and crack it offline.

ATTR: userAccountControl: 0x400000 (DONT_REQ_PREAUTH)
Detect: Get-DomainUser -PreauthNotRequired // Rubeus asreproast
Service Principal Name (SPN) on User Account (Kerberoastable)

User account has a non-empty servicePrincipalName attribute. Any valid domain user can request a TGS Kerberos ticket for that SPN and extract the password hash (RC4 or AES) for offline cracking.

ATTR: servicePrincipalName: MSSQLSvc/...
Detect: Get-DomainUser -SPN // Rubeus kerberoast
Directory Replication Rights on Domain Root (DCSync)

Principal has DS-Replication-Get-Changes (1131f6aa-9c07-11d1-f79f-00c04fc2dcd2) and DS-Replication-Get-Changes-All (1131f6ad-9c07-11d1-f79f-00c04fc2dcd2) on the domain NC.

ATTR: ExtendedRight: DS-Replication-Get-Changes-All
Detect: BloodHound (DCSync) // secretsdump.py
2. CALCULATED ESCALATION PATHS
ESC1CRITICAL
100% MATCH

Misconfigured Certificate Template (Enrollee Supplies SAN)

A certificate template permits enrollees to supply an arbitrary Subject Alternative Name (SAN), grants enrollment to low-privileged users, and specifies a Client Authentication EKU. An attacker requests a certificate impersonating a Domain Administrator and uses PKINIT to obtain a Kerberos TGT and NTLM hash.

DOMAIN_ADMIN3/3 PREREQUISITES
ESC6CRITICAL
67% MATCH

CA EDITF_ATTRIBUTESUBJECTALTNAME2 Enabled (Global SAN Injection)

The Certificate Authority has the EDITF_ATTRIBUTESUBJECTALTNAME2 flag enabled in its registry. This flag instructs the CA to accept user-supplied Subject Alternative Names on ALL published certificate templates, completely bypassing template-level SAN restrictions. An attacker enrolls in ANY template allowing client auth (like the default 'User' template) and supplies an Administrator SAN.

DOMAIN_ADMIN2/3 PREREQUISITES
ESC13CRITICAL
67% MATCH

Issuance Policy OID Group Link Abuse (msDS-OIDToGroupLink)

Active Directory supports linking certificate Issuance Policy OIDs directly to security groups via the msDS-OIDToGroupLink attribute. When a user authenticates using a certificate containing that policy OID, the KDC automatically adds that linked security group (e.g. Domain Admins or Server Admins) to their Kerberos token PAC.

DOMAIN_ADMIN2/3 PREREQUISITES
ESC2CRITICAL
50% MATCH

Any Purpose EKU or No EKU Defined

A certificate template defines the 'Any Purpose' EKU (2.5.29.37.0) or has no EKU defined at all. Since X.509 RFCs treat certificates with no EKU or Any Purpose as valid for any cryptographic operation, an attacker can use this certificate for Client Authentication (or co-signing subordinate requests like ESC3).

DOMAIN_ADMIN1/2 PREREQUISITES
ESC3HIGH
50% MATCH

Certificate Request Agent Misconfiguration (Enrollment Agent Abuse)

A template grants the Certificate Request Agent EKU (1.3.6.1.4.1.311.20.2.1). An attacker enrolls in this template to obtain an Enrollment Agent certificate, then uses it to co-sign an on-behalf-of enrollment request for a privileged user (e.g. Administrator) against a second template requiring enrollment agent signature.

DOMAIN_ADMIN1/2 PREREQUISITES
ESC9CRITICAL
50% MATCH

No Security Extension with Weak Strong-Certificate Binding (CVE-2022-26923)

A template has the CT_FLAG_NO_SECURITY_EXTENSION (0x00080000) flag set, causing the CA to omit the szOID_NTDS_OBJECT_SID extension. If the domain lacks the May 2022 patch or has StrongCertificateBindingEnforcement configured in Compatibility Mode, an attacker with write access to a victim account's userPrincipalName (UPN) modifies the UPN, requests a cert, and claims the victim's identity.

DOMAIN_ADMIN1/2 PREREQUISITES
ESC15CRITICAL
50% MATCH

Schema Version 1 / Arbitrary Application Policy EKU Injection (CVE-2024-49019)

Template uses Schema Version 1 (or vulnerable version 2 configurations) and permits enrollee to supply custom application policies or arbitrary EKUs. An attacker requests a certificate from a template that does not ostensibly allow Client Auth, but injects the Client Authentication OID (1.3.6.1.5.5.7.3.2) directly into the request attributes, which the CA accepts and signs.

DOMAIN_ADMIN1/2 PREREQUISITES
ESC4CRITICAL
0% MATCH

Vulnerable Certificate Template Access Control (Template ACL Hijack)

A certificate template has insecure Active Directory permissions (WriteOwner, WriteDacl, GenericAll, GenericWrite) assigned to a low-privileged principal. An attacker overwrites the template configuration in LDAP to turn it into an ESC1 template (enabling CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT and Client Auth), enrolls as Domain Admin, and restores the original configuration.

DOMAIN_ADMIN0/1 PREREQUISITES
ESC5CRITICAL
0% MATCH

Vulnerable PKI Container / CA Object Access Control

Insecure Active Directory permissions on the Public Key Services container (or child objects such as Certificate Authorities, Enrollment Services, AIA, or NTAuthCertificates). Low-privileged users with write rights can compromise the entire PKI infrastructure or establish malicious trust.

ENTERPRISE_ADMIN0/1 PREREQUISITES
ESC7CRITICAL
0% MATCH

Vulnerable Certificate Authority Access Control (ManageCA / ManageCertificates)

A user has 'Manage CA' (CA Administrator) or 'Manage Certificates' (Certificate Officer) access on the CA server object. An attacker with ManageCA can add themselves as an Officer, enable the SubCA template on the CA, issue pending certificates, or alter CA configuration to gain full control.

DOMAIN_ADMIN0/1 PREREQUISITES
ESC8CRITICAL
0% MATCH

NTLM Relay to AD CS HTTP Web Enrollment Endpoints

AD CS Web Enrollment services (such as /certsrv, /certsrv/mscep, or CES) operate over HTTP without Extended Protection for Authentication (EPA). An attacker coerces a machine account (such as a Domain Controller via PetitPotam, SpoolSample, or ShadowCoerce) to authenticate back over SMB/HTTP, relays the NTLM authentication to AD CS, enrolls a machine certificate for the DC, and executes a DCSync.

DOMAIN_ADMIN0/1 PREREQUISITES
ESC10HIGH
0% MATCH

Weak KDC Certificate Mapping Configuration (Registry 0x4/0x8)

The KDC registry key CertificateMappingMethods on Domain Controllers is configured with weak mapping methods (e.g. 0x4 for UPN mapping or 0x8 for generic Subject/Issuer mapping) without SID verification. Any certificate containing a target UPN (even if signed by a subCA or from an account that previously had that UPN) authenticates as the target.

DOMAIN_ADMIN0/1 PREREQUISITES
ESC11CRITICAL
0% MATCH

NTLM Relay to AD CS RPC ICPR Interface (No Packet Privacy)

The CA exposes the MS-ICPR RPC interface without enforcing RPC_C_AUTHN_LEVEL_PKT_PRIVACY (packet encryption). An attacker coerces a machine account (DC$) to authenticate over SMB/RPC and relays the raw NTLM credentials over RPC to the CA, obtaining a machine certificate for the DC and DCSyncing the domain.

DOMAIN_ADMIN0/1 PREREQUISITES
ESC12HIGH
0% MATCH

CA Private Key Stored in Software / Exportable DPAPI

The CA certificate private key is stored in software (Windows DPAPI / CryptoAPI machine keys) instead of a certified Hardware Security Module (HSM). An attacker who obtains local administrator access on the CA server extracts the CA root private key from disk/memory and offline-signs Golden Certificates for any domain identity.

ENTERPRISE_ADMIN0/1 PREREQUISITES
ESC14HIGH
0% MATCH

Weak Explicit Mapping via altSecurityIdentities

A target user account has altSecurityIdentities explicitly configured with weak mapping patterns (such as X509IssuerSubject, X509IssuerSerialNumber, or X509RFC822). If an attacker can obtain or forge an X.509 certificate matching the specified issuer and subject string, the KDC authenticates them as the target user.

DOMAIN_ADMIN0/1 PREREQUISITES
RBCDCRITICAL
0% MATCH

Resource-Based Constrained Delegation (msDS-AllowedToActOnBehalfOfOtherIdentity)

An attacker has write access (GenericWrite, GenericAll, WriteProperty) over a target computer object in Active Directory. The attacker populates the target's msDS-AllowedToActOnBehalfOfOtherIdentity attribute with a security descriptor granting delegation rights to a computer account controlled by the attacker. Using S4U2Self and S4U2Proxy, the attacker impersonates a local Administrator on the target host.

MACHINE_SYSTEM0/1 PREREQUISITES
UNCONSTRAINEDCRITICAL
0% MATCH

Kerberos Unconstrained Delegation (TRUSTED_FOR_DELEGATION)

A compromised host has the TRUSTED_FOR_DELEGATION flag set in userAccountControl. When any domain user connects to a service on this host via Kerberos, their forwardable TGT is embedded in the authenticator and cached in LSASS. An attacker coerces a Domain Controller (e.g. via SpoolSample or PetitPotam) to authenticate to the host, extracts the DC$ machine TGT from LSASS, and executes a DCSync.

DOMAIN_ADMIN0/1 PREREQUISITES
CONSTRAINED_S4UCRITICAL
0% MATCH

Constrained Delegation with Protocol Transition (S4U2Self / S4U2Proxy)

A compromised service account has TRUSTED_TO_AUTH_FOR_DELEGATION enabled and has target SPNs listed in msDS-AllowedToDelegateTo. With Protocol Transition enabled, the service account can forge an arbitrary user's identity (Administrator) to itself via S4U2Self without needing the user's password, and forward that ticket to the allowed target service via S4U2Proxy.

MACHINE_SYSTEM0/1 PREREQUISITES
SHADOW_CREDENTIALSCRITICAL
0% MATCH

Shadow Credentials (msDS-KeyCredentialLink Write Abuse)

An attacker has GenericWrite, GenericAll, or WriteProperty rights over the msDS-KeyCredentialLink attribute of a target user or computer. The attacker generates a self-signed X.509 certificate, injects the public key structure (KeyCredential) into the target's msDS-KeyCredentialLink attribute in LDAP, and uses the private key to authenticate via Kerberos PKINIT to claim the target's TGT and NTLM hash.

USER_TAKEOVER0/1 PREREQUISITES
ASREP_ROASTHIGH
0% MATCH

AS-REP Roasting (Kerberos Pre-Authentication Disabled)

Target accounts have the DONT_REQ_PREAUTH flag enabled in userAccountControl. Any valid domain user (or unauthenticated user with access to KDC port 88) can request a Kerberos AS-REP message without knowing the account password. The AS-REP contains an encrypted timestamp encrypted with the user's password hash, which can be cracked offline.

USER_TAKEOVER0/1 PREREQUISITES
KERBEROASTHIGH
0% MATCH

Kerberoasting (Service Principal Name Password Hash Extraction)

Target accounts have a registered servicePrincipalName (SPN). Any authenticated domain user can request a Kerberos service ticket (TGS-REQ) for that service from the KDC. The returned TGS-REP is encrypted using the NTLM/AES secret key of the account running the service, enabling offline cracking.

USER_TAKEOVER0/1 PREREQUISITES
DCSYNCCRITICAL
0% MATCH

Directory Replication Rights Abuse (DCSync)

The attacker controls an account that possesses Directory Replication permissions (DS-Replication-Get-Changes and DS-Replication-Get-Changes-All) on the domain naming context. The attacker uses DRSUAPI over RPC to simulate a Domain Controller replicating Active Directory secrets, extracting the KRBTGT NTLM hash and Domain Admin hashes directly.

DOMAIN_ADMIN0/1 PREREQUISITES
ESC1

Misconfigured Certificate Template (Enrollee Supplies SAN)

CATEGORY: AD_CS_TEMPLATES//OUTCOME: DOMAIN_ADMIN//SpecterOps Certified Pre-Owned Whitepaper
EXPLOITABLE NOW
Target: Administrator @ corp.local
CERTIPY EXECUTION SYNTAX
# 1. Enumerate vulnerable templates
certipy find -u 'lowpriv' -p 'Password123!' -dc-ip 10.10.10.10 -vulnerable

# 2. Request certificate for Administrator using ESC1 template
certipy req -u 'lowpriv' -p 'Password123!' -ca 'CORP-ENTERPRISE-CA' -target 'ca.corp.local' -template 'ESC1-Template' -upn 'Administrator@corp.local'

# 3. Authenticate with the obtained certificate via PKINIT
certipy auth -pfx Administrator.pfx -dc-ip 10.10.10.10
NOTE:If Strong Certificate Binding (KB5014754) is enforced without SID mapping, certipy auth will automatically detect if mapping succeeds.