Enumerating shared folders
Shared folders in organizations are widespread, and poor data storage practices among users present a significant risk. Even if the shared folder isn't entirely open to the world, it is not uncommon to find misconfigured permissions that expose sensitive information.
This recipe shows how to list shared folders of Windows machines with Nmap.
How to do it...
Open your terminal and enter the following Nmap command:
$ nmap -p139,445 --script smb-enum-shares --script-args smbusername=Administrator,smbpassword=Password <target>
A list of shares will be returned, including their permissions:
Host script results: | smb-enum-shares: |Â Â Â Â Â account_used: WORKGROUP\Administrator |Â Â Â Â Â ADMIN$ |Â Â Â Â Â Type: STYPE_DISKTREE_HIDDEN |Â Â Â Â Â Comment: Remote Admin |Â Â Â Â Â Users: 0 |Â Â Â Â Â Max Users: <unlimited...