The Power of Coercion Techniques in Windows Environments

Martin Grottenthaler (Security Consultant · SBA Research)

TROOPERS23 · Day 1 · Active Directory & Azure Security · Active Directory & Azure Security

Overview

This article delves into the persistent and often underestimated threat of coercion techniques within Windows Active Directory environments, as presented by Martin Grottenthaler at TROOPERS. The talk highlights how attackers can force Windows machines, particularly domain controllers, to authenticate to arbitrary servers, leading to severe compromise, including full domain takeover. Grottenthaler, a penetration tester with SBA Research, emphasizes that despite years of public disclosure and supposed "patches," these techniques remain highly effective in real-world scenarios due to prevalent misconfigurations and the inherent nature of Windows protocols.

Watch on YouTube · Slides

Visual summary for The Power of Coercion Techniques in Windows Environments by Martin Grottenthaler
Visual summary for The Power of Coercion Techniques in Windows Environments by Martin Grottenthaler

Key moments

  1. 0:00 Introduction and Agenda: The Power of Coercion
  2. 2:30 What is Coercion? Forcing a machine to connect.
  3. 7:00 PetitPotam Demo: Coercing a Domain Controller
  4. 20:50 Exploiting AD Certificate Services (ESC8) Overview
  5. 32:00 Domain Admin via Unconstrained Delegation Demo
  6. 40:00 Crucial Countermeasures: SMB Signing, LDAP, Delegation
  7. 45:00 Q&A: Blocking Outgoing NTLM Traffic from Tier 0

The Power of Coercion Techniques in Windows Environments

Speakers: Martin Grottenthaler, Security Consultant, SBA Research

Conference: TROOPERS

YouTube: https://www.youtube.com/watch?v=u-RsFCXMqfk

Overview

This article delves into the persistent and often underestimated threat of coercion techniques within Windows Active Directory environments, as presented by Martin Grottenthaler at TROOPERS. The talk highlights how attackers can force Windows machines, particularly domain controllers, to authenticate to arbitrary servers, leading to severe compromise, including full domain takeover. Grottenthaler, a penetration tester with SBA Research, emphasizes that despite years of public disclosure and supposed "patches," these techniques remain highly effective in real-world scenarios due to prevalent misconfigurations and the inherent nature of Windows protocols.

The core message is that while many of these coercion methods are known, their true impact—especially when combined with relay attacks—is frequently overlooked or misunderstood by defenders. The talk serves as a critical reminder that fundamental security hygiene, often dismissed as "old news," is the most robust defense against these sophisticated yet surprisingly simple attack chains. Grottenthaler demonstrates how these techniques, when chained with NTLM relay or Kerberos delegation abuses, can escalate privileges from a low-privileged Active Directory user to domain administrator in minutes.

The presentation provides a comprehensive overview of various coercion techniques, their underlying protocols, and practical exploitation paths. Crucially, it moves beyond merely identifying the vulnerabilities to offering concrete, actionable mitigation strategies that organizations should have already implemented. Grottenthaler’s experience underscores that the problem isn't a lack of knowledge about how to fix these issues, but rather a failure to consistently apply known best practices across complex enterprise environments.

Background

▶ Watch: Introduction and Agenda: The Power of Coercion (0:00)

The problem of coercion in Windows environments stems from the way various Windows services and protocols handle authentication and network connections. At its heart, coercion involves an attacker tricking a target Windows machine into initiating an authentication attempt (usually NTLM or Kerberos) to an attacker-controlled endpoint. While the concept might seem straightforward, the devil lies in the myriad ways different protocols can be abused to achieve this, often leveraging legitimate functionalities.

Historically, vulnerabilities like SMB Relay have demonstrated the dangers of tricking machines into authenticating to an attacker. Coercion techniques expand on this by actively forcing the connection, rather than passively waiting for it. The speaker references the discovery of PrinterBug in 2018 by Will Schroeder, which utilized the Print System Remote Protocol, as one of the earliest widely recognized coercion methods. More recently, PetitPotam emerged in 2021, abusing the Encrypting File System Remote Protocol, gaining significant attention due to its immediate applicability to Active Directory Certificate Services (ADCS) compromise.

The persistence of these issues can be attributed to several factors. Firstly, many of these "vulnerabilities" are often considered "features" by Microsoft, integral to how Windows services are designed to interact. This makes comprehensive patching difficult, as fixing one aspect might break legitimate functionality. Secondly, even when patches are released, they are often incomplete, addressing only a specific RPC method or requiring specific preconditions that attackers can bypass. For instance, Microsoft's patch for PetitPotam only addressed one out of fourteen vulnerable RPC methods.

Finally, the underlying problem is frequently not the coercion itself, but rather the misconfigurations in Active Directory and connected systems that allow the relayed authentication to be exploited for privilege escalation. These misconfigurations, such as disabled SMB signing, unconstrained Kerberos delegation, or excessive local administrative privileges for machine accounts, are long-standing issues that predate many modern coercion techniques. Their continued prevalence provides fertile ground for attackers to chain these "features" into devastating attack paths, culminating in domain compromise.

Key Findings

▶ Watch: PetitPotam Demo: Coercing a Domain Controller (7:00)

The talk by Martin Grottenthaler reveals several critical findings regarding coercion techniques in Windows environments, underscoring their potent and persistent threat:

  • Ubiquitous Coercion Capabilities: Numerous techniques exist to coerce Windows machines, particularly domain controllers, into authenticating to an attacker-controlled server. Key examples include PetitPotam (abusing MS-EFSR), PrinterBug (abusing MS-RPRN), DFSCoerce (abusing DFS-N), and even client-side vulnerabilities like Outlook Elevation of Privileges.
  • Incomplete and Feature-Based "Patches": Many coercion techniques, such as PrinterBug (discovered in 2018) and PetitPotam (discovered in 2021), have not been fully patched. Microsoft's mitigations often address only specific RPC methods or require an authenticated Active Directory user, leaving ample bypasses. The speaker notes that these are often treated as "features" rather than vulnerabilities, making a complete fix unlikely.
  • NTLM Relay as the Primary Exploitation Vector: While the NTLMv2 hashes obtained from coerced machine accounts (e.g., DC$) are practically impossible to crack due to their length and randomness, they are highly valuable for NTLM relay attacks. This involves forwarding the authentication request to another service that accepts NTLM authentication, impersonating the coerced machine.
  • High-Impact Relay Targets: NTLM relay attacks, when combined with coercion, can lead to severe compromises:
  • Active Directory Certificate Services (ADCS) Compromise (ESC8): Relay to ADCS HTTP endpoints allows attackers to request a certificate for the domain controller, which can then be used to obtain a Kerberos Ticket Granting Ticket (TGT) for the DC, leading to immediate domain administrator privileges.
  • Local Administrator Privileges: Relay to target servers where the coerced machine (e.g., DC) holds local administrator rights (a common misconfiguration, e.g., in SCCM environments) allows the attacker to gain local admin on that server, enabling further lateral movement and hash dumping.
  • Unconstrained Kerberos Delegation Abuse: Coercing a domain controller to authenticate to a server configured with unconstrained delegation allows an attacker who controls that server to capture the DC's Kerberos TGT from LSASS, subsequently using it to impersonate the DC and achieve domain admin.
  • Root Cause: Long-Standing Misconfigurations: The ultimate impact of these coercion techniques hinges on prevalent, often overlooked, misconfigurations within Active Directory and connected infrastructure. These include disabled SMB signing, the use of unconstrained Kerberos delegation, and machine accounts possessing excessive local administrative privileges on other critical systems.
  • Simple, Yet Under-Implemented Mitigations: The talk emphasizes that the most effective countermeasures are not revolutionary new technologies but rather fundamental security practices that have been known for years, such as requiring SMB signing, enforcing constrained delegation, and rigorous auditing of local administrator groups. The continued success of these attacks highlights a widespread failure in consistently applying these basic security hygiene measures.

Technical Deep Dive

▶ Watch: Exploiting AD Certificate Services (ESC8) Overview (20:50)

Coercion techniques fundamentally exploit the trust relationships and default behaviors of Windows protocols to force a target machine to authenticate to an attacker-controlled server. This section details the mechanisms of several key coercion techniques and their subsequent exploitation paths.

Coercion Techniques

The general principle of coercion involves an attacker (Attacker) instructing a target machine (e.g., Domain Controller) to connect to another server (Attacker's Server). The Domain Controller then attempts to authenticate to Attacker's Server using its own machine account credentials.

PetitPotam

  • Discovery: Discovered in 2021 by Gilles Lionel.
  • Protocol Abuse: Leverages the Encrypting File System Remote Protocol (MS-EFSR), specifically the EFS RPC OpenFileRaw method. This protocol is designed for machines to access encrypted files on other machines.
  • Mechanism: An attacker makes an RPC call to the target (e.g., a Domain Controller), requesting it to open a raw encrypted file located on the attacker's server. The target then attempts to connect to the attacker's server to fulfill this request, authenticating with its machine account credentials.
  • Authentication: The coerced machine sends its NTLMv2 hash (e.g., DC$) to the attacker.
  • Patch Status: While Microsoft released mitigations in 2021/2022, they were incomplete. The original patch only addressed one out of fourteen vulnerable RPC methods in MS-EFSR. Additionally, unauthenticated RPC access for PetitPotam was blocked, meaning the attack now requires any valid Active Directory user account to initiate the coercion. This is a minor hurdle, as finding a single valid AD credential is often trivial in real-world engagements.
  • Mitigation Challenge: Proposed countermeasures like RPC filters (suggested by Benjamin Delpy) are not officially supported by Microsoft and can cause compatibility issues, making their widespread adoption problematic.

PrinterBug

  • Discovery: Discovered in 2018 by Will Schroeder.
  • Protocol Abuse: Exploits the Print System Remote Protocol (MS-RPRN).
  • Mechanism: Similar to PetitPotam, an attacker makes an RPC call, this time to the Print Spooler service on the target, requesting a connection to a malicious server.
  • Precondition: Requires the Print Spooler service to be running on the target.
  • Patch Status: PrinterBug has not been officially fixed. However, its effectiveness has been reduced because the PrintNightmare vulnerability (a separate, critical privilege escalation bug in the Print Spooler) led many organizations to disable the Print Spooler service on domain controllers and other critical servers where it's not essential. This indirectly mitigates PrinterBug in about 40% of environments, according to Grottenthaler.

Other Coercion Techniques

  • ShadowCoerce: Leveraged the Shadow Copy protocol. This technique has been patched and is no longer effective.
  • DFSCoerce: Still works and targets Domain Controllers by abusing the Distributed File System Namespace (DFS-N) protocol. It has not been patched.
  • Exchange Push Subscriptions: Abused Exchange functionality but has been patched and only worked against Exchange servers.
  • Outlook Elevation of Privileges: A newer vulnerability (2023) that differs as it coerces a user account rather than a machine account. It exploits a feature in Outlook allowing custom sound files for meeting invites to be loaded from network shares. An attacker sends a malicious meeting invite, and Outlook attempts to retrieve the sound file from the attacker's server, authenticating with the user's credentials. While mitigations exist, bypasses have been reported. This highlights the risk of user-credential coercion, which can be cracked if passwords are weak.

Exploiting Coerced Authentication via NTLM Relay

Once a machine (typically a Domain Controller) has been coerced into authenticating to an attacker's server, the attacker receives its NTLMv2 hash. Since machine account hashes are extremely long and random, they are practically uncrackable. The primary exploitation vector is NTLM relay. This involves the attacker's server acting as a proxy, forwarding the captured NTLM authentication to another legitimate service, impersonating the coerced machine.

1. AD Certificate Services (ADCS) Compromise (ESC8)

  • Reference: The "Certified Pre-Owned" paper by Will Schroeder and Lee Christensen (2021), which detailed various ADCS misconfigurations. ESC8 specifically refers to NTLM Relay to ADCS HTTP Endpoints.
  • Attack Flow:
  1. Coercion: Attacker coerces the Domain Controller to authenticate to the attacker's relay server.
  2. Relay to ADCS: The relay server forwards the DC's NTLM authentication to the ADCS web enrollment service (e.g., certsrv/certfnsh.asp).
  3. Certificate Request: Using the relayed authentication, the attacker requests a certificate for the Domain Controller machine account from ADCS.
  4. Kerberos TGT: The obtained certificate can then be used with KrbRelayUp or certipy (or similar tools) to request a Kerberos Ticket Granting Ticket (TGT) for the Domain Controller from a KDC.
  5. Domain Admin: With the DC's TGT, the attacker can impersonate the Domain Controller, allowing them to dump sensitive hashes (e.g., KRBTGT, other domain admin hashes) from the DC using tools like secretsdump.py, achieving full domain administrator privileges.
  • Mitigations: Crucially, this attack relies on misconfigurations in ADCS. Microsoft has released specific guidance, including enforcing HTTPS for ADCS web enrollment, disabling NTLM authentication for ADCS endpoints, and hardening certificate templates.

2. Local Admin Privileges on Other Servers

  • Attack Flow:
  1. Coercion: Attacker coerces the Domain Controller to authenticate to the attacker's relay server.
  2. Relay to Target Server: The relay server forwards the DC's NTLM authentication to a different target server (e.g., Server1).
  3. Privilege Escalation: If the Domain Controller's machine account (DC$) is a member of the local administrators group on Server1, the relay attack grants the attacker local administrative privileges on Server1.
  4. Lateral Movement: The attacker can then use ntlmrelayx.py to execute commands, dump hashes (e.g., secretsdump.py), or create new local administrator accounts on Server1, enabling further lateral movement.
  • Common Misconfiguration: This scenario is surprisingly common. For example, in Microsoft Configuration Manager (SCCM) deployments, the primary site server's computer account often requires local administrator rights on all site system servers. If a DC is also a site system server, or if the DC's account is inadvertently added to local admin groups elsewhere, this attack becomes viable.
  • Auditing: BloodHound queries (e.g., MATCH (c1:Computer)-[r:MemberOf*1..]->(g:Group)-[r2:AdminTo]->(c2:Computer) WHERE c1.name CONTAINS "DC" RETURN c1,g,c2 or direct AdminTo relationships) can identify such misconfigurations.

3. Unconstrained Kerberos Delegation Abuse

  • Kerberos Delegation Refresher:
  • Unconstrained Delegation: A server configured with unconstrained delegation can request a Kerberos TGT for any user that authenticates to it. If a domain admin authenticates to such a server, the server (and by extension, an attacker controlling it) can impersonate that domain admin anywhere in the domain.
  • Constrained Delegation: A more secure alternative where a server is only allowed to delegate for specific services on specific target machines.
  • Attack Flow:
  1. Coercion: Attacker (who has local admin on Server1 which has unconstrained delegation enabled) coerces the Domain Controller to authenticate to Server1.
  2. Kerberos Ticket Capture: When the DC authenticates to Server1, its Kerberos TGT is stored in the LSASS process memory of Server1.
  3. TGT Dump: Since the attacker already has local admin on Server1, they can dump the LSASS process (e.g., using nanodump via crackmapexec) and extract the DC's TGT.
  4. Domain Admin: The captured TGT for the Domain Controller can then be used with impacket tools (e.g., getTGT.py, secretsdump.py) to authenticate as the DC and dump the KRBTGT hash (the master key for Kerberos) from the DC, allowing the creation of Golden Tickets and full domain compromise.
  • Mitigation: The critical countermeasure is to never use unconstrained delegation. Always implement constrained delegation or resource-based constrained delegation. While the "Protected Users" group can prevent user accounts from being delegated, applying it to machine accounts is complex and often breaks functionality.

Demo / Proof of Concept

▶ Watch: Crucial Countermeasures: SMB Signing, LDAP, Delegation (40:00)

Martin Grottenthaler provided live demonstrations in a lab environment consisting of a Windows Server 2022 Domain Controller, a Windows Server 2022 member server, a Windows 11 client, and a Kali Linux attack machine. All systems were described as "quite up-to-date," highlighting that these attacks are not limited to old, unpatched systems.

The demonstrations showcased the following attack chains:

  1. PetitPotam Coercion and NTLMv2 Hash Capture:
  • Setup: On the Kali Linux machine, responder.py was started to listen for incoming NTLM authentication requests.
  • Coercion: Using PetitPotam.py, the attacker coerced the Domain Controller to connect back to the Kali machine's IP address. The command included a valid, low-privileged Active Directory user account (e.g., testuser:password) as required by the patched version of PetitPotam.
  • Result: responder.py successfully captured the NTLMv2 hash of the Domain Controller's machine account ([email protected]). Grottenthaler reiterated that while this hash is uncrackable, it's invaluable for relay attacks.
  1. NTLM Relay to Achieve Local Admin:
  • Setup: ntlmrelayx.py was started on Kali Linux, configured to relay incoming NTLM authentications to the target member server (Server1) via SMB, and to automatically dump hashes from the target.
  • Coercion: PetitPotam.py was again used to coerce the Domain Controller to connect to the Kali machine.
  • Relay Action: ntlmrelayx.py intercepted the DC's NTLM authentication and relayed it to Server1. In this lab setup, the Domain Controller's machine account (DC$) was a local administrator on Server1 (a simulated misconfiguration often found in SCCM environments).
  • Result: The relay was successful. ntlmrelayx.py automatically dumped hashes from Server1, proving local administrative access. Grottenthaler then demonstrated connecting to Server1 using crackmapexec with the administrator credentials (obtained from the hash dump), confirming local admin privileges by running hostname and whoami. This showcased successful lateral movement from a coerced DC to a member server.
  1. Coercion and Kerberos Unconstrained Delegation Abuse to Domain Admin:
  • Setup: The member server (Server1) was configured with unconstrained Kerberos delegation. The Kali machine first gained local admin on Server1 (as demonstrated in the previous step or via other means).
  • Coercion: Instead of coercing the DC back to Kali, PetitPotam.py was used to coerce the Domain Controller to connect directly to Server1 (using its FQDN, e.g., server.sbaresearch.lab). This forced the DC to authenticate to Server1 using Kerberos.
  • Ticket Capture: Since the attacker had local admin on Server1 and Server1 had unconstrained delegation enabled, the DC's Kerberos TGT was stored in Server1's LSASS process.
  • TGT Extraction: crackmapexec was used to connect to Server1 with the compromised local admin credentials and execute nanodump to dump the LSASS process. The dump file was then copied to Kali.
  • TGT Processing: pywerview (or mimikatz) was used on Kali to parse the LSASS dump and extract the Kerberos TGT for the Domain Controller (krbtgt_DC$.ccache). The TGT was converted to a usable format with ticket_converter.py.
  • Domain Admin with TGT: Finally, impacket's secretsdump.py was used with the extracted DC's TGT (-k -no-pass -dc-ip <DC_IP> -target-ip <DC_IP> -aesKey <key>) to connect to the Domain Controller and dump the KRBTGT hash. Grottenthaler declared "we are domain admin" at this point, as possession of the KRBTGT hash allows for the creation of Golden Tickets, granting arbitrary authentication as any user in the domain.

The demonstrations effectively illustrated how seemingly innocuous coercion techniques, when combined with common Active Directory misconfigurations, can be chained together to achieve full domain compromise with relative ease, even on modern, supposedly patched systems.

Defensive Implications

▶ Watch: Q&A: Blocking Outgoing NTLM Traffic from Tier 0 (45:00)

The talk unequivocally highlights that the most effective defenses against coercion techniques are not complex, cutting-edge solutions, but rather the consistent implementation of fundamental security practices that have been known for years. Defenders should prioritize the following measures:

  1. Require SMB Signing: This is arguably the most critical mitigation against NTLM relay attacks. SMB signing ensures that SMB traffic is cryptographically signed, preventing attackers from relaying NTLM authentications. It must be required, not just enabled, on all servers, especially Domain Controllers and any server handling sensitive data. While compatibility issues with older systems or applications might exist, these should be addressed to enable this crucial protection.
  2. Enforce LDAP Channel Binding and Signing: Similar to SMB signing, LDAP channel binding and LDAP signing protect against relay attacks targeting LDAP services. These measures ensure that LDAP communications are secure and prevent NTLM relay to LDAP, which can be exploited for attacks like resource-based constrained delegation.
  3. Eliminate Unconstrained Kerberos Delegation: This is a severe misconfiguration that provides a direct path to domain compromise when combined with coercion. Organizations must audit their Active Directory for any systems configured with unconstrained delegation and migrate them to constrained delegation or, even better, resource-based constrained delegation. While the "Protected Users" group helps for user accounts, it is generally not recommended or practical for machine accounts.
  4. Audit and Restrict Local Administrator Privileges: Regularly audit local administrator groups on all servers. Machine accounts (e.g., DC$) should never have local administrative privileges on other servers unless absolutely essential and thoroughly documented. This is a common misconfiguration, often arising from management tools like SCCM or accidental group memberships. BloodHound queries can be instrumental in identifying instances where machine accounts have AdminTo relationships with other critical systems.
  5. Disable Print Spooler Service: On servers where printing functionality is not required, particularly Domain Controllers, disable the Print Spooler service. This directly mitigates the PrinterBug coercion technique and also protects against other Print Spooler-related vulnerabilities like PrintNightmare.
  6. Harden Active Directory Certificate Services (ADCS): Implement Microsoft's recommended mitigations for ADCS NTLM relay (ESC8). This includes:
  • Enforcing HTTPS for ADCS web enrollment endpoints.
  • Disabling NTLM authentication for ADCS web enrollment.
  • Ensuring that certificate templates do not allow low-privileged users or machines to request certificates with high privileges.
  1. Implement Network Segregation: While challenging to implement in complex environments, network segregation is a powerful defense. By isolating critical assets (e.g., Tier 0 domain controllers) from less trusted networks, the attack surface for coercion and relay attacks is significantly reduced, making lateral movement much harder for attackers.
  2. Monitor for Outgoing NTLM Traffic from Tier 0 Assets: Although the speaker noted this can be difficult to implement without breaking production, blocking or monitoring outgoing NTLM authentication from Tier 0 assets (like Domain Controllers) can provide an additional layer of defense.

Grottenthaler emphasizes that these countermeasures are not new; many have existed for decades. The continued success of coercion-based attacks is a testament to the fact that these fundamental best practices are still not universally adopted or rigorously enforced.

Key Takeaways

  • Coercion techniques are a persistent and effective threat: Methods like PetitPotam and PrinterBug remain viable, forcing Windows machines to authenticate to attacker-controlled servers, even on "patched" systems.
  • NTLM relay is the primary exploitation path: While machine account NTLMv2 hashes are uncrackable, they can be relayed to other services to impersonate the coerced machine.
  • Misconfigurations are the true enablers of impact: The severity of coercion attacks stems from common Active Directory misconfigurations like disabled SMB signing, unconstrained Kerberos delegation, and excessive local admin rights for machine accounts.
  • ADCS (ESC8) and Kerberos delegation abuse lead to immediate domain admin: NTLM relay to misconfigured ADCS or coercing a DC to an unconstrained delegation server are direct routes to full domain compromise.
  • Defenses are old, simple, and under-implemented: Critical mitigations such as requiring SMB signing, enforcing constrained delegation, and auditing local admin privileges have been known for years but are often overlooked.
  • Proactive auditing and security hygiene are paramount: Organizations must regularly audit their environments for these misconfigurations using tools like BloodHound and commit to implementing fundamental security practices.

About the Speaker(s)

Martin Grottenthaler is a Security Consultant at SBA Research, based in Vienna, Austria. He specializes in IT security consulting, with a focus on penetration testing and red teaming, particularly within Windows environments. His work involves actively trying to "hack companies" to identify vulnerabilities and help them improve their security posture. Grottenthaler's expertise lies in understanding how attackers exploit existing systems and misconfigurations, and he often finds that even well-known issues persist due to challenges in implementing proper mitigations.

Reviews

Dr. Zero (Offensive Security Researcher) — SOLID

This is a perfectly executed time capsule from 2021. Grottenthaler gives a competent, live-demoed recap of AD coercion and NTLM relay, but there isn't a single net-new piece of research here.

Heather Calloway (CISO) — SOLID

A competent, highly actionable recap of why Active Directory remains our softest target. It doesn't break new ground, but it provides exactly the ammunition you need to justify the operational friction of enforcing basic AD hygiene.

→ Top-rated talks at TROOPERS23

All talks from TROOPERS23