LDAP Relay and Signing Abuse
When LDAP signing is not enforced on a domain controller, NTLM authentication relayed to the LDAP service can be used to create computer accounts, modify ACLs, or read sensitive attributes. This does not require any existing credentials — you only need to force authentication from a machine account or user and relay it to LDAP. The impact ranges from adding a machine account to the domain to full DCSync rights.
Confirm signing is not enforced
Before attempting any relay, verify the signing state. Relaying to a DC with signing enforced will fail silently.
LDAP 10.10.10.10 389 DC01 LDAP signing NOT enforced (vulnerable) LDAP 10.10.10.10 389 DC01 LDAPS channel binding NOT required (vulnerable)
If signing is not enforced, proceed. If LDAPS channel binding is also not required, you can relay to LDAPS which is slightly more reliable. See also LDAP Signing and Channel Binding for the full vulnerability confirmation workflow.
NTLM relay to LDAP — add machine account
The most common relay target is creating a new computer account in the domain. This gives you a machine account with a known password, which enables Resource-Based Constrained Delegation abuse if you can write the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on a target computer.
Warning
Responder's LLMNR/NBT-NS poisoning is prohibited in the OSCP exam. The LDAP relay itself is fine when authentication is triggered by coercion (printerbug, PetitPotam) instead of poisoning — use those trigger methods below and skip the Responder line during exam environments.
[*] SMBD-Thread-2: Connection from 10.10.10.10 controlled, attacking target ldap://10.10.10.10 [*] HTTP server returned error code 200, treating as a successful login [*] Authenticating against ldap://10.10.10.10 as CORP/DC01$ SUCCEED [*] Enumerating relayed user's privileges. This may take a while on large domains [*] User privileges found: Create user [*] User privileges found: Adding user to a privileged group (Enterprise Admins) [*] Attempting to create computer in: CN=Computers,DC=corp,DC=local [*] Adding new computer with password: RANDOMPASSWORD [*] Successfully added machine account ATTACKPC$ with password RANDOMPASSWORD
RBCD — Resource-Based Constrained Delegation abuse
Once you have created a machine account via relay, use it to set up RBCD on a target computer. This lets you request a service ticket as any user — including domain admins — to services on the target.
Relay to LDAP — modify ACL for DCSync
When relaying a domain admin or account with WriteDACL on the domain object, ntlmrelayx can grant DCSync rights to an account you control — giving you the ability to dump all domain hashes.
[*] Authenticating against ldap://10.10.10.10 as CORP/Administrator SUCCEED [*] Enumerating relayed user's privileges. This may take a while [*] User privileges found: Modifying domain ACL [*] Querying domain security descriptor [*] Success! User 'jsmith' now has Replication-Get-Changes-All privileges on the domain
Requirements summary
LDAP signing not enforced on DC (confirmed with ldap-checker)
Ability to force NTLM authentication from a machine or user (Responder, printerbug, PetitPotam, or coerced via another vulnerability)
Machine Account Quota above 0 if creating a machine account (default is 10)
For the full vulnerability confirmation workflow before attempting relay see LDAP Signing and Channel Binding.
References
-
Impacket ntlmrelayx — GitHubgithub.com/fortra/impacket (opens in new tab)
NTLM relay to LDAP with --delegate-access and --escalate-user flags
-
PetitPotam — GitHubgithub.com/topotam/PetitPotam (opens in new tab)
Unauthenticated NTLM coercion via MS-EFSRPC
Was this helpful?
Your feedback helps improve this page.