Sniffing Out Cert Abuse: A Dogged Approach to ESC Remediation

Emily Leidy (Managing Consultant · Spectre Ops)

BSides NYC 2025 (0x05) · Day 1 · Tech - Other

Overview

In this insightful talk, Emily Leidy, a Managing Consultant at Spectre Ops, delves into the pervasive and critical security risks posed by misconfigurations in Active Directory Certificate Services (ADCS). Specifically, she focuses on Escalation (ESC) attack paths, which allow attackers to leverage improperly configured certificate services to achieve significant privilege escalation, often leading to full domain or even forest-wide compromise. Leidy's presentation provides a comprehensive overview of these attack vectors, from the original "Certified Pre-Owned" research to the most recently discovered ESC16, and offers a practical methodology for auditing and prioritizing remediation efforts.

Watch on YouTube

Visual summary for Sniffing Out Cert Abuse: A Dogged Approach to ESC Remediation by Emily Leidy
Visual summary for Sniffing Out Cert Abuse: A Dogged Approach to ESC Remediation by Emily Leidy

Key moments

  1. 0:00 Introduction and talk agenda for ESC remediation
  2. 1:30 ADCS overview and Certified Pre-Owned research
  3. 2:50 ADCS components and BloodHound's data collection
  4. 4:40 Key updates to ADCS attack paths and BloodHound
  5. 6:15 Beginning ESC1 remediation: Subject Alternative Name

Sniffing Out Cert Abuse: A Dogged Approach to ESC Remediation

Speakers: Emily Leidy, Managing Consultant, Spectre Ops

Conference: BSides NYC

YouTube: https://www.youtube.com/watch?v=dm_Vy0zGdk

Overview

In this insightful talk, Emily Leidy, a Managing Consultant at Spectre Ops, delves into the pervasive and critical security risks posed by misconfigurations in Active Directory Certificate Services (ADCS). Specifically, she focuses on Escalation (ESC) attack paths, which allow attackers to leverage improperly configured certificate services to achieve significant privilege escalation, often leading to full domain or even forest-wide compromise. Leidy's presentation provides a comprehensive overview of these attack vectors, from the original "Certified Pre-Owned" research to the most recently discovered ESC16, and offers a practical methodology for auditing and prioritizing remediation efforts.

The core of Leidy's discussion revolves around the practical challenges organizations face in identifying and mitigating these complex ADCS vulnerabilities. She highlights that despite the severity of these issues, many environments remain vulnerable due to a lack of continuous auditing, the rapid discovery of new attack paths, and the inherent difficulty in building effective remediation strategies. The talk underscores the critical role of tools like BloodHound in gaining visibility into these attack paths and introduces a novel prioritization matrix designed to help security teams tackle the most impactful vulnerabilities first, transforming a daunting task into a manageable security initiative.

Background

▶ Watch: Introduction and talk agenda for ESC remediation (0:00)

Active Directory Certificate Services (ADCS) is a fundamental Windows server role responsible for issuing and managing Public Key Infrastructure (PKI) certificates within an Active Directory forest. These certificates are crucial for secure communication, authentication protocols, and various other security-sensitive operations. The configuration of ADCS, however, can be incredibly complex, involving numerous interconnected objects and permissions that, if misconfigured, open doors to severe security vulnerabilities.

The foundational research that brought ADCS attack paths into prominence was "Certified Pre-Owned," released in 2021 by Will Schroeder and Lee Christensen, both colleagues of Leidy at Spectre Ops. This seminal work uncovered ESC1 through ESC8, detailing how attackers could exploit ADCS misconfigurations to escalate privileges. Since then, the landscape of ADCS vulnerabilities has continued to expand, with an additional eight escalation paths (ESC9 through ESC16) being discovered and documented, most recently with ESC16 emerging in May of the current year. This continuous discovery underscores the dynamic nature of ADCS security and the need for ongoing vigilance.

Leidy provides a quick overview of key ADCS components relevant to these attack paths, including the Certificate Template node, the Enterprise CA (Certificate Authority), and the NT Auth Store. These LDAP objects, residing within the configuration naming context, store critical permissions and configurations that BloodHound, a widely used open-source attack path mapping tool, collects and analyzes. BloodHound's ability to model security descriptors and Access Control Entries (ACEs) on these objects is central to identifying viable escalation paths. Recent updates to BloodHound include the removal of certain no-longer-tenable ESC9, 14, and 15 scenarios due to Windows patches (e.g., strong certificate mapping enforcement in September), the addition of a new edge for detecting ESC8 (coerc and relay NTLM to ADCS), and enhanced capabilities to display all inbound ADCS escalation opportunities for a singular domain. While ESC16 is not yet integrated into BloodHound, its inclusion is anticipated, demonstrating the continuous effort to keep pace with new threats.

Key Findings

▶ Watch: ADCS overview and Certified Pre-Owned research (1:30)

The talk reveals several critical insights into the state of ADCS security and the challenges of remediation. Foremost among these is the alarming prevalence of ADCS misconfigurations in real-world environments. Emily Leidy presented data from a cipher query run across Spectre Ops' entire BloodHound Enterprise (BHE) fleet, comprising approximately 1500 domains. This analysis found ESC1 to be the second most common attack path, trailing only ESC4, highlighting that these critical vulnerabilities are not theoretical but are actively exploitable in a vast number of organizations.

A significant finding is the continuous evolution of ADCS attack paths. Since the "Certified Pre-Owned" research in 2021, an additional eight escalation techniques (ESC9 through ESC16) have been identified, with ESC16 being discovered as recently as May of the current year. This constant emergence of new attack vectors means that organizations cannot rely on one-time audits or outdated remediation strategies; continuous monitoring and adaptation are essential. Furthermore, Leidy emphasizes that remediation is not a straightforward process. The complexity arises from the multitude of conditions—often 10 to 12—that must align for an ESC path to be viable. This creates a daunting number of combinations, making it difficult for organizations to know where to begin, especially given that remediation steps are highly environment-dependent.

Leidy also underscores the danger of a "lack of visibility," which leaves organizations "blind to a lot of these pretty critical attack paths that we exploit regularly in penetration tests and red teams." This lack of awareness is often compounded by a false sense of security derived from previous remediation efforts or reliance on preventive tooling that may not cover newly discovered attack vectors. To address the complexity of remediation, Leidy introduces a novel priority score formula and prioritization matrix. This methodology helps organizations identify, categorize, and rank ADCS vulnerabilities based on impact, exploitability, likelihood, and detection difficulty, thereby guiding remediation efforts towards the most critical and impactful issues first. This approach is designed to help organizations make informed decisions about where to invest their limited resources, moving away from a reactive, overwhelming response to a proactive, risk-based strategy.

Technical Deep Dive

▶ Watch: ADCS components and BloodHound's data collection (2:50)

The technical core of Leidy’s presentation focuses on the mechanics of ADCS escalation paths, particularly ESC1, which she uses as a prime example of template impersonation abuse. ESC1 is a highly effective and unfortunately common primitive that allows a low-privileged user to impersonate any user in the domain, including domain administrators. This is primarily achieved through the abuse of the Subject Alternative Name (SAN) extension in certificates.

A SAN is an extension that allows additional identities to be bound to a certificate beyond just the subject. While convenient for consolidating multiple domain identities onto a single HTTPS certificate, it introduces a dangerous vector if an attacker can specify an arbitrary SAN when requesting a certificate. For ESC1 to be viable, several conditions must be met:

  1. The Enterprise CA must be trusted for NT authentication.
  2. The certificate template must have the enroll supplies subject flag enabled.
  3. The template must include an Enhanced Key Usage (EKU) that permits NT authentication (e.g., Client Authentication).
  4. The attacker must have enrollment rights to the certificate template.

Leidy walks through a hypothetical attack scenario involving Alice and Bob, where Bob is a domain administrator. If Alice has the ability to exploit ESC1, the attack proceeds as follows:

  1. Alice requests a certificate from the Enterprise CA. Crucially, in her request, she specifies Bob's User Principal Name (UPN) (e.g., [email protected]) within the SAN field.
  2. The Security Reference Monitor on the CA host checks if Alice has the necessary permissions to enroll with an arbitrary SAN. If the enroll supplies subject flag is enabled and Alice has enrollment rights, the CA allows it.
  3. The CA issues a certificate back to Alice. This certificate is valid for authentication and contains Bob’s UPN in its SAN, along with an EKU like Client Authentication.
  4. Alice then presents this newly acquired certificate to a Domain Controller (DC), requesting a Ticket-Granting Ticket (TGT) as Bob. The certificate acts as proof of Alice's asserted identity as Bob.
  5. The DC, trusting the CA and the certificate's validity, issues a TGT for Bob to Alice. At this point, Alice has effectively impersonated Bob and can use the TGT to request Ticket-Granting Service (TGS) tickets for various services, gaining Bob's privileges.

This attack is extremely powerful because it leverages the inherent trust relationships within ADCS. Leidy highlights that ESC1, along with ESC2, ESC3, and ESC13, falls into an abuse category where the "template enables impersonation." Other categories include "control over ADCS objects" (ESC4, ESC5, ESC7, ESC12), where attackers gain control over CA computers or configuration objects. BloodHound's composition graph helps visualize how these different objects and configurations fit together to form an attack primitive, emphasizing that removing even one "puzzle piece" can break the entire chain. The complexity stems from the interplay of security descriptors on certificate templates, CA objects, and the host configurations, all of which contribute to the viability of these escalation paths. Understanding these categories is crucial for developing targeted and effective remediation strategies.

Demo / Proof of Concept

▶ Watch: Key updates to ADCS attack paths and BloodHound (4:40)

While the talk did not feature a live, interactive demonstration of an ADCS exploitation or a specific Proof of Concept tool walkthrough, Emily Leidy effectively demonstrated the widespread prevalence of these vulnerabilities through real-world data. She referenced running cipher queries across Spectre Ops’ entire BloodHound Enterprise (BHE) fleet, which encompasses approximately 1500 client domains. This extensive analysis revealed that ESC1 was the second most common attack path, closely following ESC4.

This method, though not a live hack, served as a compelling "proof of concept" by illustrating the significant real-world impact and ubiquitous nature of these ADCS misconfigurations. The use of BloodHound's query capabilities to aggregate and present this fleet-wide data underscored the tool's utility in auditing and identifying these complex attack paths at scale, providing tangible evidence of the problem's scope rather than just theoretical explanation. Leidy's explanation of how BloodHound identifies inbound ADCS escalation opportunities for a specific domain also served to highlight the tool's practical application for defenders.

Defensive Implications

▶ Watch: Beginning ESC1 remediation: Subject Alternative Name (6:15)

Remediating ADCS misconfigurations is a critical, albeit challenging, endeavor. Emily Leidy strongly advises organizations to undertake regular and continuous auditing of their ADCS environment, emphasizing that a "lack of visibility really leaves you blind to a lot of these pretty critical attack paths." She also points to the Certify wiki as an excellent resource for mitigation guidance. The remediation strategies often depend on the specific ESC category being addressed.

For ESC1 and ESC13 (template enables impersonation), the primary remediation steps include:

  • Limit Enrollment Rights: Restrict enrollment rights on vulnerable certificate templates exclusively to Tier Zero principles. This ensures that only highly privileged, well-controlled accounts can request certificates from these templates.
  • Remove Dangerous EKUs: Eliminate EKUs that enable domain authentication (e.g., Client Authentication) from templates where they are not strictly necessary. If impersonation is required for specific non-Tier Zero groups (like a helpdesk creating smart cards), implement enrollment agents with restrictions. This allows for more granular control over who can be impersonated, preventing broad abuse. Leidy specifically recommends Ubico's vendor guide for implementing these restrictions, cautioning against less reliable guides.

For ESC4, ESC5, ESC7, and ESC12 (control over ADCS objects), the focus shifts to protecting the ADCS infrastructure itself:

  • Restrict Control over ADCS Objects: Limit control over ADCS objects, particularly CA computers, for all non-Tier Zero principles. This involves enumerating security principles with non-default rights such as GenericAll, WriteDACL, or ManageCA on CA objects and removing unnecessary permissions.
  • Enforce Group Policy: Implement Group Policy to block non-administrator certificate enrollment modifications, preventing unauthorized changes to templates or CA configurations.
  • Enable Telemetry: Configure and centralize event logging for critical ADCS-related activities. Key Event IDs to monitor include 4899 (for certificate template modifications), 4900 (for CA configuration changes), and 4662 (for object access attempts), enabling detection of suspicious activity.

For ESC8 (coerc and relay NTLM to ADCS), the remediation is twofold:

  • Enable Extended Protection for Authentication (EPA): This is the primary mitigation for IIS-hosted web services, such as CertSRV. Configure the application pool or site hosting the ADCS web services to require EPA, preventing NTLM relay attacks.
  • Require HTTPS: Ensure all ADCS web services are configured to use HTTPS only, disabling HTTP bindings. While not a direct prevention for NTLM relay, it is a prerequisite for enabling EPA.

For ESC16 (which overlaps with ESC9 and deals with strong certificate binding enforcement), the remediation involves:

  • Re-enable SID Security Extension: Use certutil to re-enable the SID security extension on the CA.
  • Patch Properly: Ensure the CA and DCs are fully patched to enforce strong certificate binding.
  • Enable Strong Certificate Binding Enforcement: Fully enable strong certificate binding enforcement on Domain Controllers. The Certify tool can be used to audit for this vulnerability.

Leidy also introduces a prioritization matrix and a priority score formula as a crucial defensive tool. This formula weights impact and exploitability highest, followed by likelihood, and then detection difficulty. Organizations can tailor these weights based on their specific environment and defensive maturity. This structured approach helps security teams focus their remediation efforts on the most critical and exploitable attack paths, maximizing their risk reduction. Finally, Leidy strongly advises caution and thorough planning before implementing any remediation. Organizations must document all dependencies and anticipate potential breakage, as rushed changes can disrupt critical services.

Key Takeaways

  • ADCS misconfigurations are a pervasive and critical threat, commonly exploited to achieve forest-wide privilege escalation, with ESC1 and ESC4 being particularly prevalent in real-world environments.
  • The ADCS attack surface is continuously expanding, with new escalation paths (ESC9 through ESC16) discovered regularly, necessitating ongoing auditing and adaptation of defensive strategies.
  • BloodHound is an indispensable tool for identifying, visualizing, and auditing complex ADCS attack paths, providing crucial visibility into an organization's exposure.
  • A structured prioritization methodology is essential for effective remediation, guiding security teams to focus on vulnerabilities with the highest impact, exploitability, and likelihood, rather than attempting to fix everything at once.
  • Specific, targeted remediations exist for different ESC categories, including restricting enrollment rights to Tier Zero, removing dangerous EKUs, implementing enrollment agents with restrictions, enforcing EPA, and enabling strong certificate binding enforcement.
  • Remediation must be carefully planned and executed, with thorough documentation of dependencies and consideration for potential service disruptions, to avoid unintended consequences.

About the Speaker(s)

Emily Leidy is a Managing Consultant at Spectre Ops, a leading cybersecurity firm specializing in offensive and defensive security operations. She has been with Spectre Ops for approximately four and a half years, initially starting as a defensive consultant and progressing to manage a team of offensive and defensive operators. In her current role, she also leads security assessments and focuses on building out new services for the company. Based in New York, Emily has a unique background; prior to her career in cybersecurity, she was a professional opera singer.

Reviews

Dr. Zero (Offensive Security Researcher) — SOLID

A competent, practitioner-oriented walkthrough of ADCS ESC remediation that earns its slot at BSides NYC. Leidy knows her material, the fleet-wide prevalence data adds real weight, and the prioritization matrix is a genuinely useful practitioner artifact — but this is fundamentally a synthesis and operationalization talk built on SpecterOps' own prior research, not novel attack research.

Heather Calloway (CISO) — SOLID

A technically competent and operationally grounded talk on ADCS misconfigurations that delivers real practitioner value — specific remediation steps, a prioritization framework, and fleet-wide prevalence data that confirms this isn't theoretical. The ceiling is BSides, not RSA: it serves the security engineer who owns the AD environment, not the leader who owns the program.

→ Top-rated talks at BSides NYC 2025 (0x05)

All talks from BSides NYC 2025 (0x05)