Detecting whether encryption is enforced in SMB servers
SMB2/3 servers support different features, and we can list those capabilities to check some aspects of their configuration security. Encryption is supported in SMB3 connections, but not everyone uses encryption as it slows down traffic.
This recipe shows how to detect whether encryption is enabled in SMB servers with Nmap.
How to do it...
Open your terminal and enter the following Nmap command:
$ nmap -p445 --script smb2-capabilities <target>
The scan results will include the detected features in the response:
| smb2-capabilities: | 3.1.1: | Distributed File System | Leasing | Multi-credit operations | Encryption
How it works...
The script reads the response to the SMB SMB2_COM_NEGOTIATE
command and parses the field describing the server capabilities. This technique...