Windows File Sharing Vulnerabilities
Windows file sharing permissions are based on the popular Discretionary Access Control (DAC) model, this essentially means that the owner of the resource uses his or her discretion when deciding who should be permitted access. Access is granted to either an individual user or a group of users, unfortunately file shares are rarely configured with security as a top priority and the course of least resistance is often applied. Vulnerabilities commonly arise when access to a confidential resource is granted to a group containing users who should not permitted to access it, or generalised group such as “Everyone” has erroneously been included.
Download: ShareCheck
Sec-1 ShareCheck
Sec-1 ShareCheck was written during a penetration test to assess a given IP Address range for weak file share permissions. The output of the tool produces a HTML table containing:
- The IP Address
- Account Lockout Threshold
- A list of Local Administrators
- Shares which the supplied user can access
- Shares which the supplied user can write to
In the course of a penetration test local administrator accounts could then be targeted in an attempt to compromise the host and network.
Usage
ShareCheck is a command line tool written in Python.
To use ShareCheck configure a user account with limited permissions, i.e. a regular user. The results of running ShareCheck will illustrate what this user can and cannot access.
Command line example:
Assess the IP range 192.168.0.1-254 using the username “Bob” and the password “datastealer” and will save the results in report.html:
sharecheck.exe 192.168.1.0/24 bob datastealer report.html