# Unit 42 Deep Dive: Advanced AD CS Exploitation — Certificate Template Misuse (ESC1) and Shadow Credentials via msDS-KeyCredentialLink (CVE-2022-26923, Fog Ransomware, Fighting Ursa)

> Unit 42 (Palo Alto Networks) published a comprehensive technical deep-dive cataloguing Active Directory Certificate Services (AD CS) abuse techniques including ESC1 certificate template misconfigurations and Shadow Credential / Key Trust attacks via the msDS-KeyCredentialLink attribute (CVE-2022-26923). The research confirms active exploitation by Fog ransomware affiliates (DFIR Report telemetry) and Russian GRU-linked Fighting Ursa (APT28 / Forest Blizzard), enabled by mature open-source tooling (Certify, Certipy supporting ESC1–ESC16, Whisker, pyWhisker, PKINITtools). AD CS abuse converts a single low-privilege foothold into full domain compromise with minimal native detection coverage.

- **Published:** 2026-05-11T12:00:00Z
- **Last reviewed:** 2026-05-11T12:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-0497
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-ad-cs-esc1-shadow-credentials-tl-2026-0497.webp?v=d6d171de (Threadlinqs threat intel: CVE-2022-26923 AD CS ESC1 Abuse: Analysis & Hunting (TL-2026-0497) — High severity, 22 IOCs, 9 detection rules.)
- **ID:** TL-2026-0497
- **Severity:** HIGH (CVSS 8.8)
- **Category:** VULNERABILITY
- **Status:** ACTIVE
- **Actor:** APT28 (Russia)
- **Detections:** 9 (1 shown free below) · **IOCs:** 22
- **CVEs:** CVE-2022-26923

## Description

Unit 42's May 2026 publication consolidates four years of AD CS attack research into a single operational reference for defenders, documenting how attackers exploit certificate-based authentication to achieve domain dominance. The article focuses on two primary attack classes — Certificate Template Misconfigurations (the SpecterOps ESC1–ESC16 taxonomy from Schroeder and Christensen's 2021 'Certified Pre-Owned' whitepaper) and Shadow Credentials / Key Trust abuse — and confirms both vectors are in active use by financially-motivated ransomware crews and state-sponsored intrusion sets.
ESC1 (the canonical certificate template misconfiguration) requires a template that (a) permits client authentication EKUs, (b) allows the requester to supply the Subject Alternative Name (msPKI-Certificate-Name-Flag = ENROLLEE_SUPPLIES_SUBJECT / CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT 0x1), (c) does not require manager approval, and (d) is published on an Enterprise CA with broad enrollment rights. An attacker with enrollment rights requests a certificate while setting the SAN to a high-privilege UPN (e.g. Domain Admin or krbtgt), then uses PKINITtools / Rubeus to perform PKINIT authentication with the resulting certificate, receiving a TGT as the impersonated principal. Certify (.NET) and Certipy (Python) are the de facto offensive tooling — Certipy 4.x supports ESC1 through ESC16 enumeration and exploitation in a single binary.
Shadow Credentials abuse the msDS-KeyCredentialLink attribute introduced for Windows Hello for Business Key Trust. Any principal with GenericWrite or GenericAll over a target object (user or computer) can write a self-generated public key into the target's msDS-KeyCredentialLink, then authenticate as that target via PKINIT — effectively persistent credential theft without a password reset and without triggering DCSync. The Whisker (.NET) and pyWhisker tools automate the attack chain.
CVE-2022-26923 ('Certifried', disclosed by Oliver Lyak / IFsec Labs and patched May 2022) is the underlying domain controller validation flaw that elevated these primitives to full domain compromise. Prior to KB5014754, certificate-based authentication mapped UPN/dNSHostName from the certificate to an AD object without strong binding — an authenticated user who controlled a computer account (default MachineAccountQuota = 10 in most domains) could set its dNSHostName to that of a domain controller, request a certificate via the default Machine template, and authenticate as the DC. The fix introduced strong certificate mapping via the SID security extension (szOID_NTDS_CA_SECURITY_EXT) and Full Enforcement Mode enabled by default in February 2025 (KB5014754 timeline).
Active exploitation has been documented across the threat landscape. The DFIR Report's Fog ransomware case studies (2024–2025) detail post-compromise tradecraft where affiliates pivot from initial access (often SonicWall SSL VPN CVE-2024-40766 or Veeam CVE-2024-40711) into Certipy enumeration, identify a vulnerable ESC1 template, mint a certificate as Domain Admin, perform DCSync, and deploy Fog ransomware. Rapid7's August 2024 IR engagement (referenced by Unit 42) documented a social-engineering campaign delivering update6.exe — a wrapper that attempted CVE-2022-26923 exploitation against unpatched domains. Palo Alto attributes parallel AD CS abuse to Fighting Ursa (overlapping with Microsoft's Forest Blizzard and CrowdStrike's Fancy Bear — GRU Unit 26165 / APT28), targeting government, defense, and energy verticals in Europe and North America.
Detection is constrained because the underlying Windows events (4768 TGT request, 4886 certificate issuance, 4887 CA certificate request approved) are high-volume and lack native correlation with anomalous SANs or KeyCredentialLink modifications. Defenders should baseline 4886/4887 by template, alert on issuance of certificates with mismatched SAN UPNs, monitor msDS-KeyCredentialLink writes (4662 with the appropriate property GUID 5b47d60f-6090-40b2-9f37-2a4de88f3063), and enforce KB5014754 Full Enforcement Mode. Microsoft's StrongCertificateBindingEnforcement registry key under HKLM\SYSTEM\CurrentControlSet\Services\Kdc must be set to 2 (Full Enforcement).

## MITRE ATT&CK

- T1078 Valid Accounts
- T1190 Exploit Public-Facing Application
- T1059 Command and Scripting Interpreter
- T1098 Account Manipulation
- T1136 Create Account
- T1068 Exploitation for Privilege Escalation
- T1550 Use Alternate Authentication Material
- T1553 Subvert Trust Controls
- T1649 Steal or Forge Authentication Certificates
- T1558 Steal or Forge Kerberos Tickets
- T1003 OS Credential Dumping
- T1606 Forge Web Credentials
- T1482 Domain Trust Discovery
- T1087 Account Discovery
- T1069 Permission Groups Discovery
- T1021 Remote Services
- T1213 Data from Information Repositories
- T1486 Data Encrypted for Impact

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**AD CS ESC1 - Certificate Issuance With Attacker-Supplied SAN UPN (SPL)** (`TL-2026-0497-SPL-001`)

Detects canonical ESC1 abuse on an Enterprise CA: a certificate request/issuance event (Windows Security 4886 received / 4887 approved) where the requesting principal's account name does not match the UPN supplied in the certificate Subject Alternative Name. This is the exploitation-phase signal that an attacker with enrollment rights on a vulnerable template (ENROLLEE_SUPPLIES_SUBJECT + Client Authentication EKU + no manager approval) is minting a certificate as a high-privilege impersonation target such as Domain Admin or krbtgt.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1649, T1078.002, T1068
- **Data sources:** windows_security, adcs_audit, splunk_ms_windows
- **Severity:** high
- **Confidence:** high

### Splunk SPL

```spl
index=wineventlog sourcetype="WinEventLog:Security" (EventCode=4886 OR EventCode=4887) host=*CA* earliest=-24h
| rex field=Message "Requester:\s+(?<requester>[^\r\n]+)"
| rex field=Message "Subject:\s+[^\r\n]*?CN=(?<subject_cn>[^,\r\n]+)"
| rex field=Message "Attributes:[\s\S]*?upn=(?<san_upn>[^&\r\n\s]+)"
| rex field=Message "Certificate Template:\s+(?<template>[^\r\n]+)"
| eval requester_sam=mvindex(split(requester,"\\\\"),-1)
| eval requester_user=lower(mvindex(split(requester_sam,"@"),0))
| eval san_user=lower(mvindex(split(san_upn,"@"),0))
| where isnotnull(san_upn) AND requester_user!=san_user
| eval risk="ESC1 SAN spoof - requester=".requester_user." san_upn=".san_upn
| stats count min(_time) as first_seen max(_time) as last_seen values(template) as templates values(host) as ca_hosts by requester, san_upn, risk
| where count>=1
```

### Microsoft KQL

```kql
// Reference KQL for the same hunt (Microsoft Sentinel SecurityEvent on CA forwarders)
SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID in (4886, 4887)
| extend Requester = tostring(extract(@"Requester:\s+([^\r\n]+)", 1, EventData))
| extend SanUpn   = tolower(tostring(extract(@"upn=([^&\r\n\s]+)", 1, EventData)))
| extend Template = tostring(extract(@"Certificate Template:\s+([^\r\n]+)", 1, EventData))
| extend RequesterUser = tolower(extract(@"\\([^@\s]+)", 1, Requester))
| extend SanUser = tolower(extract(@"([^@\s]+)", 1, SanUpn))
| where isnotempty(SanUpn) and RequesterUser != SanUser
| project TimeGenerated, Computer, Requester, SanUpn, Template, EventID
```

### Sigma

```yaml
title: AD CS ESC1 - Certificate Issuance With Attacker-Supplied SAN UPN
id: 2c30ef74-0497-4c01-8a51-1aa90b97f001
status: experimental
description: Detects ESC1 abuse where an Enterprise CA issues (or receives a request for) a certificate whose Subject Alternative Name UPN does not match the requesting principal. Canonical Certipy/Certify SAN spoofing pattern producing certificates usable for PKINIT TGT impersonation.
references:
  - https://unit42.paloaltonetworks.com/active-directory-certificate-services-exploitation/
  - https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf
  - https://attack.mitre.org/techniques/T1649/
author: Threadlinqs Team
date: 2026/05/11
tags:
  - attack.credential_access
  - attack.t1649
  - attack.t1078.002
  - cve.2022.26923
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID:
      - 4886
      - 4887
  filter_match:
    Requester|contains: SubjectAltName
  condition: selection and not filter_match
fields:
  - Requester
  - SubjectAltName
  - CertificateTemplate
  - SerialNumber
falsepositives:
  - Helpdesk or PKI operators legitimately enrolling certificates on behalf of other users via the Enrollment Agent template
  - Automated joiner/mover workflows that enrol certificates with delegated SANs
level: high
```

**Known false positives:**

- Enrollment Agent template usage where helpdesk staff legitimately request certificates on behalf of other users
- Automated identity-lifecycle tooling that enrolls SAN UPNs different from the service account performing the request
- Smartcard rollout workflows in environments using Enroll-on-Behalf-Of (EOBO)

**Tuning notes:** Exclude approved Enrollment Agents (members of the Enroll-on-Behalf-Of group) from the requester field. Restrict matches to templates with Client Authentication EKU (1.3.6.1.5.5.7.3.2) or Smartcard Logon EKU (1.3.6.1.4.1.311.20.2.2). Raise severity to critical when the SAN UPN resolves to a Tier 0 account (Domain Admins, Enterprise Admins, krbtgt) or a domain controller computer object. Baseline 4886/4887 volume per template for 14 days before alerting to suppress legitimate bulk renewal noise.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- AD CS ESC1 - Certificate Request With Spoofed SAN UPN (KQL) (locked: unlock with TL Creds)
- Shadow Credentials - msDS-KeyCredentialLink LDAP Write (KQL) (locked: unlock with TL Creds)
- Suspicious PKINIT TGT Issuance - DeviceLogonEvents Correlation (KQL) (locked: unlock with TL Creds)
- Sigma - AD CS ESC1 Native LOLBIN Certificate Submission (certreq/certutil) (locked: unlock with TL Creds)
- Sigma - Shadow Credentials Tooling Process (Whisker / pyWhisker / [indicator] shadow) (locked: unlock with TL Creds)
- Sigma - Suspicious Computer Account Creation By Non-Helpdesk User (MAQ Abuse Precursor) (locked: unlock with TL Creds)
- Shadow Credentials - msDS-KeyCredentialLink Write by Non-Tier-0 Principal (SPL) (locked: unlock with TL Creds)
- PKINIT TGT Issued With Certificate For Account Lacking WHfB/Smartcard (SPL) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [Inside AD CS Escalation: Unpacking Advanced Misuse Techniques and Tools (Unit 42)](https://unit42.paloaltonetworks.com/active-directory-certificate-services-exploitation/)
- [Certified Pre-Owned: Abusing Active Directory Certificate Services (SpecterOps)](https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf)
- [MSRC CVE-2022-26923 Security Advisory](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-26923)
- [CISA Known Exploited Vulnerabilities — CVE-2022-26923](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-26923)
- [NVD CVE-2022-26923](https://nvd.nist.gov/vuln/detail/CVE-2022-26923)
- [Certipy — AD CS Enumeration and Abuse Tool](https://github.com/ly4k/Certipy)
- [Certify — .NET AD CS Tool (GhostPack)](https://github.com/GhostPack/Certify)
- [Whisker — Shadow Credentials Tool (Eladshamir)](https://github.com/eladshamir/Whisker)
- [pyWhisker — Python Shadow Credentials](https://github.com/ShutdownRepo/pywhisker)
- [PKINITtools — Linux PKINIT Implementation (dirkjanm)](https://github.com/dirkjanm/PKINITtools)
- [The DFIR Report: Fog Ransomware Cases (AD CS Abuse Chains)](https://thedfirreport.com/category/ransomware/)
- [Rapid7 IR Disclosure: update6.exe Social Engineering Campaign Targeting CVE-2022-26923](https://www.rapid7.com/blog/post/2024/08/)
- [KB5014754 — Certificate-based authentication changes on Windows domain controllers](https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16)
- [MITRE ATT&CK T1649 Steal or Forge Authentication Certificates](https://attack.mitre.org/techniques/T1649/)
- [Locksmith — AD CS Defensive Audit Tool](https://github.com/TrimarcJake/Locksmith)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-0497
