Listing supported SMB protocols
SMB servers negotiate the dialect version before each connection. Therefore, we can determine the supported protocol dialects in SMB servers remotely. Nmap can determine whether a server supports older and insecure protocols such as SMB1 and even troubleshoot SMB servers.
This recipe shows how to list the supported SMB dialects in a server with Nmap.
How to do it...
Open your terminal and enter the following Nmap command:
$ nmap -p445 --script smb-protocols <target>
The scan results will include the available SMB dialects of that server:
| smb-protocols: | dialects: | NT LM 0.12 (SMBv1) [dangerous, but default] | 2.0.2 | 2.1 | 3.0 | 3.0.2 |_ 3.1.1
How it works...
The smb-protocols
script attempts to initiate a connection using the following...