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

ESC8

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


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4886Certificate issuedCriticalESC8 involves NTLM relay to ADCS HTTP enrollment endpoints. Review Requester, CertificateTemplate, and SubjectUserName.
Security4887Certificate request approvedMediumApproval of certificate request via web enrollment endpoint.
Security4768Kerberos TGT requestHighCertificate obtained via relay is typically used via PKINIT immediately after issuance.
Security4624Successful logonHighCertificate-based logon after enrollment may indicate successful abuse.
Security4672Special privileges assignedHighPrivileged session established following certificate authentication.
Sysmon3Network connectionCriticalConnections from attacker relay host to ADCS HTTP endpoints (certsrv).
Sysmon1Process creationMediumExecution of ntlmrelayx, Certipy relay module, or similar tools.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
NTLM authentication to ADCS web endpointRequests to /certsrv/ with NTLM authenticationCriticalESC8 relies on NTLM relay to HTTP enrollment endpoint.
Authentication coercion preceding requestPrinterBug, PetitPotam, DFSCoerceCriticalThese attacks force machine authentication to attacker relay host.
Certificate issued to machine account unexpectedlyMachine account requesting authentication certificateHighOften occurs during relay exploitation.
Certificate issuance from unusual source hostEnrollment requests from workstation not typically interacting with CAHighIndicates attacker-controlled relay host.
Privileged activity after certificate authenticationAdministrative actions following certificate logonCriticalAttacker leveraging certificate obtained via relay.

Common Tools

ToolUsage
CertipySupports NTLM relay to ADCS enrollment endpoints.
ntlmrelayxImpacket tool used to relay NTLM authentication to HTTP ADCS endpoint.
PetitPotamCoerces machine authentication to attacker relay host.
PrinterBugTriggers authentication to attacker-controlled system.
CoercerFramework automating coercion attacks.

Relevant Artifacts

  • Domain controller Security logs (4768, 4624)
  • ADCS server logs (4886, 4887)
  • IIS logs on Certificate Authority server
  • HTTP enrollment endpoint logs (/certsrv/)
  • Sysmon logs (1, 3)
  • Network telemetry showing NTLM relay behavior
  • EDR telemetry identifying relay tooling
  • Prefetch artifacts showing ntlmrelayx or Certipy execution

MITRE ATT&CK References

  • T1557 Adversary-in-the-Middle
  • T1557.001 NTLM Relay
  • T1649 Steal or Forge Authentication Certificates
  • T1550 Use Alternate Authentication Material

Decision Tree

  1. Is the suspicious event present?
    • Identify certificate issuance events 4886 via web enrollment.
  2. What host generated the event?
    • Inspect IIS logs for source IP interacting with /certsrv/.
  3. Is the account expected to perform this action?
    • Machine accounts rarely request authentication certificates.
  4. Pivot:
    • Source host → inspect execution of ntlmrelayx or Certipy.
    • Account → verify authentication pattern and privileges.
    • Network → inspect coercion activity preceding certificate issuance.
  5. Confirm exploitation
    • Determine whether certificate was used for PKINIT authentication.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4886
| project TimeGenerated, Requester, CertificateTemplate, SubjectUserName
SecurityEvent
| where EventID == 4624 and LogonType == 3
| project TimeGenerated, TargetUserName, IpAddress

EQL

any where event.code == "4886"

Sigma

title: Suspicious Certificate Enrollment via Web Endpoint
id: adcs-esc8-detection
status: experimental
description: Detects certificate enrollment events potentially related to NTLM relay to ADCS
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4886
  condition: selection
fields:
  - Requester
  - CertificateTemplate
falsepositives:
  - Legitimate web-based certificate enrollment
level: medium
tags:
  - attack.credential_access
  - attack.t1557

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Disable HTTP enrollmentDisable /certsrv/ web enrollment endpointCriticalRemoves relay target entirely.
Require HTTPS with EPAEnable Extended Protection for AuthenticationHighPrevents NTLM relay to IIS endpoints.
SMB signing and NTLM protectionsEnforce NTLM relay protectionsHighReduces ability to relay credentials.
MonitoringAlert on certificate issuance from web enrollmentHighDetects relay attempts.
Network controlsRestrict access to CA web interfaceMediumLimits exposure of enrollment endpoint.