> ## Documentation Index
> Fetch the complete documentation index at: https://docs.specterops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ESC16 - Security Extension Disabled on Certificate Authority

> Exploit certificate authorities with disabled SID security extensions affecting all issued certificates

ESC16 is a misconfiguration in Active Directory Certificate Services (AD CS), which stems from insecure management of security features. Specifically, if the `szOID_NTDS_CA_SECURITY_EXT` (`1.3.6.1.4.1.311.25.2`) extension (the SID security extension) is on the list of disabled extensions for a certificate authority, the certificate authority will not include a SID security extension in any issued certificates.

## Background

The configuration was first described in 2022 by [Will Schroeder](https://x.com/harmj0y) in [this blogpost](https://posts.specterops.io/certificates-and-pwnage-and-patches-oh-my-8ae0f4304c1d) as a temporary workaround for the interaction between [ESC7](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/esc7-vulnerable-certificate-authority-access-control.md) and [ESC6](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/esc6-request-attribute-san-editf-attributesubjectaltname2.md), but was later tagged `ESC16` by [Oliver Lyak](https://github.com/ly4k).

> [!NOTE]
>
> This vulnerability is identical to that of [ESC9](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/esc9-security-extension-disabled-on-certificate-template.md) but covers all certificates issued by the certificate authority rather than just certificates issued from a specific template.

## Detection

We can search for certificate authorities with these vulnerabilities using the `enum-cas --filter-vulnerable` command from Certify. For more information about the command and its parameters, please refer to the [Command Overview](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/1-command-overview.md) page.

```bash Command theme={null}
Certify.exe enum-cas --hide-admins
```

```diff Output theme={null}
   _____          _   _  __
  / ____|        | | (_)/ _|
 | |     ___ _ __| |_ _| |_ _   _
 | |    / _ \ '__| __| |  _| | | |
 | |___|  __/ |  | |_| | | | |_| |
  \_____\___|_|   \__|_|_|  \__, |
                             __/ |
                            |___./
  v2.0.0

[*] Action: Find certificate authorities
[*] Using the search base 'CN=Configuration,DC=corp,DC=local'
[*] Classifying vulnerabilities in the context of built-in low-privileged domain groups.

[*] Root CAs

    ...

[*] NTAuthCertificates - Certificates that enable authentication:

    ...

[*] Enterprise/enrollment certificate authorities:

    Enterprise CA Name            : CORP-CA01-CA
    DNS Hostname                  : ca01.corp.local
    FullName                      : ca01.corp.local\CORP-CA01-CA
    Flags                         : SUPPORTS_NT_AUTHENTICATION, CA_SERVERTYPE_ADVANCED
    Cert SubjectName              : CN=CORP-CA01-CA, DC=corp, DC=local
    Cert Thumbprint               : CFBDC6826AC074EF86BE7774F959A2FF5F322DDC
    Cert Serial                   : 12D3E574A63DE7854A9E5A1F4CD56490
    Cert Start Date               : 21/05/2025 12.13.47
    Cert End Date                 : 21/05/2030 12.23.46
    Cert Chain                    : CN=CORP-CA01-CA,DC=corp,DC=local
    User Specifies SAN            : Disabled
    RPC Request Encryption        : Enabled
+   Disabled Extensions           : <unknown> (1.3.6.1.4.1.311.25.2)
    Vulnerabilities
+     ESC16                       : The CA has disabled the security extension.
    CA Permissions
      Owner: BUILTIN\Administrators             S-1-5-32-544

      Access Rights                                     Principal
      Allow  Enroll                                     NT AUTHORITY\Authenticated Users   S-1-5-11
    Enrollment Agent Restrictions : None

    Enabled Certificate Templates:
        ...

Certify completed in 00:00:00.5293547
```

> [!NOTE]
>
> For exploitation techniques related to ESC16, refer to the attack methods described in [ESC9](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/esc9-security-extension-disabled-on-certificate-template.md) and [ESC6](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/esc6-request-attribute-san-editf-attributesubjectaltname2.md), as ESC16 enables these same attack vectors but affects all certificates issued by the CA.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.