On modern corporate networks and mobile workstations, legacy local name resolution protocols represent one of the most severe security liabilities in Windows environments. When a workstation attempts to connect to an internal server or network share and DNS fails to resolve the hostname, Windows automatically falls back to broadcast protocols: LLMNR (Link-Local Multicast Name Resolution) and NetBIOS over TCP/IP (NBT-NS).
Adversaries on the same local subnet or rogue Wi-Fi network exploit this fallback mechanism using network poisoning tools such as Responder. By answering these unauthenticated broadcast queries, attackers spoof the destination server, intercept NTLMv2 challenge-response hashes, and conduct relay or offline cracking attacks. Disabling both protocols eliminates this entire attack vector.
Auditing Current NetBIOS Status via PowerShell
Before applying remediation changes, query your network adapters to inspect their current NetBIOS configuration:
- Right-click the Start menu and select Terminal (Admin) or PowerShell (Admin).
- Execute the following CIM query to display adapter NetBIOS states:
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration | Where-Object { $_.IPEnabled -eq $true } | Select-Object Description, TcpipNetbiosOptions
The TcpipNetbiosOptions property returns one of three integer values:
0: Default (Use NetBIOS setting from DHCP server).1: Enabled (NetBIOS over TCP/IP is active).2: Disabled (NetBIOS over TCP/IP is completely disabled).
Disabling NetBIOS over TCP/IP on All Active Adapters
To permanently disable NetBIOS across all current and future network interfaces via PowerShell:
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration | Where-Object { $_.IPEnabled -eq $true } | ForEach-Object {
$result = $_ | Invoke-CimMethod -MethodName SetTcpipNetbios -Arguments @{ TcpipNetbiosOptions = 2 }
[PSCustomObject]@{
Adapter = $_.Description
ReturnValue = $result.ReturnValue
}
}
A ReturnValue of 0 indicates that NetBIOS over TCP/IP was successfully disabled on the corresponding network interface.
Disabling LLMNR via Group Policy and Registry
LLMNR operates on UDP port 5355 and must be disabled through the Windows DNS Client policy:
- To configure LLMNR globally via PowerShell registry enforcement, run:
$regPath = "HKLM:SOFTWAREPoliciesMicrosoftWindows NTDNSClient" if (!(Test-Path $regPath)) { New-Item -Path $regPath -Force | Out-Null } Set-ItemProperty -Path $regPath -Name "EnableMulticast" -Value 0 -Type DWord -Force - Setting
EnableMulticastto0informs the Windows DNS client to never broadcast multicast queries when standard unicast DNS fails.
Verifying Configuration via Group Policy Editor
If you prefer verifying or managing this setting via the graphical policy management console:
- Press Windows + R, type
gpedit.msc, and press Enter. - Navigate to:
Computer Configuration > Administrative Templates > Network > DNS Client - Locate the policy named Turn off multicast name resolution.
- Double-click the policy, select Enabled, and click OK.
Flushing DNS and Testing Name Resolution
After disabling both protocols, refresh system network policies and clear the local DNS resolver cache:
gpupdate /force
Clear-DnsClientCache
To verify that broadcast queries are no longer emitted, ping a non-existent internal hostname (e.g. ping fakeinternalhostxyz123). Windows should immediately return an authoritative DNS failure without pausing to send broadcast packets over UDP 5355 or UDP 137.