Suspicious WMIC Unquoted Services Path Lookup - PowerShell (via ps_script)

This rule detects known WMI recon method to look for unquoted service paths, frequently used by pentest inside of powershell scripts adversaries enum scripts

SigmamediumWindowsv1
sigma
title: Suspicious WMIC Unquoted Services Path Lookup - PowerShell (via ps_script)
id: 068bde2f-cb03-5808-b0d1-7e89f45a8f9a
status: stable
description: This rule detects known WMI recon method to look for unquoted service paths, frequently used by pentest inside of powershell scripts adversaries enum scripts
references:
    - https://attack.mitre.org/techniques/T1047/
    - https://github.com/nccgroup/redsnarf/blob/35949b30106ae543dc6f2bc3f1be10c6d9a8d40e/redsnarf.py
    - https://github.com/S3cur3Th1sSh1t/Creds/blob/eac23d67f7f90c7fc8e3130587d86158c22aa398/PowershellScripts/jaws-enum.ps1
    - https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/
author: Huntrule Team
date: 2026-03-07
tags:
    - attack.execution
    - attack.t1047
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains:
            - 'Get-WmiObject '
            - 'gwmi '
        ScriptBlockText|contains|all:
            - ' Win32_Service '
            - 'Name'
            - 'DisplayName'
            - 'PathName'
            - 'StartMode'
    condition: selection
falsepositives:
    - Unknown
level: medium

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.