Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / ACTIVE DIRECTORY / ADCS

ESC9

This note documents detection patterns related to ADCS ESC9 within Active Directory environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4886Certificate issuedCriticalCertificate issued from template missing security extension checks (ESC9). Review CertificateTemplate and SubjectUserName.
Security4887Certificate request approvedMediumUnexpected approvals may accompany exploitation.
Security4768Kerberos TGT requestCriticalCertificate issued via ESC9 may be used through PKINIT authentication shortly after enrollment.
Security4624Successful logonHighCertificate-based authentication after issuance.
Security4672Special privileges assignedHighPrivileged session established after certificate authentication.
Sysmon1Process creationMediumExecution of Certipy, Certify, or Rubeus.
Sysmon3Network connectionMediumConnections to CA server or domain controllers.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Certificate issued without security extension enforcementTemplates missing szOID_NTDS_CA_SECURITY_EXTCriticalESC9 relies on missing security extension validation.
Certificate issued for privileged account by low privilege requesterMismatch between Requester and SubjectUserNameCriticalIndicates impersonation attempt.
PKINIT authentication shortly after issuanceTGT request event after certificate issuanceHighSuggests certificate-based authentication abuse.
Authentication from unusual hostUser authenticating from host not normally usedHighPossible attacker host.
Administrative activity following authenticationACL changes, account modificationsCriticalIndicates escalation using forged certificate.

Common Tools

ToolUsage
CertipyEnumerates and exploits ESC9 certificate template vulnerabilities.
CertifyRequests certificates from vulnerable templates.
RubeusUses issued certificates for PKINIT Kerberos authentication.
ForgeCertUsed if attacker controls CA private key.
ImpacketSupports certificate-based authentication workflows.

Relevant Artifacts

  • Domain controller Security logs (4768, 4624, 4672)
  • ADCS server Security logs (4886, 4887)
  • Certificate Authority database
  • Certificate template configuration
  • Sysmon logs (1, 3)
  • PKINIT authentication telemetry
  • EDR telemetry detecting certificate abuse tools
  • Prefetch artifacts for Certipy or Certify

MITRE ATT&CK References

  • T1649 Steal or Forge Authentication Certificates
  • T1550 Use Alternate Authentication Material
  • T1558 Steal or Forge Kerberos Tickets
  • T1078 Valid Accounts

Decision Tree

  1. Is the suspicious event present?
    • Identify certificate issuance events 4886 from vulnerable templates.
  2. What host generated the event?
    • Determine source system requesting certificate.
  3. Is the account expected to perform this action?
    • Investigate mismatches between Requester and SubjectUserName.
  4. Pivot:
    • Source host → inspect execution of Certipy or Certify.
    • Account → inspect authentication method used after certificate issuance.
    • Network → inspect PKINIT authentication events.
  5. Confirm exploitation
    • Determine whether certificate was used to authenticate to domain services.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4886
| summarize count() by CertificateTemplate, Requester, SubjectUserName, bin(TimeGenerated, 10m)
SecurityEvent
| where EventID == 4768
| summarize count() by TargetUserName, IpAddress, bin(TimeGenerated, 5m)

EQL

any where event.code == "4886"

Sigma

title: Suspicious ADCS Certificate Issuance ESC9
id: adcs-esc9-detection
status: experimental
description: Detects suspicious certificate issuance potentially related to ESC9
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4886
  condition: selection
fields:
  - CertificateTemplate
  - Requester
  - SubjectUserName
falsepositives:
  - Legitimate certificate enrollment
level: medium
tags:
  - attack.credential_access
  - attack.t1649

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Template configurationEnsure security extension enforcement is enabledCriticalPrevents ESC9 abuse.
Enrollment permissionsRestrict certificate enrollment rightsHighLimits template abuse.
Template auditingRegularly review template configurationHighDetects vulnerable templates.
MonitoringAlert on certificate issuance for privileged identitiesHighEarly detection.
PKI hardeningRestrict administrative access to ADCS infrastructureHighReduces certificate abuse risk.