第 6 章,共 8 章

The ESC family, explained

Eight well-known ADCS misconfigurations, the condition behind each, and the control that closes it.

约 14 分钟阅读

学完本章后,您将能够

  • Describe the condition behind ESC1 to ESC8
  • Explain why ESC1 is the most commonly exploited path
  • Match each ESC issue to a concrete mitigation
  • Recognise combinations that defeat a single control

01Why ESC matters

Researchers catalogued the ways an ADCS configuration can hand out credentials it should not. They are numbered ESC1 to ESC16 as the field grew. You do not need all of them for a first course, but you must understand the pattern: a policy mistake turns certificate issuance into identity impersonation.

02The core eight

IssueConditionControl
ESC1Template lets the requester supply the subject, with an authentication EKU and broad enrolmentDisable supply-in-request, require approval, narrow enrolment rights
ESC2Template with Any Purpose or no EKU that can be enrolledRestrict EKU; remove unused templates
ESC3Enrolment agent template usable by ordinary usersRestrict agent templates to dedicated accounts, require approval
ESC4Write access to the template objectTighten ACLs on templates and the PKI container
ESC5Write access to CA objects in ADAudit ACLs on the CA object and NTAuthCertificates
ESC6CA-wide flag allows a SAN in any request (EDITF_ATTRIBUTESUBJECTALTNAME2)Disable the flag, restart the service, patch the CA
ESC7Manage CA or Manage Certificates granted too widelyLimit CA roles to named administrators
ESC8HTTP enrolment endpoints reachable for NTLM relayRequire HTTPS with Extended Protection for Authentication, or remove web enrolment

Newer variants (ESC9 to ESC16) explore weaker certificate mapping, missing security extensions, and schema version 1 templates that let a requester override the EKU. The defensive principle is unchanged: control the subject, the purpose, the permissions and the endpoint.

03Why ESC1 dominates

ESC1 needs no vulnerability in Windows. It needs a template with three ordinary-looking settings: the requester may supply the subject, the certificate is valid for client authentication, and a broad group can enrol. A user then requests a certificate with an administrator's name in the subject and logs in as that administrator.

  1. 1

    Find the template

    Enumerate published templates and their effective permissions.

  2. 2

    Request

    Submit a request specifying another identity, if the template allows it.

  3. 3

    Receive

    The CA issues a certificate that is cryptographically valid.

  4. 4

    Authenticate

    Present the certificate to obtain a Kerberos ticket for the impersonated account.

  5. 5

    Persist

    The certificate keeps working after a password reset until it expires or is revoked.

04Combinations and validation

Modern Windows updates enforce stronger certificate-to-account mapping, which breaks some ESC paths but not all. A control that fixes one issue can leave another open, so assessments must look at combinations rather than individual settings.

Which three settings combine to create ESC1?

Requester-supplied subject, an authentication-capable EKU, and enrolment rights for a broad group.

Why is disabling NTLM alone not a fix for ESC8?

Other relay paths and protocol fallbacks may remain, and the enrolment endpoint itself is still exposed. Remove or harden the endpoint.

What is the fastest check for ESC4?

Effective write permissions on template objects and on the PKI container in Active Directory.

要点回顾

  • ESC issues are configuration mistakes that turn issuance into impersonation
  • ESC1 combines requester-supplied subject, authentication EKU and broad enrolment
  • ESC4 and ESC5 are permission problems on templates and CA objects
  • Fixing one ESC path does not close the others; assess combinations