Skip to main content
All articles

PetitPotam and the coercion family: making a domain controller authenticate to you, then relaying it

NTLM relay needs a victim to authenticate. Coercion supplies the victim on demand. What CVE-2021-36942 fixed, why PetitPotam and PrinterBug are a family, and how signing, EPA and RPC filters break the chain.

By Published

8 min read36 views

An NTLM relay attack has always had one inconvenient prerequisite: someone has to authenticate. The attacker sits in the middle, catches an NTLM authentication meant for one server, and forwards it to a different server that accepts it, ending up authenticated as the victim without ever knowing a password. The classic problem was patience. You waited for a credential to walk past.

Coercion removed the waiting. The one distinction that defines this whole family of techniques: a low-privileged attacker can make a chosen Windows machine, including a domain controller, authenticate to an arbitrary host on demand, by invoking a remote procedure call that was designed to trigger authentication as a side effect. PetitPotam is the best-known member. Once you can summon a domain controller's machine-account authentication whenever you like, relay stops being opportunistic and becomes a tool you point.

Why the impact varies: relay only matters where the target accepts it

Coercion produces an authentication. Whether that authentication becomes a compromise depends entirely on where you can relay it and whether that endpoint defends itself. The severity is set by the target, not the trigger:

  • Relay to LDAP on a domain controller without channel binding or signing enforced, and you can act as the coerced machine in the directory. Relay a domain controller's own account and the consequences are severe.
  • Relay to AD CS web enrolment (Certificate Authority Web Enrollment or the Certificate Enrollment Web Service) that lacks Extended Protection for Authentication, and you can obtain a certificate for the coerced machine, which is a durable credential. This is the PetitPotam-to-AD-CS chain that made the technique famous, and it connects directly to the certificate abuse covered in the ESC1 post.
  • Relay to SMB on a host that does not require signing, and you get authenticated file-system or service access as the victim.

The same coerced authentication is harmless against a signing-required, EPA-enforced target and catastrophic against one that accepts it unprotected. That is the whole reason the mitigations below are about the receiving end, not the trigger.

The CVE that anchors it, and why it did not end the technique

The primary anchor is CVE-2021-36942, the Windows LSA Spoofing Vulnerability, published 2021-08-11 and rated CVSS 3.1 7.5 (High) by NVD. It was added to the CISA Known Exploited Vulnerabilities catalog on 2021-11-03. The August 2021 update blocked the specific LsarpcRemote call path that the original PetitPotam proof of concept used to coerce authentication over the MS-EFSR (Encrypting File System Remote) protocol.

The instructive part is that CVE-2021-36942 did not close coercion. It closed one function in one interface. CERT/CC's vulnerability note VU#405600 documents the wider problem: the technique class survives because coercion is a property of several protocols, not one bug. PetitPotam abuses MS-EFSR. The older "PrinterBug" abuses the Print System Remote Protocol (MS-RPRN) through RpcRemoteFindFirstPrinterChangeNotificationEx. Others use different RPC interfaces. Patching one function moves the attacker to the next interface. This is why the defensive centre of gravity has to be the relay target, not a single KB.

A second CVE worth knowing in the same breath is CVE-2019-1040, a tampering vulnerability in NTLM message integrity, published 2019-06-12 and rated CVSS 3.1 5.3 (Medium). It let an attacker strip the NTLM MIC (Message Integrity Check) protection, which is what made many cross-protocol relays practical in the first place. Together the two CVEs show the shape of the problem: coercion supplies the authentication, MIC weaknesses and missing target-side protections let it be relayed.

A lab you can build without Docker

The mechanics need a domain and at least two Windows hosts so you can see one machine authenticate to another.

  • Stand up a domain controller from a Windows Server 2022 evaluation ISO or VHD (180 days) and promote it with Install-ADDSForest.
  • Add a second Windows Server evaluation VM as a member server, and optionally install the AD CS role with web enrolment so you can see the certificate-relay target that PetitPotam is aimed at.
  • Add one Windows client so you have a low-privileged user to work from.

What you are trying to observe is not an exploit run. It is the network and log signature of a machine account authenticating outbound to a host it has no business talking to, and the difference an SMB-signing-required or EPA-required target makes to whether that authentication is accepted. Public coercion tools exist and are documented; this post does not reproduce them, in keeping with the house line about not shipping a working weapon. You can generate the same "machine authenticates outbound" signal for detection tuning with ordinary administrative actions.

Finding the exposure in your own configuration

The audit is entirely about the receiving end. Three questions, each mapping to a real setting.

Does LDAP on your domain controllers require signing and channel binding? Without it, a relayed authentication to LDAP is accepted. Check the relevant policies (Domain controller: LDAP server signing requirements and LDAP channel binding) and the operational logs that report unsigned or unbound binds.

Does AD CS web enrolment require EPA and SSL? This is the PetitPotam-to-certificate target. Microsoft's KB5005413 is the checklist: enable Extended Protection for Authentication set to Required on both the Certificate Authority Web Enrollment and the Certificate Enrollment Web Service, add the <extendedProtectionPolicy> settings to the relevant web.config, and require SSL so HTTP enrolment is off.

Does SMB require signing everywhere it can? By default, domain controllers require SMB signing for SYSVOL and NETLOGON, but member servers frequently do not require it broadly. Where signing is not required, a relayed SMB authentication is accepted.

# Is the SMB server requiring signing on this host?
Get-SmbServerConfiguration | Select-Object RequireSecuritySignature, EnableSecuritySignature

# Is the SMB client requiring signing on its outbound connections?
Get-SmbClientConfiguration | Select-Object RequireSecuritySignature

Where RequireSecuritySignature is False, that host accepts unsigned SMB and is a viable relay target. Note that SMB signing is controlled by the "required" setting alone on SMB2 and later; the older EnableSecuritySignature value is ignored.

Fixing it: defend the target and strangle the trigger

The mitigations divide cleanly into "make relayed authentications useless" and "make coercion harder," and the first group carries most of the weight.

Require signing and channel binding on the targets that matter. Enforce SMB signing broadly, not just on domain controllers. Enforce LDAP signing and LDAP channel binding on domain controllers. A signed, channel-bound authentication cannot be relayed to a different endpoint, which neutralises the whole class regardless of which coercion protocol delivered it.

Enforce EPA and SSL on AD CS web enrolment, per KB5005413. This specifically closes the PetitPotam-to-certificate chain that is the highest-value version of the attack.

Reduce NTLM. The Network Security: Restrict NTLM: Incoming NTLM traffic policy lets you deny NTLM to servers that should only speak Kerberos, with an audit mode to measure impact first. Microsoft has publicly committed to disabling NTLM by default in future Windows, and is adding IAKerb and a local KDC to remove the legacy scenarios that keep NTLM alive, so moving off NTLM now is moving with the platform rather than against it.

Blunt the coercion protocols where you can. RPC filters can block the EFSRPC interface that PetitPotam abuses, and the Print Spooler service can be disabled on machines that do not need to print, which removes the MS-RPRN PrinterBug trigger. These reduce the trigger surface but do not substitute for defending the target, because there is always another interface.

Put domain controller and other privileged machine accounts out of reach of delegation so that a coerced-then-relayed authentication cannot be parlayed into delegation abuse. Delegation settings are what turn a coerced authentication into a reusable identity, so they deserve a review of their own.

Detecting it

Coercion and relay leave two kinds of trace: the outbound authentication that should not exist, and the relayed inbound authentication arriving from the wrong place.

  • A machine account authenticating to an unexpected host. A domain controller's machine account opening an SMB or RPC session to a random workstation is not normal. Baseline where your privileged machine accounts legitimately authenticate, and alert on outbound machine-account authentication to anything outside that set.
  • NTLM authentications on paths that should be Kerberos. The NTLM operational log (under Applications and Services Logs, Microsoft, Windows, NTLM), enabled through the Restrict NTLM audit policies, shows where NTLM is still in use. A relayed authentication is an NTLM authentication, often to a service you expected to be Kerberos-only.
  • Unsigned or unbound LDAP binds reported by the domain controller, which indicate both misconfigured clients and potential relay targets.
  • Certificate enrolment for a machine account from an unexpected source, correlated against the AD CS logs, catches the tail end of the PetitPotam-to-certificate chain even if the coercion itself was missed.

What to take away

Coercion techniques like PetitPotam did not invent NTLM relay. They removed its only inconvenience by letting an attacker summon the victim, including a domain controller, on demand. CVE-2021-36942 closed one coercion function, which is useful and insufficient, because coercion is spread across several protocols and patching one moves the attacker to the next. The durable fix lives on the receiving end: require SMB signing everywhere, require LDAP signing and channel binding on domain controllers, enforce EPA and SSL on AD CS web enrolment, and reduce NTLM until you can retire it. Make the relayed authentication worthless and it does not matter how easily the attacker can produce one.

Further reading

Was this useful?

Share

Tags

  • active directory
  • detection engineering
  • secure code review
  • penetration testing

Get the next write-up by email

New technical write-ups by email when we publish. No sales sequence, and every email has an unsubscribe link.

Prefer a feed? RSS. How we handle your address: privacy notice.

Comments

Loading comments…

Leave a comment

Comments are read and approved by hand before they appear, so yours will not show up straight away. Your email address is optional, is never published, and is only used if we need to reply to you directly.

0/5000

Related service

Internal & External Penetration Testing

Find the paths into your network, and the paths across it once someone is in.

If you want to know whether what you have just read applies to your own systems, that is the engagement that answers it.