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

ESC3

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


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4886Certificate issuedCriticalCertificate issuance from a template allowing Certificate Request Agent usage may indicate ESC3 abuse. Review CertificateTemplate and Requester.
Security4887Certificate request approvedHighSuspicious approval of certificate requests involving enrollment agent templates.
Security4768Kerberos TGT requestHighCertificate obtained via ESC3 can be used for PKINIT authentication to obtain TGTs.
Security4624Successful logonHighCertificate-based logon events may appear shortly after enrollment agent abuse.
Security4672Special privileges assignedHighPrivileged session established following certificate authentication.
Sysmon1Process creationMediumExecution of certificate exploitation tools such as Certipy, Certify, or Rubeus.
Sysmon3Network connectionMediumConnections from attacker workstation to CA or domain controllers.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Enrollment agent certificate issuedCertificate template allowing Certificate Request Agent EKU issued unexpectedlyCriticalESC3 abuse requires attacker obtaining enrollment agent certificate.
Certificate issued on behalf of another userEnrollment agent requesting certificate for different identityCriticalStrong indicator of impersonation.
Low privilege account requesting agent certificateStandard user requesting high privilege certificate templateHighMay indicate ADCS misconfiguration exploitation.
PKINIT authentication following certificate issuanceKerberos TGT request shortly after certificate enrollmentHighIndicates certificate was used for authentication.
Privileged activity after authenticationAdministrative actions after certificate logonCriticalIndicates attacker leveraging impersonated identity.

Common Tools

ToolUsage
CertipyEnumerates and exploits ESC3 vulnerable templates.
CertifyRequests certificates via vulnerable enrollment agent templates.
RubeusUses certificates to request Kerberos tickets via PKINIT.
ForgeCertUsed when attacker obtains CA private keys.
ImpacketSupports certificate authentication abuse scenarios.

Relevant Artifacts

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

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) involving enrollment agent templates.
  2. What host generated the event?
    • Determine which host requested the certificate from the CA.
  3. Is the account expected to perform this action?
    • Enrollment agent certificates are normally restricted to specific administrative workflows.
  4. Pivot:
    • Source host → inspect execution of Certipy or other ADCS exploitation tools.
    • Account → verify whether certificates were issued for other identities.
    • Network → analyze PKINIT authentication events following certificate issuance.
  5. Confirm exploitation
    • Determine whether attacker used enrollment agent certificate to impersonate other users.

Example Detection Templates

KQL

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

EQL

any where event.code == "4886"

Sigma

title: Suspicious ADCS Enrollment Agent Certificate Issuance
id: adcs-esc3-detection
status: experimental
description: Detects suspicious issuance of enrollment agent certificates potentially indicating ESC3 exploitation
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4886
  condition: selection
fields:
  - CertificateTemplate
  - Requester
falsepositives:
  - Legitimate certificate enrollment workflows
level: medium
tags:
  - attack.credential_access
  - attack.t1649

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Enrollment agent restrictionsLimit which accounts can request enrollment agent certificatesCriticalPrevents impersonation via agent certificates.
Template auditingAudit certificate templates with Certificate Request Agent EKUHighIdentifies ESC3 exposure.
Enrollment permissionsRestrict certificate enrollment rightsHighReduces attack surface.
MonitoringAlert on enrollment agent certificate issuanceHighDetects exploitation attempts.
PKI hardeningRestrict administrative access to ADCS infrastructureHighProtects CA environment.