A certificate was issued by AD CS. RequesterName, CertificateTemplate, and SerialNumber are key.
Certificate issuance following an ESC attack. A certificate issued via ESC1 can be used with PKINIT for domain privilege escalation. Any certificate issued to unexpected accounts or with unusual templates warrants investigation.
Alert: certificate issued for SubCA, DomainController, or other privileged templates to non-admin accounts. Correlate with 4886 (request) — request+approval chain reveals the full ESC attack.
SubjectUserNameTargetUserNameLogonTypeIpAddressWorkstationName | Tactic | Technique |
|---|---|
| Credential Access | Steal or Forge Authentication Certificates (T1649) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
SecurityEvent
| where EventID == 4887 // Certificate Services approved a certificate request and issued a certificate
| project TimeGenerated, Computer, SubjectUserName, TargetUserName, LogonType, IpAddress, WorkstationName
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Security" EventCode=4887
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# Certificate Services approved a certificate request and issued a certificate — add EventData fields: SubjectUserName, TargetUserName, LogonType, IpAddress`
Certificate Services approved a certificate request and issued a certificate. A certificate was issued by AD CS. RequesterName, CertificateTemplate, and SerialNumber are key.
Event 4887 is written to the Security channel by Microsoft-Windows-Security-Auditing. Advanced Audit Policy — enable the 'Certificate Services' subcategory (Success and/or Failure).
Event 4887 is associated with: Steal or Forge Authentication Certificates (T1649).
Alert: certificate issued for SubCA, DomainController, or other privileged templates to non-admin accounts. Correlate with 4886 (request) — request+approval chain reveals the full ESC attack.