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

ESC6

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


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4886Certificate issuedCriticalCertificate issued from a template where EDITF_ATTRIBUTESUBJECTALTNAME2 is enabled. Review Requester, CertificateTemplate, and SAN values.
Security4887Certificate request approvedMediumManual approvals of suspicious requests containing alternate identities.
Security4768Kerberos TGT requestCriticalESC6 abuse enables authentication via PKINIT using a certificate containing a malicious Subject Alternative Name.
Security4624Successful logonHighCertificate-based authentication events shortly after certificate issuance.
Security4672Special privileges assignedHighPrivileged session following certificate authentication.
Sysmon1Process creationMediumExecution of tools like Certipy, Certify, or Rubeus interacting with ADCS.
Sysmon3Network connectionMediumConnections to CA server or domain controller during exploitation.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Certificate with unusual SANSubject Alternative Name referencing privileged accountsCriticalESC6 allows attacker to supply SAN to impersonate another identity.
Low privilege user requesting certificate with SANStandard user requesting certificate with custom SAN attributesHighMay indicate exploitation of vulnerable template configuration.
PKINIT authentication following enrollmentKerberos TGT request soon after certificate issuanceHighSuggests certificate being used for authentication.
Authentication from unusual hostUser authenticating from workstation not typically associated with accountHighPotential attacker-controlled host.
Immediate privileged activityAdministrative activity after certificate-based authenticationCriticalIndicates certificate abuse leading to privilege escalation.

Common Tools

ToolUsage
CertipyEnumerates and exploits ESC6 certificate template misconfigurations.
CertifyRequests certificates using vulnerable templates.
RubeusRequests Kerberos tickets using certificates via PKINIT.
ForgeCertCreates forged certificates when CA keys are compromised.
CertutilBuilt-in tool used for certificate management and enrollment.

Relevant Artifacts

  • ADCS server Security logs (4886, 4887)
  • Domain controller Security logs (4768, 4624, 4672)
  • Certificate Authority database records
  • Certificate request logs containing SAN attributes
  • Sysmon logs (1, 3)
  • PKINIT authentication logs
  • EDR telemetry identifying certificate abuse tooling
  • Prefetch artifacts showing execution of 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) containing unusual SAN attributes.
  2. What host generated the event?
    • Determine the system submitting the certificate request.
  3. Is the account expected to perform this action?
    • Investigate low privilege accounts requesting certificates containing alternate identities.
  4. Pivot:
    • Source host → inspect execution of Certipy or Certify.
    • Account → verify whether SAN references another user identity.
    • Network → inspect PKINIT authentication events following certificate issuance.
  5. Confirm exploitation
    • Determine whether issued certificate was used to authenticate as another user.

Example Detection Templates

KQL

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

EQL

any where event.code == "4886"

Sigma

title: Suspicious Certificate Enrollment With SAN
id: adcs-esc6-detection
status: experimental
description: Detects suspicious certificate enrollment containing alternate identities
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4886
  condition: selection
fields:
  - Requester
  - CertificateTemplate
falsepositives:
  - Legitimate certificate requests with SAN attributes
level: medium
tags:
  - attack.credential_access
  - attack.t1649

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Template configurationDisable EDITF_ATTRIBUTESUBJECTALTNAME2 where not requiredCriticalPrevents attackers specifying arbitrary SAN values.
Enrollment permissionsRestrict certificate enrollment rightsHighLimits access to vulnerable templates.
Template auditingRegularly audit certificate templates for SAN configurationHighDetects ESC6 exposure.
MonitoringAlert on certificate issuance containing unusual SAN entriesHighEarly detection of exploitation attempts.
PKI hardeningRestrict administrative access to ADCS infrastructureHighReduces risk of certificate abuse.