Lesson 6 of 13 · 18m
NTLM Relay: Coercion to Takeover
How relay chains turn any authenticated session into LDAP writes and ADCS enrollments — the mechanism behind ntlmrelayx, and the signing controls that break it.
NTLM relay is the attack that makes "we still need NTLM for legacy apps" an incident waiting to happen. The attacker never learns the victim's password. Instead they sit between an authentication and its intended destination, pass the challenge to a server of their choosing, and forward the response. The protocol authenticates the user — nothing in NTLMv2 binds the authentication to the server the user meant. That gap is the entire attack surface.
The chain, end to end
A working relay has three parts:
- Coercion — make a target authenticate to you. The toolbox is deep:
PetitPotam'sEfsRpcOpenFileRaw(MS-EFSRPC, patched Aug 2021 but still found), the printer bug (RpcRemoteFindFirstPrinterChangeNotificationon MS-RPRN — still unpatched on default installs),WebClientUNC paths in documents or.urlfiles, andResponderpoisoning LLMNR/NBT-NS/mDNS queries that fall back to a rogue answer. - Relay —
ntlmrelayx.py -t ldap://dc01 --escalate-userforwards the authentication. The choice of target determines impact: SMB signing-required shares reject relayed sessions; LDAP accepts them and gives you directory writes; ADCS web enrollment (/certsrv/) hands out certificates — that chain is ESC8. - Action on the session — write
msDS-AllowedToActOnBehalfOfOtherIdentityfor RBCD abuse, add a computer account, enroll a certificate as the relayed machine, dump an admin's NTLM challenge for cracking.
The classic kill chain in real networks: coerce the DC's machine account via printer bug, relay to LDAP, grant RBCD on the DC to an attacker-controlled computer, then S4U request ldap/dc01 as Administrator. DCSync from a workstation. Total prerequisites: NTLM fallback enabled, LDAP signing not required, WebClient or spooler running.
Why signing is the control, not "block NTLM"
SMB signing (RequireSecuritySignature) signs each packet with the session key — a relayed attacker holds the authentication but cannot sign subsequent packets. LDAP signing does the same for LDAP. EPA (channel binding) binds the auth to the TLS session for HTTPS targets like ADCS. Microsoft flipped Exchange to require EPA in 2019 and has been pushing LDAP signing defaults since the 2020 ADV190023 advisory finally enforced them.
The wrong mental model: "relay is fixed because my endpoints have AV." Relay happens at the protocol layer; the attacker's tooling is ntlmrelayx on a Kali box or a compromised member server — nothing touches the endpoint AV.
Evidence it still burns
Every SpecterOps relay writeup keeps finding the same stack: spooler enabled on DCs, LDAP signing optional, WebClient running on workstations. Microsoft patched PetitPotam's specific vector and the ecosystem just moved to MS-RPRN and ShadowCoerce (MS-FSRVP) — the coercion RPC surface is broad and only partially patched.
Break the chain at three points
- SMB signing required on all servers (default on DCs since Server 2025 preview; check
RequireSecuritySignatureeverywhere else). - LDAP signing + channel binding enforced (
LDAPServerIntegrity = 2underHKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters— the "Domain controller: LDAP server signing requirements" GPO — plus EPA on IIS for/certsrv). - Kill the coercion surface: disable
WebClienton workstations via GPO, disable Print Spooler on DCs and non-print servers, audit LLMNR/NBT-NS (disable both via GPO), and block RPC to MS-EFSR/MS-RPRN from non-admin subnets. - Audit mode first:
Restrict NTLM: Audit+ LDAP signing in "signing requested" mode for 30 days; inventory what breaks, then enforce.
Relay lives in the gap between "NTLM still on" and "signing not required." Close the second gap and the first stops mattering. Then prove it: stand up ntlmrelayx in a lab segment, trigger a printer bug against a test host, and watch the LDAP write succeed or fail. Estates that have never run the attack themselves are usually surprised by which target actually accepts the relay — it is almost never the one they hardened first.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
A Password-Free Path to Root: Inside the macOS Screen Sharing Vulnerability Now Under Attack
A logic bug in screensharingd let attackers skip authentication entirely and land as root — no password required. Here's how it was found, patched, reverse-engineered, and finally weaponized.
CVE-2026-31431 "Copy Fail": How a 9-Year-Old Linux Kernel Bug Gives Any Local User Root in 732 Bytes
CVE-2026-31431 chains AF_ALG, splice(), and authencesn's ESN scratch write into a deterministic 4-byte page cache write that gives an unprivileged local user root. Full technical breakdown, exploit mechanics, detection, mitigation, and patch status per distro.
BlueHammer: The Unpatched Windows Zero-Day That Weaponizes Microsoft Defender Against Your Own System
BlueHammer is an unpatched, publicly released Windows local privilege escalation exploit that chains Microsoft Defender's update workflow, Volume Shadow Copy, Cloud Files callbacks, and opportunistic locks to reach NT AUTHORITY\SYSTEM from a standard user account.
What is Privilege Escalation? How Attackers Go From Foothold to Full Control
An attacker starts with a low-privileged shell or user account and escalates to root or Administrator using misconfigurations, SUID binaries, kernel exploits, and Active Directory attacks. Here's every technique, the tools professionals use, and how to harden against it.