Skip to main content

Microsoft ADCS Abuse Detection

Detect six Active Directory Certificate Services abuse techniques through forensic evidence.

Task 1: Introduction

Task 2: AD CS Architecture and Evidence Sources

Task 3: PKINIT and the KB5014754 Enforcement Model

Task 4: Certificate Template Access-Control Abuse (ESC4)

Task 5: Certificate Template Abuse (ESC1)

Task 6: Enrollment Agent Abuse (ESC2 and ESC3)

Task 7: CA Configuration Sabotage (ESC16)

Task 8: Certificate Theft and Private Keys

Task 9: Golden Certificates

Task 10: Scoping, Containment, and Remediation

Task 11: Conclusion

Back to all walkthroughs
Room Icon

Microsoft ADCS Abuse Detection

Max room.

Detect six Active Directory Certificate Services abuse techniques through forensic evidence.

hard

210 min

32

User profile photo.
User profile photo.

To access material, start machines and answer questions login.

Most incident response relies on one assumption: take away the attacker's access and the intrusion is over. Reset the passwords, rotate krbtgt, disable the accounts, and their tickets and hashes stop working. A certificate breaks that assumption. Once Active Directory Certificate Services issues one, or an attacker forges one from the CA's own key, it keeps authenticating on its own terms until it expires or the authority that signed it is de-commissioned. No password reset touches it. Neither does a krbtgt rotation.

The organization we will be investigating in this room spotted a compromise, reset every password, rotated krbtgt, and called it contained. The next morning the attacker logged in again as a Domain Admin, with no failed logons, no odd source address, and no malware on any endpoint.

Across the room we'll rebuild the certificate techniques behind that intrusion from evidence pulled off the CA, the domain controller, and a Marketing workstation. The primary ATT&CK mapping is T1649, Steal or Forge Authentication Certificates.

Learning Objectives

  • Identify which AD CS component holds which evidence, and why a DC-only collection misses the issuance record.
  • Read the CA database and the DC's Kerberos events, and join them by certificate serial.
  • Tell template abuse (ESC1), template-permission abuse (ESC4), enrollment-agent abuse (ESC3), CA sabotage (ESC16), theft, and forgery apart from their artifacts.
  • Recover a change, a theft, or a forgery when the audit events were never enabled.
  • Sequence containment and eviction for a credential that outlives a password reset.

Prerequisites

  • Kerberos and PKINIT: How Kerberos authentication works and how a certificate stands in for a password at pre-authentication (Kerberos tickets room)
  • Certificate and ticket forgery: How a stolen key or a forged certificate becomes valid authentication material (Ticket forgery attacks room)
  • Windows event logs: Reading Security and System events and parsing their XML with Get-WinEvent (Windows Event Logs room)
  • Memory forensics: Recovering process command lines from a memory image with Volatility 3 (Volatility3 room)
  • ATT&CK: Reading a technique and sub-technique ID

Machine Access

Two machines are attached to this room. The IR-Storage machine holds the triage the response team collected, and the DefenseBox is your analysis workstation, with the DFIR toolkit already installed.

Set up your virtual environment

To successfully complete this room, you'll need to set up your virtual environment. This involves starting both your DefenseBox and Lab Machines, ensuring you're equipped with the necessary tools and access to tackle the challenges ahead.
Defender machine
Status:Off
Lab machine
Status:Off

DefenseBox Credentials

Use these credentials if you are connecting using RDP

Username
 
DFIRUser
 
Password
 
Secure!
 
IP address
 
CONNECTION_IP
 

IR-Storage Credentials

Use these credentials if you are connecting via RDP or when using the net use command

Username
 
Administrator
 
Password
 
Secure!
 
IP address
 
MACHINE_IP

Getting the Evidence

Start the machine above and log in. The acquired collection sits in the Artifacts folder on the Desktop, at C:\Users\Administrator\Desktop\Artifacts. Inside it are three folders: CA-Audited (the full collection) and CA-Dark (the same evidence with the audit-gated Tier 2 logs withheld, the more common real-world case), plus WS-Memory (the workstation memory image); each host's triage sits under CA-Audited and CA-Dark, and Task 2 explains what each posture can and cannot show.

Note: For brevity, the commands throughout this room reference the evidence at C:\Artifacts\.... On the machine the files live under C:\Users\Administrator\Desktop\Artifacts\..., so adjust each command's path to that location, or copy the Artifacts folder to C:\Artifacts and run the commands as written.