ESC1 is a common ADCS vulnerability where a misconfigured Certificate Template grants enrollment rights to low-privileged users such as Domain Users, and allows requesters to include a subjectAltName in the CSR. This allows a user to request a certificate as any principal such as a DA.
🔍 Discovery
Certipy is the go to tool for findings and exploiting many common ADCS vulnerabilities.
Running certipy will require a domain user, and it will generate multiple output files including JSONs, these can be manually examined or put into BloodHound.
In the JSON output, certipy will flag a given template as vulnerable:
📌 Exploitation
To exploit this, you’ll need to request a certificate using the vulnerable template, and supply the subject you’d like to impersonate, generally the Administrator account.
This will generate the certificate [USERNAME].pfx which can be used to authenticate as that user.
✨ Post-Exploitation
You can use certipy-ad auth to authenticate as the impersonated user and grab their hash:
🚔 Detection & Evasion
Event 4887: Certificate Services Approved A Certificate Request And Issued A Certificate is emitted when a certificate is issued.