# ICMP redirects and LLMNR, NBT-NS and mDNS spoofing: the small protocols that believe the first answer

> Two kinds of helpfulness built into hosts become two ways to divert their traffic: the ICMP redirect, which lets a router tell a host to use a better next hop, and the multicast name protocols (LLMNR, NetBIOS Name Service and mDNS), which let a host ask the whole segment for a name that DNS could not resolve. This part reads each in its standard, writes a redirect, a NetBIOS name and an LLMNR query and answer out by hand, explains why the checks the RFCs ask for do not stop an attacker on the same link, follows WPAD from its 1999 draft to Microsoft's 2016 fix, and gathers the record from DoubleDirect to the advisories of CISA and the groups MITRE lists. After reading, you can recognize each in a capture, explain what the host does with it, and switch each fallback off with the controls the operating systems document.

Source: https://ronutz.com/en/learn/icmp-redirects-and-llmnr-nbt-ns-and-mdns-spoofing  
Updated: 2026-11-23

---

This part of the series on [traffic diversion and the man in the middle](https://ronutz.com/en/learn/traffic-diversion-and-the-man-in-the-middle) follows the part on rogue Dynamic Host Configuration Protocol (DHCP) servers and rogue Internet Protocol version 6 (IPv6) [Router Advertisements](https://ronutz.com/en/learn/rogue-dhcp-and-rogue-ipv6-router-advertisements), and comes before [the Kaminsky flaw](https://ronutz.com/en/learn/the-kaminsky-dns-flaw), which is the same story told about the Domain Name System (DNS) itself. Where the previous part dealt with the configuration a host receives when it joins, this one deals with two kinds of advice a host accepts afterwards, while it is already running. The first is routing advice: the Internet Control Message Protocol (ICMP) redirect, by which a router tells a host that another router on the same link is a better first hop. The second is naming advice: when DNS cannot resolve a short name, Windows and other systems ask the whole segment, through Link-Local Multicast Name Resolution (LLMNR), the NetBIOS Name Service (NBT-NS) and multicast DNS (mDNS), and take the first answer. Both were built for convenience on trusted links, and both, as the opener says, are usually fixed by turning them off. After reading, you can read each message on the wire, explain why the checks the Request for Comments (RFC) standards ask for do not stop an attacker on the same link, follow the Web Proxy Auto-Discovery (WPAD) chain that made the name protocols dangerous, and name the settings that switch each one off.

## Two kinds of helpfulness

A host does not know the topology of the network it is on. It knows its own address, its subnet and one default gateway, and it sends everything off-link to that gateway. The ICMP redirect was the early Internet's way of teaching it more without a routing protocol: the gateway forwards the packet and, if another router on the same subnet would have been the better first hop, it tells the host so. The host remembers. The [routing tables and default gateway](https://ronutz.com/en/learn/routing-tables-and-default-gateway) article explains the host's side of that decision; ICMP itself, with its other messages, is in [ICMP, ping and traceroute](https://ronutz.com/en/learn/icmp-ping-and-traceroute).

A host also does not always have a name server that knows every name. Small networks, home networks and ad hoc ones often have none. The multicast name protocols answer that by letting a host ask its neighbours directly: who here is called FILESRV? Whoever answers is believed. On a corporate network with working DNS this should almost never happen, which is exactly why it is dangerous: the questions that do fall through to multicast are typing mistakes, stale shortcuts and names that no longer exist, and for those no legitimate answer will ever arrive.

Both mechanisms have the same structure as every other method in this series. They let a neighbour change the host's state (a route cache entry, a name-to-address binding) on the neighbour's word alone.

## The ICMP redirect, as RFC 792 drew it

RFC 792, Jon Postel's specification of ICMP from September 1981, defines the Redirect Message as type 5 with four codes: 0, "Redirect datagrams for the Network"; 1, "Redirect datagrams for the Host"; 2 and 3, the same for a Type of Service. After the type, code and checksum comes the "Gateway Internet Address", the address of the router to use instead, and then "the internet header plus the first 64 bits of the original datagram's data", which identifies the packet that prompted it ([RFC 792, Redirect Message](https://www.rfc-editor.org/rfc/rfc792.txt)).

The RFC describes when a router sends one, in its own scenario: a gateway G1 receives a datagram from a host, looks up the next gateway G2 towards the destination, and "If G2 and the host identified by the internet source address of the datagram are on the same network, a redirect message is sent to the host. The redirect message advises the host to send its traffic for network X directly to gateway G2 as this is a shorter path to the destination" (same source). The router still forwards the original packet; the redirect is advice about the next one.

### What a host must do with it

RFC 1122, the requirements for Internet hosts edited by Robert Braden in October 1989, turns the advice into an obligation. "A host receiving a Redirect message MUST update its routing information accordingly. Every host MUST be prepared to accept both Host and Network Redirects". It then adds two checks: "A Redirect message SHOULD be silently discarded if the new gateway address it specifies is not on the same connected (sub-) net through which the Redirect arrived, or if the source of the Redirect is not the current first-hop gateway for the specified destination" ([RFC 1122, section 3.2.2.2](https://www.rfc-editor.org/rfc/rfc1122.txt)). Because a host generally does not know the subnet mask of a remote network, "a Network Redirect message SHOULD be treated identically to a Host Redirect message", updating only the entry for the one destination (section 3.3.1.2).

The two checks are the heart of this part, so it is worth being precise about what they test. The first asks whether the new gateway is on the host's own subnet: an attacker on the same subnet always is. The second asks whether the redirect came from the current first-hop gateway, and the only evidence the host has for that is the redirect's IP source address, which an attacker on the link can write as easily as any other field. Both checks keep out redirects from far away, which is what they were for. Neither can tell the real gateway from a neighbour that writes the gateway's address on its packet.

Routers are told the opposite. RFC 1812, Fred Baker's requirements for Internet Protocol version 4 (IPv4) routers of June 1995, says a router "MUST NOT generate a Redirect Message unless" the packet is leaving by the interface it arrived on, the source is on the same subnet as the next hop, and there is no source route option; and "A router using a routing protocol (other than static routes) MUST NOT consider paths learned from ICMP Redirects when forwarding a packet", because "Believing a redirect which contradicted the router's other information would likely create routing loops" ([RFC 1812, sections 4.3.3.2 and 5.2.7.2](https://www.rfc-editor.org/rfc/rfc1812.txt)). This is why a classic redirect attack diverts only the host's half of a conversation: the router will not believe one.

### A redirect, written out by hand

The example uses the same small office as the previous part: a host at 10.20.30.57 whose gateway is 10.20.30.1, and another machine at 10.20.30.66. The host has sent a DNS query to a server at 198.51.100.10 (a documentation address from [RFC 5737](https://www.rfc-editor.org/rfc/rfc5737.txt)). A redirect claiming to come from the gateway arrives:

| Part | Field | Value | Bytes |
|---|---|---|---|
| IP header | Source | 10.20.30.1 (the current gateway's address) | |
| IP header | Destination | 10.20.30.57 | |
| ICMP | Type, Code | 5, 1 (Redirect for the Host) | `05 01` |
| ICMP | Checksum | computed over the ICMP message | `0E FB` |
| ICMP | Gateway Internet Address | 10.20.30.66 | `0A 14 1E 42` |
| ICMP | Original IP header (20 bytes) | version 4, length 60, time to live (TTL) 64, protocol 17 (UDP), 10.20.30.57 to 198.51.100.10 | `45 00 00 3C 1C 46 00 00 40 11 0B E1 0A 14 1E 39 C6 33 64 0A` |
| ICMP | First 64 bits of the original data | UDP ports 50000 to 53, length 40, checksum 0 | `C3 50 00 35 00 28 00 00` |

The whole ICMP message is 36 bytes: 8 bytes of type, code, checksum and gateway, 20 of the quoted header and 8 of the quoted data. The checksum is the one's complement of the one's complement sum of the message taken as 16-bit words with the checksum field at zero ([RFC 792](https://www.rfc-editor.org/rfc/rfc792.txt)); for these bytes it comes to 0x0EFB, and the quoted header carries its own checksum, 0x0BE1, exactly as the host sent it.

Now run RFC 1122's two checks. Is 10.20.30.66 on the subnet the redirect arrived through? Yes. Is the source, 10.20.30.1, the current first-hop gateway for 198.51.100.10? Yes, as far as the host can see. Both checks pass, and a host that follows the MUST updates its route cache: packets for 198.51.100.10 now go to 10.20.30.66. Nothing about the packet is unusual except where it physically came from, which the host cannot see and the switch can.

## IPv6 redirects: stricter checks, same limit

IPv6 kept the redirect as part of Neighbor Discovery (ND) and tightened its validation. A host "MUST silently discard any received Redirect message that does not satisfy all of the following validity checks", among them that the "IP Source Address is a link-local address", that "The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router", and that "The IP source address of the Redirect is the same as the current first-hop router for the specified ICMP Destination Address" ([RFC 4861, section 8.1](https://www.rfc-editor.org/rfc/rfc4861.txt)). The hop limit check keeps out every sender beyond the link, which is a real improvement. The source check has the IPv4 weakness: a neighbour can use the router's link-local address as its source. The threat analysis for Neighbor Discovery, RFC 3756 of May 2004, describes it in a paragraph: "The attacker uses the link-local address of the current first-hop router in order to send a Redirect message to a legitimate host. Since the host identifies the message by the link-local address as coming from its first hop router, it accepts the Redirect", and the redirect stays in effect as long as the attacker answers the host's reachability probes ([RFC 3756, section 4.2.4](https://www.rfc-editor.org/rfc/rfc3756.txt)); the [Neighbor Discovery](https://ronutz.com/en/learn/ipv6-neighbor-discovery) article places it among the other ND threats. Router Advertisement (RA) Guard implementations block router-only messages, redirects included, on host-facing ports: Cisco's says that in host mode "all router advertisement and router redirect messages are disallowed on the port" ([Cisco, Configuring IPv6 First Hop Security, IOS XE 17.10, 30 November 2022](https://www.cisco.com/c/en/us/td/docs/Sanity_test/INC9625337/b_1710_sec_9300_cg1/m9_1710_sec_ipv6_fhs_cg.html)).

## The record: DoubleDirect

In November 2014 the mobile security company Zimperium reported redirect attacks "occurring in the wild against high-profile targets" in 31 countries, which it named DoubleDirect. Its description of the older technique matches the RFCs: tools such as Ettercap had implemented a "half-duplex" interception, in which the victim is poisoned with a redirect but the router, which will not accept redirects for a directly connected network, has to be poisoned some other way, usually through the Address Resolution Protocol (ARP), so "networks that are immune to ARP spoofing will be able to stop the attack" ([Zimperium, DoubleDirect: Zimperium Discovers Full-Duplex ICMP Redirect Attacks in the Wild, 20 November 2014](https://www.zimperium.com/blog/doubledirect-zimperium-discovers-full-duplex-icmp-redirect-attacks-in-the-wild/)). The variant it found avoided that dependency by redirecting the victim's DNS traffic first, reading the answers, and then sending a redirect for each address the victim was about to contact. Zimperium named the services whose traffic was redirected (Google, Facebook, Twitter, Hotmail, Live.com and Naver among others) and cautioned that this "does not necessarily mean that the attacker had visibility to encrypted traffic" (same source).

Zimperium's findings on which systems accepted redirects are dated, and they are the most useful part for a defender: iOS (including 8.1.1), most Android devices it tested (including a Nexus 5 on Lollipop) and Mac OS X Yosemite accepted ICMP redirects by default, while "Most of GNU/Linux and Windows desktop operating system do not accept ICMP redirect packets" (same source). The next section shows that the second half of that sentence depends on where one looks.

## Turning redirects off

Each operating system documents its own switch, and the defaults differ from what the 2014 report suggests.

- **Linux.** The kernel's documentation gives `accept_redirects` a default of TRUE for a host and FALSE for a router; `secure_redirects`, also TRUE by default, accepts redirects "only to gateways listed in the interface's current gateway list", but it is "Overridden by shared_media", whose default is also TRUE; and `send_redirects` controls whether the machine sends them when it routes ([Linux kernel documentation, IP Sysctl](https://docs.kernel.org/networking/ip-sysctl.html)). For IPv6, `accept_redirects` is enabled when the machine is not forwarding (same source). Distributions can and do ship their own settings over these kernel defaults, which is the most likely reason Zimperium found desktop Linux not accepting redirects; the kernel itself does.
- **Windows.** Microsoft's unattended-setup reference for `IcmpRedirectsEnabled` says it "specifies whether the IPv4 and IPv6 path caches are updated in response to Internet Control Message Protocol (ICMP) redirect messages", and that `true` "is the default value for both the IPv4 and IPv6 settings" ([Microsoft Learn, Microsoft-Windows-TCPIP IcmpRedirectsEnabled](https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-tcpip-icmpredirectsenabled)). The United States Defense Information Systems Agency's Security Technical Implementation Guide (STIG) for Windows Server 2025 requires the registry value EnableICMPRedirect to be 0, through the policy "MSS: (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes" (Open Shortest Path First, a routing protocol) set to Disabled ([STIG Viewer, Windows Server 2025 STIG, V-278084, 20 February 2026](https://www.stigviewer.com/stigs/microsoft_windows_server_2025/2026-02-20/finding/V-278084)).
- **macOS and iOS.** Zimperium's report gave the macOS setting that drops redirects, `net.inet.icmp.drop_redirect`, as the test for exposure ([Zimperium, 20 November 2014](https://www.zimperium.com/blog/doubledirect-zimperium-discovers-full-duplex-icmp-redirect-attacks-in-the-wild/)); current defaults on Apple's systems are not established by the sources read for this part.
- **Routers.** RFC 1812 already forbids routers running a routing protocol from acting on redirects. Whether a router sends them is the router's own configuration; a network that does not need them gains nothing from routers advertising better next hops to hosts.

On the infrastructure side, the same ingredients as in the earlier parts apply. A redirect from an attacker on IPv4 carries the gateway's IP address but the attacker's hardware address, so the binding table that dynamic ARP inspection and IP source guard use (see [ARP poisoning](https://ronutz.com/en/learn/arp-poisoning-on-a-switched-lan)) gives a switch the information to refuse it, and for IPv6 the RA Guard host role drops redirects outright.

## When DNS has no answer

Before the name protocols, the order in which a host asks matters. Microsoft's overview of Windows name resolution explains that "Single label names can be resolved as both a DNS name and a NetBIOS name", that "For a single label name to be resolved by DNS it has to be converted to an FQDN by appending suffixes", and that LLMNR "enables name resolution in scenarios in which conventional DNS name resolution is not possible on the local link" ([Microsoft Open Specifications, MS-WPO, section 7.1.4, Windows Name Resolution](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-wpo/f00add7f-a321-4a5f-a5d8-1748e748cd44)). A short name, a fully qualified domain name (FQDN) that DNS says does not exist, or a DNS server that does not answer, all lead the client to the multicast fallbacks. Each of them puts the question on the wire to every host on the segment.

## LLMNR

LLMNR is described in RFC 4795, published in January 2007 by Bernard Aboba, Dave Thaler and Levon Esibov of Microsoft. Its status matters: "This memo provides information for the Internet community. It does not specify an Internet standard of any kind" ([RFC 4795](https://www.rfc-editor.org/rfc/rfc4795.txt)). It is, in effect, Microsoft's protocol written down. Queries "are sent to and received on port 5355", to the multicast address 224.0.0.252 in IPv4 and FF02::1:3 in IPv6, and use the DNS header with three flags of their own (C for conflict, TC for truncation, T for tentative); a responder "responds to this query only if it is authoritative for the name in the query", by "sending a unicast UDP response to the sender" (sections 2 and 2.1.1). The RFC recommends limiting LLMNR to single-label names and a default TTL of 30 seconds for answers (sections 3 and 2.8).

Its security considerations are unusually candid, and they say everything this part needs:

- "multicast LLMNR queries are propagated to all hosts on the link, making it possible for an on-link attacker to spoof LLMNR responses without having to guess the value of the ID field in the query" ([RFC 4795, section 5.2](https://www.rfc-editor.org/rfc/rfc4795.txt)). The transaction ID, which protects a DNS query from an off-path forger, protects nothing here: everyone on the link has seen it.
- "If an LLMNR query is sent for an off-link host, spoofing a response in a timely way is not difficult, since a legitimate response will never be received" (same section). The names that fall through to LLMNR are, by construction, names nobody legitimate owns.
- "These threats are most serious in wireless networks, such as IEEE 802.11, since attackers on a wired network will require physical access to the network, while wireless attackers may mount attacks from a distance" (section 5).
- The mitigations it offers (TSIG, IPsec with a group key, DNSSEC) assume "a pre-arranged security configuration", and it notes that group keys "do not protect against forgery by an attacker that is a member of the group" (section 5.3). On a typical office network none of them is in use.

### A poisoned lookup, packet by packet

The example is a user who types `\\fileserv` instead of the real server's name, on a Windows host at 10.20.30.57 where DNS has no record for `fileserv`. The host's LLMNR query, written out in full (26 bytes):

```
8A 3C   00 00   00 01   00 00   00 00   00 00     ID, flags (a query), QDCOUNT 1, no answers
08 66 69 6C 65 73 65 72 76 00                     the name: length 8, "fileserv", end
00 01   00 01                                     QTYPE A, QCLASS IN
```

It goes to 224.0.0.252, port 5355, so every host on the segment receives it. A machine at 10.20.30.66 that answers for every name sends back, by unicast (50 bytes):

```
8A 3C   80 00   00 01   00 01   00 00   00 00     same ID, QR bit set (a response), one answer
08 66 69 6C 65 73 65 72 76 00   00 01   00 01     the question, repeated
08 66 69 6C 65 73 65 72 76 00   00 01   00 01     the answer's name, type A, class IN
00 00 00 1E   00 04   0A 14 1E 42                 TTL 30 s, data length 4, 10.20.30.66
```

The ID (0x8A3C) matches because the query was multicast; the TTL is the RFC's recommended 30 seconds; the address is the responder's own. The host now believes `fileserv` is 10.20.30.66 and connects to it. What it offers next depends on the protocol: for a file share it starts a Server Message Block (SMB) session, and if the server asks for authentication, Windows answers with NT LAN Manager (NTLM) on the user's behalf. That challenge-response, and why it can be relayed to another service or attacked offline, is the subject of [NTLM explained](https://ronutz.com/en/learn/ntlm-explained). The poisoned name is the way in; the credential exchange is what the attacker wanted.

## NetBIOS Name Service

NetBIOS over TCP/IP is older and simpler. RFCs 1001 and 1002, published in March 1987 by the NetBIOS Working Group, define a name service on User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) port 137, and node types that decide how a host resolves: B (broadcast) nodes broadcast their queries, P (point-to-point) nodes ask a NetBIOS Name Server (NBNS), and M (mixed) nodes combine the two ([RFC 1001](https://www.rfc-editor.org/rfc/rfc1001.txt); [RFC 1002, the port constants](https://www.rfc-editor.org/rfc/rfc1002.txt)). Microsoft's implementation of the name server is the Windows Internet Name Service (WINS) (MS-WPO, section 7.1.4). A broadcast query, like a multicast LLMNR query, is heard by everyone on the segment, and the same reasoning applies to its answers.

### A NetBIOS name, encoded by hand

NetBIOS names travel in an encoding that is worth computing once, because it is how they appear in a capture. A NetBIOS name is 16 bytes. In Microsoft's use, the first 15 are the name padded with spaces and the 16th is a suffix that says which service the name stands for: "[00h]WorkStation, [03h]Messenger, and [20h] File Server" ([Microsoft Open Specifications, MS-NBTE, Appendix A](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nbte/6dbf0972-bb15-4f29-afeb-baaae98416ed)). RFC 1001's "first level encoding" then splits each byte into two half-bytes and adds each to the value of the letter A (0x41), "resulting in a NetBIOS name being represented as a sequence of 32 ASCII, upper-case characters from the set `{A,B,C...N,O,P}`" ([RFC 1001, section 14.1](https://www.rfc-editor.org/rfc/rfc1001.txt)).

For the file-server name of a machine called FILESRV:

| Character | Byte | High half + 0x41 | Low half + 0x41 | Encoded |
|---|---|---|---|---|
| F | 0x46 | 4 → E | 6 → G | EG |
| I | 0x49 | 4 → E | 9 → J | EJ |
| L | 0x4C | 4 → E | C (12) → M | EM |
| E | 0x45 | 4 → E | 5 → F | EF |
| S | 0x53 | 5 → F | 3 → D | FD |
| R | 0x52 | 5 → F | 2 → C | FC |
| V | 0x56 | 5 → F | 6 → G | FG |
| space (×8) | 0x20 | 2 → C | 0 → A | CA each |
| suffix | 0x20 | 2 → C | 0 → A | CA |

So `FILESRV<20>` travels as `EGEJEMEFFDFCFGCACACACACACACACACA`, 32 letters. The encoding is reversible by the same rule in reverse, and it is a useful check on the RFC itself: decoding the RFC's own example, `FEGHGFCAEOGFHEECEJEPFDCAHEGBGNGF`, gives "Tge NetBIOS tame" rather than the "The NetBIOS name" the text says it encodes, a slip of two letters in the 1987 document that the arithmetic makes easy to see.

In June 2016 Microsoft fixed a flaw in exactly this layer: CVE-2016-3299, a "spoofing vulnerability that could allow elevated privileges exists in Microsoft Windows when NetBIOS improperly handles responses", which "an attacker whose system is joined to a local network could" use "to hijack network traffic"; the update changed "how NetBIOS validates responses" ([Microsoft Security Bulletin MS16-077, 14 June 2016](https://learn.microsoft.com/en-us/security-updates/securitybulletins/2016/ms16-077)).

## Multicast DNS

mDNS, specified in RFC 6762 by Stuart Cheshire and Marc Krochmal of Apple in February 2013, is the newest and the best designed of the three. It uses the DNS message format on UDP port 5353, to 224.0.0.251 and FF02::FB, and it is meant for names under `.local`, which by definition have only local meaning ([RFC 6762](https://www.rfc-editor.org/rfc/rfc6762.txt)). Service discovery on top of it, DNS-Based Service Discovery, is in [RFC 6763](https://www.rfc-editor.org/rfc/rfc6763.txt).

The design does not assume honesty, and the RFC says so in plain terms: its conflict resolution "is, by its very nature, an algorithm that assumes cooperating participants", and "In an environment where the participants are mutually antagonistic and unwilling to cooperate, other mechanisms are appropriate, like manually configured DNS"; where hosts cannot be sure "that there are no antagonistic hosts on the same physical link", they "need to use IPsec signatures and/or DNSSEC signatures" ([RFC 6762, section 21](https://www.rfc-editor.org/rfc/rfc6762.txt)). The same section warns that sending queries for global names to the multicast address during an outage is especially dangerous, "because the user may have the impression that he or she is communicating with some authentic host, when in fact he or she is really communicating with some local host that is merely masquerading as that name" (same section). The limit to `.local` is mDNS's real protection: a client that follows the RFC never asks the segment about `bank.example`.

In April 2022 Microsoft announced that it intended mDNS to become the only multicast name protocol on by default in Windows. Its networking blog wrote that "NetBIOS name resolution and LLMNR are rarely used today. This means that having them enabled needlessly expands the attack surface of devices", that NetBIOS resolution had long been off on cellular interfaces and had been placed in Insider builds in a "learning mode" where it is used only after mDNS and LLMNR fail, and that "The default LLMNR behavior has not been changed in Windows yet" ([Microsoft Networking Blog, Aligning on mDNS: ramping down NetBIOS name resolution and LLMNR, 22 April 2022](https://techcommunity.microsoft.com/blog/networkingblog/aligning-on-mdns-ramping-down-netbios-name-resolution-and-llmnr/3290816)). Whether later Windows releases changed the LLMNR default is not established by the sources read for this part; the policy described below works either way.

## WPAD: asking the network where the proxy is

The name fallbacks became an infrastructure problem because of one name in particular. The Web Proxy Auto-Discovery protocol was an Internet-Draft of July 1999 by Paul Gauthier, Josh Cohen, Martin Dunsmuir and Charles Perkins that expired in December 1999 and never became an RFC ([draft-ietf-wrec-wpad-01](https://datatracker.ietf.org/doc/html/draft-ietf-wrec-wpad-01)). It tells a browser how to find a proxy auto-config (PAC) file without being configured: first through DHCP, using an option the draft proposed with code 252, then through DNS, by looking up names beginning with `wpad` and devolving the domain one label at a time. For a client called johns-desktop.development.foo.com, the draft's own example tries `wpad.development.foo.com` and then `wpad.foo.com` (same source, section 4). What a PAC file does once found is explained in [how a PAC file chooses a proxy](https://ronutz.com/en/learn/how-a-pac-file-chooses-a-proxy).

The draft's security section is three sentences long, and the last is the one later events made famous: "Minimally, it can be said that the WPAD protocol does not create new security weaknesses" (section 9). On a Windows network it created two. First, when the DNS lookup for `wpad` failed, Windows fell back to the broadcast protocols, so whoever answered the LLMNR or NetBIOS query for WPAD supplied the browser's proxy. Second, the client would authenticate to that proxy automatically. Microsoft's bulletin MS16-077 of 14 June 2016 described the first as CVE-2016-3213: "An elevation of privilege vulnerability exists in Microsoft Windows when the Web Proxy Auto Discovery (WPAD) protocol falls back to a vulnerable proxy discovery process", which "an attacker could" exploit by responding "to NetBIOS name requests for WPAD" ([Microsoft Security Bulletin MS16-077](https://learn.microsoft.com/en-us/security-updates/securitybulletins/2016/ms16-077)). Fox-IT later summarized the two protections the update added: the location of the WPAD file "is no longer requested via broadcast protocols, but only via DNS", and credentials were no longer provided by default ([Fox-IT, mitm6, 11 January 2018](https://blog.fox-it.com/2018/01/11/mitm6-compromising-ipv4-networks-via-ipv6/)). As the [previous part](https://ronutz.com/en/learn/rogue-dhcp-and-rogue-ipv6-router-advertisements) shows, the same post then described answering the WPAD DNS query itself, after taking over the host's DNS through DHCPv6.

WPAD also leaked off the network. In May 2016 the United States Computer Emergency Readiness Team (US-CERT) warned that WPAD queries "intended for resolution on private or enterprise DNS servers have been observed reaching public DNS servers", and that, with new generic top-level domains being delegated, "Attackers may exploit such leaked WPAD queries by registering the leaked domain and setting up MitM proxy configuration files on the Internet"; it noted that WPAD "is enabled by default on all Microsoft Windows operating systems and Internet Explorer browsers" and supported but not enabled by default elsewhere, and that "most assets become vulnerable when used outside an internal network (e.g., home networks, public Wi-Fi networks)" ([US-CERT, Alert TA16-144A, WPAD Name Collision Vulnerability, 23 May 2016](https://www.cisa.gov/news-events/alerts/2016/05/23/wpad-name-collision-vulnerability)). Its recommendations were about naming: use a registered domain or an internal top-level domain under your control, and make internal DNS servers answer authoritatively for it (same source).

## The record

The name protocols appear in incident reports far more often than redirects, because they lead straight to credentials.

- **The assessments.** In October 2023 the Cybersecurity and Infrastructure Security Agency (CISA) and the National Security Agency (NSA) listed the most common misconfigurations their red and blue teams had found. Among default services left on: "assessment teams have observed Link-Local Multicast Name Resolution (LLMNR) and NetBIOS Name Service (NBT-NS)", which "actors can use" with "spoofing, poisoning, and relay techniques" to obtain "domain hashes, system access, and potential administrative system sessions"; and, combined with SMB servers that do not require signing, to "gain access to remote systems without needing to capture and crack any hashes" ([CISA and NSA, Advisory AA23-278A, Top Ten Cybersecurity Misconfigurations, 5 October 2023](https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-278a)).
- **The technique.** MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) records the technique as T1557.001, Name Resolution Poisoning and SMB Relay: adversaries respond to LLMNR (UDP 5355), NBT-NS (UDP 137) and mDNS (UDP 5353) "as if they know the identity of the requested host", and "If the requested host belongs to a resource that requires identification/authentication, the username and NTLMv2 hash will then be sent to the adversary controlled system" ([MITRE ATT&CK, T1557.001, version 2.0, last modified 12 May 2026](https://attack.mitre.org/techniques/T1557/001/)).
- **The groups.** The same page lists procedure examples from published reports: the Lazarus Group ran Responder on a compromised host "to harvest credentials and move laterally", citing Kaspersky's report on its ThreatNeedle campaign against the defence industry of 25 February 2021; Wizard Spider used the Inveigh cmdlets, "likely for name service poisoning", citing a report by Kimberly Goody and colleagues of 28 October 2020; and the description cites Trend Micro's investigation of the BlackCat ransomware of 18 April 2022 (same source).
- **The tools.** The record names them, so this part does too: Responder, written by Laurent Gaffié; Inveigh, Kevin Robertson's PowerShell equivalent; NBNSpoof; modules of Metasploit and Impacket (same source). They are why this attack is routine in penetration tests: it needs no exploit, only a segment where the fallbacks are on. [The interception tools](https://ronutz.com/en/learn/the-interception-tools) covers the older generation of the same family.

## Turning the fallbacks off

The defences are configuration, and the operating system vendors document them.

- **LLMNR.** The Group Policy setting "Turn off multicast name resolution" (Computer Configuration, Administrative Templates, Network, DNS Client; registry value EnableMulticast) "Specifies that link local multicast name resolution (LLMNR) is disabled on the DNS client"; "If you enable this policy setting, LLMNR will be disabled on all available network adapters on the DNS client", and if it is not configured "LLMNR will be enabled on all available network adapters" ([Microsoft Learn, Policy CSP ADMX_DnsClient, Turn_Off_Multicast](https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-admx-dnsclient)).
- **NetBIOS name resolution.** Microsoft's 2022 post points to the "Configure NetBIOS settings" policy in the same folder, with disabled, disabled-on-public-networks and learning modes ([Microsoft Networking Blog, 22 April 2022](https://techcommunity.microsoft.com/blog/networkingblog/aligning-on-mdns-ramping-down-netbios-name-resolution-and-llmnr/3290816)). On the network side, a Windows DHCP server can switch NetBIOS over TCP/IP off on its clients with the vendor-class option "001 Microsoft Disable Netbios Option" set to 0x2, provided the clients are set to take their NetBIOS setting from DHCP ([Microsoft Learn, How to disable NetBIOS over TCP/IP by using DHCP server options, KB 313314, updated 12 February 2026](https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/disable-netbios-tcp-ip-using-dhcp)).
- **Assess before switching.** CISA's countermeasure CM0053 frames the change as a project rather than a click: evaluate "the current usage of LLMNR to understand why it is being used", determine "the systems and applications that rely on LLMNR", decide with stakeholders "whether LLMNR can be effectively replaced by DNS implementation", and keep backups where the registry is changed ([CISA, Eviction Strategies Tool, CM0053, Disable Link-Local Multicast Name Resolution (LLMNR) Service](https://www.cisa.gov/eviction-strategies-tool/info-countermeasures/CM0053)). CISA and NSA's 2023 advisory gives the same order: determine whether LLMNR and NetBIOS "are required for essential business operations", and if not, disable them by local policy or Group Policy ([CISA and NSA, AA23-278A](https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-278a)).
- **Close the relay, not only the poison.** MITRE's mitigations add host firewalls that block LLMNR, NetBIOS and mDNS traffic, and SMB signing, which "can stop NTLMv2 relay attacks" ([MITRE ATT&CK, T1557.001](https://attack.mitre.org/techniques/T1557/001/)); [NTLM explained](https://ronutz.com/en/learn/ntlm-explained) and [Kerberos and SPNEGO](https://ronutz.com/en/learn/kerberos-and-spnego) describe moving away from NTLM altogether.
- **Make DNS answer.** The fallbacks fire when DNS fails. Internal DNS that answers authoritatively for internal names, suffix search lists that are short and correct, and an explicitly configured PAC location instead of WPAD auto-detection (Fox-IT's recommendation, and the logic of TA16-144A) remove most of the questions that reach the segment in the first place.
- **mDNS where needed, scoped where possible.** mDNS has legitimate uses (printers, screen casting, service discovery). Its own RFC says untrusted links need IPsec or DNSSEC or "manually configured DNS"; in practice that means confining it to the segments where those devices live.

## What it looks like on the wire

- **Answers from hosts that are not servers.** On a managed network, LLMNR and NBT-NS responses should be rare; one host answering many different names, or answering names that do not exist in DNS, is the signature of a poisoner. RFC 4795 adds that "By logging conflicts, LLMNR responders can provide forensic evidence of these attacks" ([RFC 4795, section 5.1](https://www.rfc-editor.org/rfc/rfc4795.txt)).
- **WPAD lookups at all.** If the organization does not use WPAD, any query for `wpad` (in DNS, LLMNR or NetBIOS) is configuration drift, and an answer to one is an incident. Fox-IT published intrusion detection signatures for WPAD responses over IPv6 for exactly this reason ([Fox-IT, 11 January 2018](https://blog.fox-it.com/2018/01/11/mitm6-compromising-ipv4-networks-via-ipv6/)).
- **Authentication to the wrong machine.** SMB or HTTP authentication from users towards a workstation's address, rather than towards a server, follows a poisoned name. Domain controllers and servers that log NTLM use make this visible.
- **Redirects at all.** On a network with a single gateway per subnet, an ICMP redirect has no legitimate reason to exist. Any redirect to a host, and especially one whose source IP is the gateway's while its source hardware address is not, is worth an alert.

## The Brazilian angle

No Brazilian advisory specific to LLMNR, NetBIOS name poisoning or ICMP redirects was found for this part. The national government's incident response centre, CTIR Gov, publishes alerts and recommendations, but its site returned a maintenance page on 23 November 2026 and could not be read. The one Brazilian primary source on the IPv6 side of the subject, the IPv6.br training material of NIC.br (Núcleo de Informação e Coordenação do Ponto BR) on security in networks without network address translation (NAT), lists Redirect among the six processes that Neighbor Discovery serves and RA Guard among the defences, as the [previous part](https://ronutz.com/en/learn/rogue-dhcp-and-rogue-ipv6-router-advertisements) quotes ([IPv6.br, NIC.br, Security in networks without NAT, part 2 (in Portuguese)](https://v4.ipv6.br/media/arquivo/ipv6/file/49/Seguranca_sem_nat-Parte_2.pdf)). For the Windows fallbacks, the controls in this part are the vendor's own and apply unchanged.

## What defenders can do

- Disable LLMNR by policy and NetBIOS name resolution by policy or DHCP option, after finding what still depends on them.
- Make internal DNS authoritative for internal names, keep suffix lists accurate, and configure the PAC location explicitly instead of relying on WPAD auto-detection.
- Require SMB signing and reduce NTLM, so that a poisoned name yields neither a relay nor a crackable exchange.
- Turn off acceptance of ICMP redirects on hosts (EnableICMPRedirect 0 or IcmpRedirectsEnabled false on Windows; accept_redirects 0 on Linux, checking the distribution's defaults rather than assuming them) and on routers that run routing protocols.
- Use the switch: the binding table behind ARP inspection and IP source guard, and RA Guard's host role, refuse packets whose addresses do not belong to the port.
- Alert on LLMNR and NBT-NS answers from non-servers, on any WPAD lookup if WPAD is not used, and on any ICMP redirect on subnets with one gateway.

## What to remember

- An ICMP redirect passes RFC 1122's checks whenever the sender is on the same subnet and writes the gateway's address as its source; the checks stop distant forgers, not neighbours.
- Routers ignore redirects, so a classic redirect attack diverts one direction; DoubleDirect in 2014 got both by redirecting DNS first.
- LLMNR, NBT-NS and mDNS ask everyone on the link and believe the first answer; for names nobody owns, no legitimate answer ever arrives.
- A poisoned name is the way in; the target is the NTLM exchange the client offers next.
- WPAD turned the fallbacks into a proxy hijack until Microsoft's 2016 update; leaked WPAD queries reached the public DNS.
- The fix is to turn the fallbacks off, make DNS answer, and close NTLM relay behind them.

<ReaderQuestions>
- RFC 1122 makes accepting redirects a MUST for hosts. Should a requirement written for the networks of 1989 still bind a host joining a café's Wi-Fi today, and who could change it?
- Microsoft's plan makes mDNS the only multicast name protocol on by default. Does limiting answers to `.local` remove the risk, or move it to the services that advertise themselves there?
- The WPAD draft said it created no new security weaknesses. What should a protocol author owe readers when a mechanism's safety depends on everything around it?
- CISA asks organizations to assess what depends on LLMNR before disabling it. How long should such an assessment run before the remaining dependents are simply broken on purpose?
- Penetration testers find name poisoning in most Windows networks they test. Is the persistence of these defaults a technical problem, an economic one, or a question of who carries the risk?
</ReaderQuestions>

## Sources

- [Jon Postel, RFC 792, Internet Control Message Protocol, IETF, September 1981, text at the RFC Editor: the Redirect Message, its codes, fields and description (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc792.txt)
- [Robert Braden (editor), RFC 1122, Requirements for Internet Hosts: Communication Layers, IETF, October 1989, text at the RFC Editor: sections 3.2.2.2 and 3.3.1.2 (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc1122.txt)
- [Fred Baker (editor), RFC 1812, Requirements for IP Version 4 Routers, IETF, June 1995, text at the RFC Editor: sections 4.3.3.2 and 5.2.7.2 (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc1812.txt)
- [Thomas Narten and others, RFC 4861, Neighbor Discovery for IP version 6 (IPv6), IETF, September 2007, text at the RFC Editor: section 8.1, validation of Redirect messages (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc4861.txt)
- [Pekka Nikander, James Kempf and Erik Nordmark, RFC 3756, IPv6 Neighbor Discovery (ND) Trust Models and Threats, IETF, May 2004, text at the RFC Editor: section 4.2.4, Spoofed Redirect Message (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc3756.txt)
- [Jari Arkko, Michelle Cotton and Leo Vegoda, RFC 5737, IPv4 Address Blocks Reserved for Documentation, IETF, January 2010: the 198.51.100.0/24 range used in the example (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc5737.txt)
- [Linux kernel documentation, IP Sysctl, web page: accept_redirects, secure_redirects, shared_media and send_redirects for IPv4, accept_redirects for IPv6, and their defaults (accessed 23 November 2026)](https://docs.kernel.org/networking/ip-sysctl.html)
- [Microsoft Learn, Microsoft-Windows-TCPIP IcmpRedirectsEnabled, unattended Windows setup reference, web page: the setting and its default (accessed 23 November 2026)](https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-tcpip-icmpredirectsenabled)
- [STIG Viewer, Microsoft Windows Server 2025 Security Technical Implementation Guide, finding V-278084, 20 February 2026, web page: EnableICMPRedirect must be 0 (accessed 23 November 2026)](https://www.stigviewer.com/stigs/microsoft_windows_server_2025/2026-02-20/finding/V-278084)
- [Zimperium, DoubleDirect: Zimperium Discovers Full-Duplex ICMP Redirect Attacks in the Wild, 20 November 2014, web page: the attacks in 31 countries, half and full duplex, the affected platforms, the macOS setting (accessed 23 November 2026)](https://www.zimperium.com/blog/doubledirect-zimperium-discovers-full-duplex-icmp-redirect-attacks-in-the-wild/)
- [Cisco, Security Configuration Guide, Cisco IOS XE Dublin 17.10.x (Catalyst 9300 Switches), Configuring IPv6 First Hop Security, 30 November 2022, web page read through a summarizing reading tool: the host role drops router advertisements and redirects (accessed 23 November 2026)](https://www.cisco.com/c/en/us/td/docs/Sanity_test/INC9625337/b_1710_sec_9300_cg1/m9_1710_sec_ipv6_fhs_cg.html)
- [Microsoft Open Specifications, MS-WPO, Windows Protocols Overview, section 7.1.4, Windows Name Resolution, web page: single-label names, DNS, NetBIOS, WINS and LLMNR (accessed 23 November 2026)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-wpo/f00add7f-a321-4a5f-a5d8-1748e748cd44)
- [Bernard Aboba, Dave Thaler and Levon Esibov, RFC 4795, Link-Local Multicast Name Resolution (LLMNR), IETF, Informational, January 2007, text at the RFC Editor: sections 2, 2.1.1, 2.8, 3 and 5 (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc4795.txt)
- [NetBIOS Working Group, RFC 1001, Protocol Standard for a NetBIOS Service on a TCP/UDP Transport: Concepts and Methods, IETF, March 1987, text at the RFC Editor: node types and section 14.1, first level encoding (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc1001.txt)
- [NetBIOS Working Group, RFC 1002, Protocol Standard for a NetBIOS Service on a TCP/UDP Transport: Detailed Specifications, IETF, March 1987, text at the RFC Editor: the name service port 137 (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc1002.txt)
- [Microsoft Open Specifications, MS-NBTE, NetBIOS over TCP (NBT) Extensions, Appendix A: Product Behavior, web page: the NetBIOS suffixes, including 0x20 for the File Server service (accessed 23 November 2026)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nbte/6dbf0972-bb15-4f29-afeb-baaae98416ed)
- [Stuart Cheshire and Marc Krochmal, RFC 6762, Multicast DNS, IETF, February 2013, text at the RFC Editor: the port, the multicast addresses, the .local domain and section 21 (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc6762.txt)
- [Stuart Cheshire and Marc Krochmal, RFC 6763, DNS-Based Service Discovery, IETF, February 2013, text at the RFC Editor (accessed 23 November 2026)](https://www.rfc-editor.org/rfc/rfc6763.txt)
- [Microsoft Networking Blog, Aligning on mDNS: ramping down NetBIOS name resolution and LLMNR, Microsoft Tech Community, 22 April 2022, web page: the plan, NetBIOS learning mode, the Configure NetBIOS settings policy, LLMNR's unchanged default (accessed 23 November 2026)](https://techcommunity.microsoft.com/blog/networkingblog/aligning-on-mdns-ramping-down-netbios-name-resolution-and-llmnr/3290816)
- [Paul Gauthier, Josh Cohen, Martin Dunsmuir and Charles Perkins, Web Proxy Auto-Discovery Protocol, Internet-Draft draft-ietf-wrec-wpad-01, 28 July 1999, expired December 1999, IETF Datatracker: the discovery sequence, DHCP option 252, DNS devolution and the security considerations (accessed 23 November 2026)](https://datatracker.ietf.org/doc/html/draft-ietf-wrec-wpad-01)
- [Microsoft, Security Bulletin MS16-077, Security Update for WPAD (3165191), 14 June 2016, updated 9 August 2016, web page: CVE-2016-3213, CVE-2016-3236 and CVE-2016-3299 (accessed 23 November 2026)](https://learn.microsoft.com/en-us/security-updates/securitybulletins/2016/ms16-077)
- [US-CERT, Alert TA16-144A, WPAD Name Collision Vulnerability, 23 May 2016, CISA web page: leaked WPAD queries, the new gTLDs, default enablement, recommendations (accessed 23 November 2026)](https://www.cisa.gov/news-events/alerts/2016/05/23/wpad-name-collision-vulnerability)
- [Fox-IT, mitm6: compromising IPv4 networks via IPv6, Fox-IT blog, 11 January 2018, web page: what MS16-077 changed, the WPAD DNS query, the detection signatures, the recommendations (accessed 23 November 2026)](https://blog.fox-it.com/2018/01/11/mitm6-compromising-ipv4-networks-via-ipv6/)
- [CISA and NSA, Cybersecurity Advisory AA23-278A, NSA and CISA Red and Blue Teams Share Top Ten Cybersecurity Misconfigurations, 5 October 2023, web page: LLMNR and NBT-NS left enabled, SMB signing, the mitigations (accessed 23 November 2026)](https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-278a)
- [MITRE ATT&CK, T1557.001, Adversary-in-the-Middle: Name Resolution Poisoning and SMB Relay, version 2.0, created 11 February 2020, last modified 12 May 2026, web page: description, procedure examples, mitigations and references (accessed 23 November 2026)](https://attack.mitre.org/techniques/T1557/001/)
- [Microsoft Learn, Policy CSP ADMX_DnsClient, web page: Turn off multicast name resolution (EnableMulticast) and Configure NetBIOS settings (accessed 23 November 2026)](https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-admx-dnsclient)
- [Microsoft Learn, How to disable NetBIOS over TCP/IP by using DHCP server options, KB 313314, updated 12 February 2026, web page: the vendor option 001 and the client setting (accessed 23 November 2026)](https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/disable-netbios-tcp-ip-using-dhcp)
- [CISA, Eviction Strategies Tool, countermeasure CM0053, Disable Link-Local Multicast Name Resolution (LLMNR) Service, web page: the assessment steps before disabling (accessed 23 November 2026)](https://www.cisa.gov/eviction-strategies-tool/info-countermeasures/CM0053)
- [IPv6.br, NIC.br, Capacitação: Segurança em redes sem NAT, parte 2, PDF: the Neighbor Discovery processes, Redirect among them, and the defences (accessed 23 November 2026)](https://v4.ipv6.br/media/arquivo/ipv6/file/49/Seguranca_sem_nat-Parte_2.pdf)
