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

ESC7

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


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security5136Directory object modifiedCriticalESC7 involves modification of CA access control permissions. Review ObjectDN related to Certification Authorities and permission changes.
Security4886Certificate issuedHighCertificate issued after CA permission modification may indicate exploitation.
Security4887Certificate request approvedMediumUnexpected approval of certificate requests shortly after CA ACL modification.
Security4768Kerberos TGT requestHighCertificate obtained through CA permission abuse may be used for PKINIT authentication.
Security4624Successful logonHighCertificate-based authentication events following CA permission modification.
Security4672Special privileges assignedHighPrivileged session established after certificate authentication.
Sysmon1Process creationMediumExecution of tools such as Certipy, Certify, or PowerView to manipulate CA permissions.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
CA ACL modificationChanges to permissions on Certification Authority objectsCriticalCore indicator of ESC7 exploitation path.
Low privilege account granted CA rightsUnexpected delegation of ManageCA or ManageCertificates rightsHighIndicates attacker manipulation of CA permissions.
Certificate issuance shortly after ACL changeCertificates issued immediately following permission modificationCriticalSuggests attacker modified CA ACL then issued certificate.
Authentication using certificateUser authenticating via PKINIT after certificate issuanceHighIndicates certificate-based impersonation.
Privileged activity after authenticationAdministrative actions after certificate logonCriticalAttacker leveraging certificate for escalation.

Common Tools

ToolUsage
CertipyEnumerates and exploits ESC7 by modifying CA permissions.
CertifyRequests certificates after CA permissions are manipulated.
PowerViewModifies Active Directory object ACLs including CA objects.
BloodHound / SharpHoundIdentifies privilege paths allowing CA control.
RubeusRequests Kerberos tickets using issued certificates.

Relevant Artifacts

  • Domain controller Security logs (5136)
  • ADCS server logs (4886, 4887)
  • Certification Authority configuration objects
  • CA security descriptor and ACL changes
  • Sysmon logs (1)
  • PKINIT authentication logs
  • EDR telemetry identifying certificate abuse tooling
  • Prefetch artifacts showing execution of Certipy or PowerView

MITRE ATT&CK References

  • T1649 Steal or Forge Authentication Certificates
  • T1550 Use Alternate Authentication Material
  • T1098 Account Manipulation
  • T1078 Valid Accounts

Decision Tree

  1. Is the suspicious event present?
    • Look for Event 5136 modifying Certification Authority objects.
  2. What host generated the event?
    • Identify workstation performing CA permission changes.
  3. Is the account expected to perform this action?
    • Only PKI administrators normally modify CA ACLs.
  4. Pivot:
    • Source host → inspect execution of Certipy, Certify, or PowerView.
    • Account → verify permission escalation on CA objects.
    • Network → analyze PKINIT authentication events after certificate issuance.
  5. Confirm exploitation
    • Determine whether attacker issued certificate after gaining CA control.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 5136
| where ObjectDN contains "Certification Authorities"
| project TimeGenerated, SubjectUserName, ObjectDN, AttributeLDAPDisplayName
SecurityEvent
| where EventID == 4886
| summarize count() by CertificateTemplate, Requester, bin(TimeGenerated, 10m)

EQL

any where event.code == "5136"

Sigma

title: Suspicious Certification Authority Permission Modification
id: adcs-esc7-detection
status: experimental
description: Detects modification of Certification Authority permissions potentially enabling ESC7 exploitation
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
  condition: selection
fields:
  - SubjectUserName
  - ObjectDN
falsepositives:
  - Legitimate PKI administrative operations
level: high
tags:
  - attack.persistence
  - attack.t1098

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
CA ACL protectionRestrict who can modify Certification Authority permissionsCriticalPrevents attackers gaining CA control.
PKI administration controlUse dedicated PKI admin accountsHighReduces misuse of privileges.
ACL auditingRegularly audit CA security descriptorsHighDetects unauthorized permission changes.
MonitoringAlert on Event 5136 involving CA objectsHighEarly detection of CA tampering.
PKI hardeningRestrict access to ADCS serversHighReduces risk of certificate abuse.