LLMNR, NBT-NS and mDNS Poisoning
Also calledLLMNR poisoning, NBT-NS poisoning, Name resolution poisoning
Answers the local network's name queries so victims sign in to the wrong machine.
- Needs
- Local Network
- Gives
- Incoming Sign-InandPassword
How the Attack Works
When DNS has no answer for a name, Windows asks the local network over LLMNR, NBT-NS and mDNS, and accepts an answer from any device. The client then connects to that device as if it were the server it wanted, and signs in with NTLM using the user's own credentials. The NTLMv2 response it sends can be guessed offline, or the live exchange passed on to another server (NTLM relay).
Read first NTLM Negotiate, NTLM Authenticate and Validation, LM, NTLMv1 and NTLMv2
How It Plays Out
The attack step by step. Each step shows which machines take part, what travels, the keys and tickets each side now holds, what is logged and what a defender can see.
ws-017 Client
- dana's key
192.0.2.66 Unknown device
Step 1 of 5: Name Query
On ws-017 Client
DNS has no record for the mistyped name, so ws-017 asks every device on its segment, over LLMNR, NBT-NS and mDNS.
What Defenders See
Network sensors see the multicast and broadcast queries from ws-017. Windows writes no event for them to the Security log on ws-017 or any other machine.
Step 2 of 5: Poisoned Answer
192.0.2.66 Unknown device to ws-017 Client
The unknown device answers that the name is its own address, 192.0.2.66, and ws-017 accepts it.
What Defenders See
Network data shows an answer to ws-017's name query from 192.0.2.66, a device that should never answer one.
Step 3 of 5: Negotiate
ws-017 Client to 192.0.2.66 Unknown device
ws-017 connects to 192.0.2.66 over SMB as if it were the real server, and starts an NTLM sign-in.
What Defenders See
Endpoint network data from ws-017 shows an SMB connection to 192.0.2.66, an address with no DHCP lease.
Hooks into NTLM negotiate
Step 4 of 5: Challenge
192.0.2.66 Unknown device to ws-017 Client
The unknown device sends a challenge of its own, as any server would.
What Defenders See
The challenge travels in the clear, and no log on ws-017 or any other machine records it.
Hooks into NTLM challenge
Step 5 of 5: Authenticate
ws-017 Client to 192.0.2.66 Unknown device
ws-017 answers with dana's name and an NTLMv2 response computed from her NT hash and that challenge.
What Defenders See
No machine in the domain writes a logon event to its Security log. Where NTLM auditing is on, look for event 8001 or 4020 in the Microsoft-Windows-NTLM/Operational log on ws-017, naming a target no server holds.
Hooks into NTLM authenticate
Needs First
What the attacker must already hold for this attack to be possible.
- A Place on the Local NetworkA device on the same network segment as its victims, where their name queries are heard.
Gives the Attacker
What running it hands the attacker to use next.
- An Incoming Sign-InVictims' NTLM sign-ins arriving live, to be passed on (relay) or weakened (downgrade).
- A PasswordA password, where a captured NTLMv2 response is guessed offline.
Leads To
- Incoming Sign-In: NTLM Relay, NTLMv1 Downgrade, Certificate Services Abuse
- Password: Pass-the-Hash, Overpass-the-Hash
What Defenders See
What this attack leaves for a defender to find, and what to read in each. None of it is proof on its own, so treat each as a lead and confirm it against the rest.
| Event and Log | Written On | Look For | Switch It On |
|---|---|---|---|
| 8001 NTLM client blocked audit: Audit outgoing NTLM authentication traffic that would be blocked (opens in a new tab) Microsoft-Windows-NTLM/Operational log | The client that sends the NTLM sign-in | On the client, an outgoing NTLM sign-in whose Target server is a name no server holds. | Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers, set to Audit all |
| 4020 and 4021 This machine attempted to authenticate to a remote resource via NTLM (opens in a new tab) Microsoft-Windows-NTLM/Operational log | The client that sends the NTLM sign-in (4021 flags a weaker one, such as NTLMv1) | On the client, an NTLM sign-in whose Target Machine is a name no server holds. This logging is on by default in Windows 11 24H2. | On by default on Windows 11 24H2, Windows Server 2025 and, with October 2026 updates, Windows Server 2019 and 2022. The NTLM Enhanced Logging policy (System > NTLM) controls it |
| 4769 A Kerberos service ticket was requested (opens in a new tab) Security log | Domain controllers | A failure with Failure Code 0x7 for a service name no account holds, which means a client looked for a server that does not exist.TGS Reply: The Service Ticket explains how to read it. | Audit Kerberos Service Ticket Operations |
What It Looks Like
One event from the worked example, decoded field by field, so you can see what to read in it and what each value means.
8001 NTLM client blocked audit: Audit outgoing NTLM authentication traffic that would be blocked
In the Microsoft-Windows-NTLM/Operational log on ws-017,
ws-017 signs in with NTLM to a name no server holds.
The service and name ws-017 meant to reach. No server is called fileserv, so the name was mistyped, and something answered for it.
As Windows writes it:
Target servercifs/fileservNo credentials were typed. Windows sent dana's own sign-in, as it does for a share.
As Windows writes it:
Supplied user(NULL)The System process, where the SMB client runs, so a share was opened, not a program signing in on its own.
As Windows writes it:
PID of client process4Whose NTLMv2 response went to the device. It was dana's, computed from her NT hash.
As Windows writes it:
User identity of client processdana
Blind Spots
Where this attack leaves little or nothing to see, so a quiet log is not read as an all-clear.
- No domain host logs the poisoned answer or the captured response. Only network sensors and the victim's own NTLM audit events see it.
- A strong password defeats offline guessing of a captured response, but not a live relay of the same exchange.
Hunt It
The query to run in each tool, and how well each one sees this attack. Pick the tool you use, and the others load their query when you open them.
Needs Defender for Endpoint on the workstations, with KnownServers and the workstation name pattern set to your own. It sees the connection after a poisoned answer, not the answer, and most hits are servers missing from the list, so an address no DHCP lease explains is the lead.
// SMB and web connections from workstations to internal addresses that are not known serverslet KnownServers = dynamic( ["192.0.2.10", "192.0.2.11", "192.0.2.15", "192.0.2.20", "192.0.2.25"]);DeviceNetworkEvents| where Timestamp > ago( 30d)| where DeviceName startswith "ws-"| where ActionType == "ConnectionSuccess" and RemotePort in ( 445, 80)| where RemoteIPType !in ( "Public", "Loopback") and RemoteIP !in ( KnownServers)| summarize Connections = count( ), Devices = dcount( DeviceName), FirstSeen = min( Timestamp), LastSeen = max( Timestamp) by RemoteIP, RemotePort| order by Devices descHow to Prevent It
The controls that break this attack, each with how it helps here and, where the Registry topic has it, where to check it on a machine.
LLMNR turned off (opens in a new tab)
Turn off LLMNR by Group Policy, so clients stop asking the local network for names over it.
NetBIOS name resolution turned off (opens in a new tab)
Turn off NetBIOS name resolution, the broadcast fallback any device can answer.
SMB NTLM blocking (opens in a new tab)
Stop SMB clients offering NTLM on outbound connections, so a poisoned connection gets no NTLM response.
SMB signing (opens in a new tab)
Require SMB signing, so a poisoned sign-in passed on to a real server is useless there.
Microsoft Entra Password Protection (opens in a new tab)
Reject guessable passwords, so a captured NTLMv2 response does not give one up.
Sources
- MITRE ATT&CK T1557.001: Adversary-in-the-Middle: Name Resolution Poisoning and SMB Relay (opens in a new tab)
- Microsoft Tech Community: ramping down NetBIOS name resolution and LLMNR (opens in a new tab)
- Microsoft Learn: DNS client policy, turn off multicast name resolution (opens in a new tab)
- Microsoft AskDS: NTLM auditing, with events 8001, 8003 and 8004 (opens in a new tab)
- [MS-NLMP]: NT LAN Manager (NTLM) Authentication Protocol (opens in a new tab)