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
.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.
On Mac, locally mounted shares can be viewed with the
df -aH
command.Cloud virtual networks may contain remote network shares or file storage services accessible to an adversary after they have obtained access to a system. For example, AWS, GCP, and Azure support creation of Network File System (NFS) shares and Server Message Block (SMB) shares that may be mapped on endpoint or cloud-based systems.(Citation: Amazon Creating an NFS File Share)(Citation: Google File servers on Compute Engine)
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
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
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 Supported Platforms: Windows
net share