the_open_door
coffee
ESEN
← Back to index

SMB Signing

ATT&CKT1557.001

SMB signing is the one setting that separates a healthy domain from one where any captured authentication is as good as access. It is a configuration switch, not an attack technique, but it decides whether NTLM relay works, so enumerating it is the first step of that whole family.

Mechanism. When a client and a server negotiate an SMB session they agree whether every message will be signed with a key derived from the session. With signing required, an attacker relaying the handshake to another server cannot continue the conversation: they do not have the session key and the first signed message fails. With signing merely enabled (the client decides) or disabled, the relay completes.

Windows defaults explain why an internal network nearly always has targets: domain controllers require signing, and every other server and workstation does not.

Enumerating who signs is what produces the relay target list:


netexec smb <subnet> --gen-relay-list targets.txt
nmap -p445 --script smb2-security-mode <subnet>
SMB  10.10.10.20  445  DC01    [*] Windows Server 2019 (signing:True)  (SMBv1:False)
SMB  10.10.10.35  445  SRV-FS  [*] Windows Server 2019 (signing:False) (SMBv1:False)
SMB  10.10.10.52  445  WS-01   [*] Windows 10 22H2     (signing:False) (SMBv1:False)

signing:False is the tell: those two hosts will accept a relayed session.

How to detect it. What gets detected is not the enumeration but its consequence. A 4624 type 3 with the NTLM package on a server whose source is a machine that never talks to it, and above all several authentications from the same account reaching different hosts within seconds, is the relay pattern. The preceding sweep also leaves many consecutive null SMB sessions across the range, visible as 5140 or as a burst of connections to 445.

Defence. Require signing on every machine, not just on domain controllers, through the Microsoft network server: Digitally sign communications (always) policy. Where LDAP is exposed, also turn on LDAP signing and channel binding, because the relay to LDAP is the one that grants RBCD. Disabling NTLM where possible is the structural fix; signing is the one that can be applied today.