Last updated
Last updated
AD CS certificate templates are provided by Microsoft as a starting point for distributing certificates. They are designed to be duplicated and configured for specific needs. Misconfigurations within these templates can be abused for privilege escalation.
Certify can also find vulnerable templates.
Let's go through the key parts of this output.
This template is served by sub-ca.
The template is called CustomUser.
ENROLLEE_SUPPLIES_SUBJECT is enabled, which allows the certificate requestor to provide any SAN (subject alternative name).
The certificate usage has Client Authentication set.
DEV\Domain Users have enrollment rights, so any domain user may request a certificate from this template.
If a principal you control has WriteOwner, WriteDacl or WriteProperty, then this could also be abused.
This configuration allows any domain user to request a certificate for any other domain user (including a domain admin) and use it for authentication. Request a certificate for nlamb.
Copy the whole certificate (both the private key and certificate) and save it to cert.pem
on Ubuntu WSL. Then use the provided openssl
command to convert it to pfx format.
Convert cert.pfx
into a base64 encoded string so it can be used with Rubeus
Then use asktgt
to request a TGT for the user using the certificate.