Skip to main content

Overview

ntlmrelayx intercepts NTLM authentication and relays it to a target service, executing actions with the victim’s privileges. It does not crack passwords — it forwards the live authentication handshake to a different host. Works against targets where SMB signing is not required (for SMB relay) or where LDAP/HTTP/MSSQL accept NTLM.

Enumerate Relay Targets

Before relaying, identify hosts that do not require SMB signing.

Basic Relay to SMB

Relay captured NTLM auth to SMB on another host. Dumps SAM hashes by default if the relayed user is a local admin.

Relay to LDAP

Relaying to LDAP allows domain-level attacks: creating machine accounts, setting RBCD, writing shadow credentials, or modifying ACLs. Requires the relayed account to have the necessary privileges (e.g., domain admin, or any user if ms-DS-MachineAccountQuota > 0).

Add a Computer Account

Resource-Based Constrained Delegation (RBCD)

Write msDS-AllowedToActOnBehalfOfOtherIdentity on the target so your controlled computer can impersonate any user to the target.

Shadow Credentials

Write msDS-KeyCredentialLink to obtain a certificate for the relayed machine account, then request a TGT.

ACL Abuse (Escalate User)

Grant a controlled user DCSync or other privileges.

Relay to AD CS (ESC8)

If AD CS has the HTTP enrollment endpoint enabled, relay NTLM auth to request a certificate as the victim.
Use the resulting Base64 certificate with certipy or impacket-getTGT:

Relay to MSSQL

Execute SQL queries through a relayed NTLM session.

Targets File (-tf)

The targets file supports protocols and multiple hosts.

Combine with Responder

Responder poisons LLMNR/NBT-NS/mDNS to capture NTLM authentication. Disable SMB and HTTP in Responder so ntlmrelayx receives the connections instead.

Combine with PetitPotam / PrinterBug

Coerce a machine account to authenticate to your relay server. Machine account auth is useful for RBCD, shadow credentials, and AD CS attacks.

PetitPotam (MS-EFSRPC)

PrinterBug (MS-RPRN)


SOCKS Proxy Mode

Keep relayed sessions alive and interact with them through a SOCKS proxy. Useful for maintaining access across multiple relayed sessions.

IPv6 Attack with mitm6

mitm6 poisons DHCPv6 and DNS to redirect NTLM auth from IPv6-enabled Windows hosts.
The -6 flag enables IPv6 listening. The -wh flag sets up a WPAD server to trigger proxy authentication.

Remove MIC (CVE-2019-1040)

The Message Integrity Code (MIC) prevents relay modification. Removing it bypasses this protection on unpatched targets.
This drops the MIC from the NTLM AUTHENTICATE_MESSAGE, allowing the relay to succeed against targets vulnerable to CVE-2019-1040 (pre-June 2019 patches).

Quick Reference