Skip to content
Please update to the latest release 0.77.3 to address Multiple CVEs.
Windows.System.Shares

Windows.System.Shares

Enumerates Windows network shares via the Win32_Share WMI class with regex filtering.


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