Windows.System.Shares
Type: Client · Author: Matt Green - @mgreen27
Enumerates Windows network shares via the Win32_Share WMI class with regex filtering.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
NameRegex |
regex | . |
Regex filter for share name. e.g Admin\$ for Admin$ |
PathRegex |
regex | . |
Regex filter for local path. e.g C:\Windows$ for Admin$ |
Source
Defined in artifacts/definitions/Windows/System/Shares.yaml.
name: Windows.System.Shares
author: 'Matt Green - @mgreen27'
description: |
Enumerates Windows network shares via the Win32_Share WMI class
with regex filtering.
type: CLIENT
parameters:
- name: NameRegex
description: Regex filter for share name. e.g Admin\$ for Admin$
default: .
type: regex
- name: PathRegex
description: Regex filter for local path. e.g C:\\Windows$ for Admin$
default: .
type: regex
sources:
- precondition:
SELECT OS From info() where OS = 'windows'
query: |
SELECT Name, Path, Caption, Status,MaximumAllowed,AllowMaximum,InstallDate
FROM wmi(query='SELECT * FROM Win32_Share',namespace='root/cimv2')
WHERE Name =~ NameRegex AND Path =~ PathRegex