Guide

Turn off LLMNR

When a Windows PC cannot find a name in DNS, it asks every machine on its network instead. Any machine can answer, including one run by an attacker. Turning off LLMNR stops PCs asking.

10 minutesRun as a domain admin on CON-DC-01
What improves

PCs stop asking the local network for names DNS cannot find.

Why it matters

Any machine can answer those requests and collect password hashes.

How you do it

Create one policy linked to the domain that turns LLMNR off.

How the attack works

A member of staff mistypes a server name. DNS has no answer, so the PC asks the local network. An attacker's laptop replies "that is me", and the PC tries to sign in to it, handing over a password hash the attacker can crack.

Create the policy for the whole domain

CON-DC-01
$dom = Get-ADDomain
New-GPO -Name 'CON-LLMNR-Disable' -Comment 'Turns off LLMNR name resolution on all domain computers' |
    New-GPLink -Target $dom.DistinguishedName | Out-Null
Set-GPRegistryValue -Name 'CON-LLMNR-Disable' -Key 'HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient' -ValueName 'EnableMulticast' -Type DWord -Value 0 | Out-Null

The policy is linked to the domain, so servers and PCs all pick it up at their next policy refresh.

Apply it now on the domain controllers

CON-DC-01
Invoke-Command -ComputerName (Get-ADDomainController -Filter *).HostName -ScriptBlock { gpupdate /force | Out-Null }

Check a computer

Run this on any domain computer after its policy has refreshed.

Any domain computer
(Get-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient').EnableMulticast

It should return 0.

What changes for users

Nothing, as long as DNS is working. Names that are not in DNS stop resolving, so add a DNS record for any device people reach by name.

Done when

Check

The value reads 0 on both domain controllers and on a test PC.

Your progress is kept in this browser only.