Skip to content
Access control Write-up Advanced

There and Back Again: An Operators Guide on NTLM Relaying Egress

The article describes a technique to coerce NTLM authentication from a target system to an attacker-controlled cloud host on the internet, then relay that authentication back into the target environment to a service like LDAP or ADCS web enrollment, enabling privilege escalation or domain compromise. It is an operator's guide, not a specific vulnerability report, but it details a real attack method.

Logan Goins Follow

Published on specterops.io

Before getting into the operator guidance and tradecraft, as always there’s a collection of previous work and acknowledgements that this blog is built off of. I am not the original creator of this technique (and coercing NTLM authentication to the internet is not new), but turning that authentication coercion into an…

Logan Goins, on specterops.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the lack of NTLM relay protections (such as LDAP signing, channel binding, or Extended Protection for Authentication) on services like LDAP or ADCS web enrollment, combined with the ability of internal systems to send authentication traffic outbound to the internet.

Impact

An attacker could escalate privileges locally or achieve domain compromise by relaying coerced authentication to unprotected services, but this requires outbound network egress and the absence of relay protections.

What the attacker needed

Low-privilege domain user access; outbound network egress from target; LDAP signing/channel binding not enforced; ADCS web enrollment without EPA

The fix

The article recommends enabling LDAP signing and LDAPS channel binding (set to 'When Supported'), enabling Extended Protection for Authentication on ADCS web enrollment endpoints, and restricting outbound SMB egress with firewall rules.

How it was found

  1. Set up a cloud VM with a public IP that listens on port 443 and forwards traffic back to the attacker's infrastructure.
  2. Establish a SOCKS5 proxy through the compromised internal host to reach internal services.
  3. Add a DNS record pointing to the cloud VM's public IP using low-privilege domain credentials.
  4. Start the WebClient service on the target system to enable WebDAV authentication coercion.
  5. Run ntlmrelayx.py on the attacker's Linux host to relay incoming authentication to an internal LDAP or ADCS endpoint.
  6. Trigger NTLM authentication coercion (e.g., via PetitPotam) from the target system to the cloud host, causing the relay.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This article explains a way attackers can trick a computer inside a company network into sending its login credentials to a server on the internet that the attacker controls. The attacker then forwards those credentials back into the company network to impersonate the computer or user and gain higher access. It is like intercepting a password handshake and using it elsewhere.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.