ports/445
445/tcp
SMB · Microsoft-DS
Windows file sharing, named pipes and remote administration, straight over TCP. On an internal network it's usually the most useful port you'll find: it gives you users, shares and, if signing isn't required, a place to relay credentials.
ProtocolTCP
Servicemicrosoft-ds
Also on139/tcp
Default onWindows, Samba
AuthNTLM, Kerberos
SigningOptional except on DCs
Dialects1.0 – 3.1.1
01
Enumerate
start hereFind the dialect and whether signing is required, then see what an anonymous or low-privilege user can reach.
# dialects, signing and OS nmap -p 445 --script smb2-security-mode,smb-protocols,smb-os-discovery $IP # shares as anonymous, then as your user nxc smb $IP -u '' -p '' --shares nxc smb $IP -u $USER -p $PASS --shares --users --pass-pol # browse a readable share smbclient //$IP/IT -U '$DOMAIN\$USER'
02
Weaknesses
check each one CHECK HOW TO TELL WHAT IT GIVES YOU
Signing not required
signing:False · "enabled but not required" NTLM relay to this host Null session allowed
--shares works with -u '' -p '' Users, groups, password policy SMBv1 enabled
smb-protocols lists NT LM 0.12 MS17-010 era bugs Readable shares
READ on anything but IPC$ Scripts, configs, saved creds Writable shares
WRITE on a share users open Drop .lnk/.scf to capture hashes 03
Attack path
the common route onward 04
Notable CVEs
hand-picked, not exhaustive 05
Detect & harden
Detect
- Event
4624logon type 3 from unexpected hosts - One source authenticating to many hosts in seconds
- LLMNR and NBT-NS responses from workstations
Harden
- Require signing on every host, not just DCs
- Disable SMBv1, LLMNR and NBT-NS
- Block 445 at the perimeter and between workstations
SMB is the backbone of Windows networking, so port 445 is where a huge amount of an internal engagement happens: reading shares, enumerating the domain over RPC, moving laterally with recovered hashes, and relaying authentication. Treat the signing setting as the first thing you check — it decides whether the host is a relay target or not.