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...