Using nmap
Nmap SMB NSE Scripts :- ls /usr/share/nmap/scripts/smb*
Ex:- nmap -v -p 139, 445 --script=smb-os-discovery 10.11.1.227
nmap -v -p 139,445 --script smb-vuln* 10.11.1.5
- nmap --script smb-enum-shares.nse -p445 10.10.10.123
- this will give directory in which this share lies