The Mindset
SMB (Server Message Block) is the protocol Windows uses for file and printer sharing. It runs on TCP 445. For a pentester, SMB is valuable because:- Shares hold sensitive files — backups, password spreadsheets, deployment scripts with embedded credentials
- Shares enable lateral movement — write access to the right share spreads your payload
- SMB is a historic vulnerability magnet — EternalBlue and friends live here
Enumerating Shares — Locally
If you’re already on a Windows box:Enumerating Shares — From Linux
This is how you’ll usually do it during external/internal assessments.smbclient — List and Browse
crackmapexec / netexec — The Power Tool
netexec (the maintained successor to crackmapexec) is the fastest way to enumerate SMB across one host or a whole subnet:
Mounting a Share on Linux
NTFS vs Share Permissions — Again
This came up on the Permissions & icacls page, and it’s critical for SMB. When you access a file over the network, both permission layers apply and the most restrictive wins:
So a share might be set to “Everyone: Full Control” at the share level — but if NTFS only grants you Read on the files inside, you get Read. This is why you check both, and why a wide-open share permission doesn’t always mean wide-open files.
Windows Defender Firewall
The firewall controls what’s reachable. Understanding its state tells you what you can connect to and what might be blocking your callbacks.SMB Vulnerabilities — Know the Classics
SMB has a long history of critical vulnerabilities. You don’t need exploit internals, but you should recognize the names and check for them:Next: The Windows Registry — the central config database, where persistence lives and credentials sometimes hide.