A host pointed at a rogue proxy or told to open a network path will often offer the signed-in user’s NTLM response to whatever answers. This article covers two triggers, WPAD proxy discovery and UNC path injection, in a lab, then how to detect and stop them. Test only networks and systems you own or are authorised to assess.
What WPAD does and why it leaks
Web Proxy Auto-Discovery (WPAD) lets the Windows HTTP stack or a browser find a proxy auto-config (PAC) script by DHCP or DNS (WinHTTP AutoProxy). The WPAD Internet-Draft, never an RFC, gives the script URL DHCP option 252 and the path /wpad.dat; MS09-008 describes the DNS route, trying wpad under each parent of the client’s domain. So a rogue DHCP server, or whoever registers or answers for wpad, serves the script that names the proxy. Before MS16-077, Windows could also fall back to NetBIOS, where anyone on the segment can answer, as in LLMNR, NBT-NS and mDNS poisoning.
What Microsoft changed in 2016
MS16-077 (14 June 2016, Security Update for WPAD) fixed CVE-2016-3213 and CVE-2016-3236, with CVE-2016-3299 added in August. Its support article says WPAD resolution no longer uses NetBIOS by default and recommends the DHCP option or DNS; on Windows 8.1 and earlier, AllowOnlyDNSQueryForWPAD set to 0 restores NetBIOS. WinHTTP no longer sends domain credentials automatically when the script server issues an NTLM or Negotiate challenge, unless AutoProxyAutoLogonIfChallenged is 1.
That change covers the script download, not a proxy that answers with a 407 challenge. Microsoft names only NetBIOS, so check with Responder’s analyse mode whether your build sends LLMNR queries for wpad before relying on name poisoning.
What Responder offers for WPAD
Mucahit Karadag of pentest.blog wrote an earlier Responder WPAD walkthrough on this topic. Responder, by Laurent Gaffié (lgandx/Responder), answers any name except DontRespondToName entries (by default ISATAP) unless RespondTo or RespondToName in Responder.conf scopes it. -w starts a rogue proxy on TCP port 3128, which asks for no credentials, and points the default wpad.dat at it. -F demands NTLM or Basic authentication before serving the script, which the help says may show a prompt. Responder’s own examples file -wFv under old networks, and on a build with the MS16-077 behaviour the client will not answer the challenge. -P runs a proxy on port 3128 that answers with a 407 NTLM challenge and cannot be combined with -w. -b switches to Basic, returning cleartext passwords. -d injects the script URL into DHCP answers; Responder warns its DHCPv6 mode can disrupt a network, so keep both to an isolated lab. The capture is a NetNTLMv2 response: crackable offline, relayable to services that do not require signing, never a replayable NT hash.
UNC path injection
A UNC path is \\host\share\file. MITRE’s T1187, Forced Authentication notes that Windows connecting to an SMB resource authenticates automatically as the current user, typically falling back to WebDAV when SMB is blocked or fails. Its examples include a document loading a remote template and a .lnk or .scf file with a remote icon path. Osanda Malith Jayathissa’s list of hash leak locations adds desktop.ini and .url files, and Thomas Elling of NetSPI used a linked image in a Word document. Check Point Research reported CVE-2025-24054 exploited from March 2025 with a .library-ms file whose search connector points at an attacker’s share, leaking the hash on extraction from an archive; Microsoft’s entry says selecting or right-clicking a file can be enough.
CVE-2023-23397, a critical Outlook on Windows flaw patched in March 2023, is a real case. Microsoft’s guidance says a message sets the PidLidReminderFileParameter MAPI property to a UNC path; when the reminder fires, Outlook connects over SMB on TCP port 445 and leaks the user’s Net-NTLMv2 hash, with no interaction if Outlook is open. WebDAV does not send the hash to internet addresses, so outbound SMB is the route.
A lab run
Run Responder as root on a Linux VM at 192.0.2.50. On a Windows VM in corp.lab.example, open \\192.0.2.50\lure from the Run box: an address needs no name resolution, so Responder’s SMB server challenges the client and prints the NetNTLMv2 line. For the proxy path, run -Pvd on an isolated segment with automatic proxy detection on in the VM: Responder’s DHCP answer carries the script URL and its proxy sends the 407 challenge. Delete logs/ and Responder.db afterwards.
Responder commands
Checked against Responder v3.2.2.0, the latest tag at the time of writing (commit fb29fe25, read in Responder.py, Responder.conf, settings.py, packets.py, servers/ and poisoners/DHCP.py). Run these only on an isolated lab segment with RespondTo set to your test host; the default answers every name asked on the segment.
sudo python3 Responder.py -I eth0 -v
sudo python3 Responder.py -I eth0 -Av
sudo python3 Responder.py -I eth0 -wFv
sudo python3 Responder.py -I eth0 -Pv
sudo python3 Responder.py -I eth0 -Pvd-Iselects the interface and-vadds detail.-Avshows requests without answering.-wFvruns the rogue proxy with authentication onwpad.dat;-Pvruns the proxy-auth server.-Pvdadds DHCP injection, for an isolated segment only.- The SMB lure needs no flag:
SMBandHTTPdefault toOninResponder.conf.
Detection and defence
Install the March 2023 Outlook update and the 11 March 2025 Windows update first; the controls below cover what patching does not. Where proxies are set by policy, turn WPAD off: Microsoft’s How to disable HTTP proxy features documents a DisableWpad DWORD of 1 under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp from Windows Server 2019 and Windows 10 version 1809. It covers WinHTTP only, so also turn off automatic detection in the Windows proxy settings. The same page shows Windows 11 and Windows Server 2022 refusing proxy schemes through DisableProxyAuthenticationSchemes (Basic 0x1, NTLM 0x4), the only two schemes Responder’s 407 offers. If you keep WPAD, publish a real wpad host so nobody else can register the name, the MS09-008 workaround. On Windows DNS that means removing wpad from the global query block list, which by default holds isatap and wpad (dnscmd); otherwise leave it there. Against rogue DHCP, MITRE’s T1557.003 advises DHCP snooping on switches, and its DET0468 detects offers from servers that are not yours.
For UNC lures, block outbound SMB at the perimeter, on local firewalls and in VPN settings: it is M1037 on MITRE’s T1187 page (TCP 139 and 445, UDP 137, and WebDAV) and one of Microsoft’s two CVE-2023-23397 mitigations, beside Protected Users. Add privileged accounts to the Protected Users Security Group: members’ devices stop caching the NT one-way function NTLM needs, though an application that prompts can still succeed, and domain controllers refuse them NTLM. It needs a Windows Server 2012 R2 domain functional level and can break NTLM-dependent applications. Set Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers to Audit all, then Deny all, listing exceptions in Network security: Restrict NTLM: Add remote server exceptions for NTLM authentication.
To detect, MITRE’s DET0022 looks for lure files in user-visible places and outbound SMB or WebDAV to untrusted hosts, repeated across users or from privileged workstations. Watch egress logs for TCP 445 and the Microsoft\Windows\NTLM log. Microsoft’s CVE-2023-23397 guidance adds the ServerName of events 30800, 30803, 30804, 30806 and 31001 in Microsoft-Windows-SMBClient/Connectivity, and rundll32.exe running davclnt.dll,DavSetCookie on WebDAV fallback. The Network and Active Directory Ultimate Course covers SMB signing and detecting credential theft.
Where to go next
Captured responses are most dangerous when relayed, which NTLM relay covers. The Network and Active Directory Ultimate Course goes on to the relay list and stopping credential theft. For the wider workflow, see Penetration Testing Field Notes.
This article replaces the KSEC ARK notes first published in 2019.
More from this author
- One capture, three questions2 December, 2026
- Payload channels versus timing channels2 December, 2026
