SMB is a protocol that allows you to share your resources to other computers over the network.
SMB ( Server Message Block ) Commonly runs on ports 139 or 445.
You can use an nmap scan to determine the status of these ports and to check if they are open:
kali@kali:~$nmap-v-n-sn<host>/<range>|grep-v"host down"# This provides a list of IP's on a given range# We can take on of the IP's to do a port scankali@kali:~$nmap-v-n-Pn<host>PORTSTATESERVICE21/tcpopenftp22/tcpopenssh139/tcpopennetbios-scn# SMB Port445/tcpopenmicrosoft-ds# SMB Port# You can scan specifically for those portskali@kali:~$nmap-n-v-Pn-p139,445<host>PORTSTATESERVICE139/tcpopennetbios-scn# SMB Port445/tcpopenmicrosoft-ds# SMB Port# Now with version scankali@kali:~$nmap-n-v-Pn139,445-sV<host>PORTSTATESERVICEVERSION139/tcpopennetbios-scnSambasmbd3.X-4.X (wokrgroup: Workgroup)445/tcpopenmicrosoft-dsSambasmbd3.X-4.X (wokrgroup: Workgroup)
We can attempt to use the nse default scripts to check for vulnerabilities