Obtaining system information from SMB
SMB is a protocol commonly found in Microsoft Windows clients that has matured through the years. Despite the newer versions available, SMBv1 can still be found enabled in most systems for compatibility reasons. SMBv1 has an interesting feature that been abused for years, that is that SMBv1 servers return system information without authentication. The information available includes Windows version, build number, NetBIOS computer name, workgroup, and exact system time. This is useful information as it allows us to fingerprint systems without the noise from OS detection scan.
This recipe shows how to obtain system information from SMB with Nmap.
How to do it...
Open your terminal and enter the following Nmap command:
$ nmap -p139,445 --script smb-os-discovery <target>
The script smb-os-discovery
will return valuable system information if SMBv1 is enabled:
PORT STATE SERVICE 445/tcp open microsoft-ds MAC Address: 9C:2A:70:10:84:BF (Hon Hai...