ADCS
Active Directory Certificate Services (ADCS) | PKI | Certificate Authority (CA)
ADCS in short
Active Directory Certificate Services (AD CS) is a Windows server feature that helps organizations create and manage their own Public Key Infrastructure (PKI). Where Public Key Infrastructure (PKI) is a system that uses digital certificates and public key cryptography to secure communication over unsafe networks, like the Internet.
Certificate Authorities (CAs) are trusted entities that issue certificates. Certificate templates are used to define certificate settings, such as usage policies, validity periods, subject details, and who can request them Certificates can extend Kerberos authentication using PKINIT (Public Key Cryptography for Initial Authentication).
Public Key Infrastructure (PKI)
Public Key Infrastructure (PKI)
is a system that uses digital certificates and public key cryptography. This is done to provide secure communication over unsecured network like the internet. PKI enables signatures, ecnryption and authentication of documents, email.
The certificate includes:
Public key
Name of subject
Name of issuer
Validity period
What is ADCS?
Active Directory Certificate Services (AD CS)
is a Windows server role that enables organizations to establish and manage their own Public Key Infrastructure (PKI). It is used to secure network services like SSL/TLS, VPN, Remote Desktop Services, WLAN.
Active Directory Certificate Services includes:
Digital certificates
Certificate Authority
Certificate Templates
Key Pair generation
Certificate Revocation
Secure communication
Digital Signatures
Encryption and Decryption
Enhanced Security and Identity Managemen
ADCS Terminology
ADCS serves as a pivotal player working with trust and encryption and at its core lies the Ceritifcate Authority (CA).
Certificates
A certificate is an X.509-formatted digitally signed document
serves purposes like encryption, message signing, and authentication. It consists of multiple key fields:
Subject: Certificate owner's identity.
Public key: Links subjects to a private key.
NotBefore and NotAfter dates: Certificate's validity duration
Serial Number: Unique identifier assigned by issuing CA.
Issuer: Identifies the certifcate issuer
SubjectAlternativeName: Alternative names associated with subject.
Basic Constraints: Defines if certificate is a CA or entity.
Extende Key Usages (EKUs): Object identifiers describing usage over code signing, ecrypting file sytems, secuer email, client and server authentication.
Certificate Authorities
Certificate Authorities (CAs)
serve as pivotal entities responsible for the issuance of certificates, which play a crucial role in validating digital identities, enabling secure communications, and establishing trust within networks.
Certification Authorities
Defines root CA certificates that establish the trust foundation in AD CS environments.
Trusted Root Certification Authorities store on Windows machines, enabling certificate trust verification.
Enrollment Services
Hosts Enterprise CA objects enabled in AD CS, managing attributes like certificate templates and DNS hostnames.
Supports client certificate requests and deployment to Intermediate Certification Authorities store.
NTAuthCertificates
Defines CA certificates required for authentication to Active Directory.
Ensures client certificates used for AD authentication are signed by trusted CAs.
AIA (Authority Information Access)
Contains intermediate and cross-CA objects for validating certificate chains.
Aids in certificate chain validation, with intermediate CAs in the Intermediate Certification Authorities store.
Certificate Templates
AD CS Enterprise CAs
use certificate templates
. Template are managed through the Certificate Template feature and are stored as AD object as objectClass pKICertificateTemplate
. Settings are defined through attributes security descriptors enroll permisions and template edits.
The pKIExtendedKeyUsage
attribute in an Active Directory (AD) certificate template defines which specific Extended Key Usage (EKU) functionalities are allowed for certificates issued using that template.
Enrollment Process
ADCS Enumeration
When Active Directory Certificate Services (AD CS) is present and doing a security check find out what server is running the ADCS, which can be the DC but usually its own server.
Enumeration From Windows
On factor indicating ADCS is present is the built-in Cert Publishers group which authorizes Certificate Authorities to publish certificates to the directory indicating a ADCS server.
# Query Cert Publishers group
net localgroup "Cert Publishers"
Enumerate ESC9 from Windows
.\Certify.exe find
Enumeration from Linux
netexec ldap 10.129.205.199 -u "blwasp" -p "Password123!" -M adcs
Or with Certipy
certipy find -u '[email protected]' -p 'Password123!' -dc-ip 10.129.205.199 -stdout
Certificate Mapping
Certificate mapping is relevant for ESC6, ESC9 and ESC10 attacks. Certificate mapping connects a certificate to the specific user or machine it belongs to. This ensures that when a certificate is used, it can only be associated with its rightful owner in Active Directory.
Types of Certificate Mapping
Explicit mapping: The account's altSecurityIdentities attribute contains the certificate’s identifier and certificate must match this value and be issued by a trusted CA.
Implicit mapping: Information in the certificate's Subject Alternative Name (SAN) field is used to map it to the account, such as: UPN or DNS.
Kerberos Certificate Mapping
When certificates are used for Kerberos authentication, the StrongCertificateBindingEnforcement
registry key determines how the mapping is handled:
Disabled mode: If certificat contains a UPN, kerberos tries to match with UPN, else sAMAccountName.
Compatibility mode: Default, explicit mapping exists (altSecurityIdentities), authentication is allowed.
Full Enforcement mode: Strong mapping is required (either explicit mapping or validation of the security extension). If neither is present, authentication fails.
Last updated
Was this helpful?