π§ Introduction
What is SMB Signing?
SMB Signing is a security mechanism in Windows that ensures SMB (Server Message Block) traffic is cryptographically signed. This prevents attackers from tampering with SMB communications or launching man-in-the-middle (MitM) attacks.
When SMB Signing is disabled or not required, an attacker can hijack SMB sessions, relay NTLM hashes, or inject malicious payloads.
Why Itβs Important
- π‘οΈ Unsigned SMB traffic can be intercepted, manipulated, or relayed by attackers.
- π§βπ» Exploited during lateral movement, NTLM relay attacks, and credential harvesting.
- π’ Common in internal network attacks, red team ops, and real-world breaches.
Example:
βAn attacker inside the network could impersonate a legitimate server, capture NTLM hashes from clients, and use them to authenticate against other systems β even without knowing the password.β
βοΈ Technical Explanation (For IT Professionals)
Root Cause
The SMB service (client or server) is configured to either:
- Not require signing (optional mode), or
- Not support it at all.
This allows connections to proceed unsigned, exposing traffic to attacks.
How It Works (Attack Path)
- Attacker positions themselves in the same subnet (e.g., ARP spoofing or rogue device).
- Client connects to SMB server without signing enforced.
- Attacker captures credentials, relays NTLM hashes, or injects malicious traffic.
- Domain compromise or lateral movement follows.
π§ͺ Detection and Verification
1. Manual Check
π On the SMB Server:
Get-SmbServerConfiguration | Select EnableSecuritySignature, RequireSecuritySignature

π On the Client:
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" | Select EnableSecuritySignature, RequireSecuritySignature

2. Using Tools
- π Nessus Plugin: SMB Signing not required (Plugin ID 57608, 57609)
- π Nmap:
nmap --script smb2-security-mode.nse -p 445 <target-ip>
Message signing enabled but not required= vulnerable
π οΈ Step-by-Step Fix Guide
π§© Step 1 β Identify the Affected System
Use the PowerShell commands above to audit all clients and servers.
π§© Step 2 β Backup Registry (Clients)
reg export "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" C:\lanman-backup.reg
π§© Step 3 β Apply the Fix
β Option A: Fix via PowerShell
π Server Fix:
Set-SmbServerConfiguration -EnableSecuritySignature $true -RequireSecuritySignature $true -Force

π Client Fix:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name EnableSecuritySignature -Value 1 -PropertyType DWORD -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name RequireSecuritySignature -Value 1 -PropertyType DWORD -Force

Restart the system to apply the changes.
β Option B: Fix via Group Policy (Domain-Wide)
- Run
gpmc.msc

Go to:
Computer Configuration > Windows Settings > Security Settings > Local Policies > Security OptionsSet the following policies to Enabled:
| Policy Name | Value |
|---|---|
| Microsoft network client: Digitally sign communications (always) | Enabled |
| Microsoft network server: Digitally sign communications (always) | Enabled |

- Run:
gpupdate /force

π Prevention & Hardening
β
Disable SMBv1
β
Enforce SMB signing on all endpoints
β
Use EDR to monitor for relay/mitm
β
Use SMB over QUIC (encrypted, signed transport) in modern environments
β
Block SMB externally (always)
π Risk & Impact Summary
| Impact Type | Description |
|---|---|
| Confidentiality | Can expose credentials (NTLM hashes) |
| Integrity | SMB traffic can be tampered with |
| Availability | Service abuse or session hijacking |
| Business Impact | Lateral movement and full domain compromise |
π§± Standards Mapping (Reference Frameworks)
| Framework | Reference |
|---|---|
| CVE | (None - misconfiguration) |
| CWE | CWE-300 β Channel Accessible by Non-Endpoint |
| MITRE ATT&CK | T1040 β Network Sniffing |
| OWASP | A05 β Security Misconfiguration |
| SAMA CSF | CSC 6.2.5 β Secure Protocol Configuration |
| NIST | AC-17 β Remote Access |
π§ Verification After Fix
Re-run:
Get-SmbServerConfiguration
Expected:
RequireSecuritySignature : True

Or scan with Nessus / Nmap again to confirm no longer flagged.
π§© Additional Tips
- Use
Group Policy Results Wizardto verify applied policies - Add auditing for unsigned SMB sessions (Event ID 4624 + 5140)
- Rotate privileged credentials if NTLM hashes were exposed
π¬ FAQ
Q1: Will this break legacy apps?
Some older apps relying on SMBv1 or unsigned connections may fail. Test first.
Q2: Is this enough to stop NTLM relay?
No β combine with NTLM hardening, SMB encryption, and relay mitigations like EPA.
π References & Resources
βοΈ Legal & Ethical Note
This guide is for authorized environments only. Never apply changes to systems you donβt control or without written permission. Unauthorized testing is illegal.
βοΈ Authorβs Note
Written by Khaled AlβRefaee (Ozex)
Cybersecurity Consultant | Red Team Operator | Offensive Security Professional
π ozex.gitlab.io
β Buy me a coffee
