Detection rules › Sigma

Service Reconnaissance Via Wmic.EXE

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
frack113, Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

An adversary might use WMI to check if a certain remote service is running on a remote device. When the test completes, a service information will be displayed on the screen if it exists. A common feedback message is that "No instance(s) Available" if the service queried is not running. A common error message is "Node - (provided IP or default) ERROR Description =The RPC server is unavailable" if the provided remote host is unreachable

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Service Reconnaissance Via Wmic.EXE
id: 76f55eaa-d27f-4213-9d45-7b0e4b60bbae
related:
    - id: 68bcd73b-37ef-49cb-95fc-edc809730be6
      type: similar
status: test
description: |
    An adversary might use WMI to check if a certain remote service is running on a remote device.
    When the test completes, a service information will be displayed on the screen if it exists.
    A common feedback message is that "No instance(s) Available" if the service queried is not running.
    A common error message is "Node - (provided IP or default) ERROR Description =The RPC server is unavailable" if the provided remote host is unreachable
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1047/T1047.md
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/wmic
    - https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-service
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2023-02-14
modified: 2026-01-07
tags:
    - attack.execution
    - attack.t1047
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\WMIC.exe'
        - OriginalFileName: 'wmic.exe'
    selection_cli:
        CommandLine|contains: 'service'
    filter_main_win32_methods:
        CommandLine|contains:
            - 'Change'
            - 'Create'
            - 'Delete'
            - 'PauseService'
            - 'ResumeService'
            - 'SetSecurityDescriptor'
            - 'StartService'
            - 'StopService'
            - 'UserControlService'
    condition: all of selection_* and not 1 of filter_main_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_main_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\WMIC.exe'
    - OriginalFileName: 'wmic.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains: 'service'

Stage 3: not filter_main_win32_methods

filter_main_win32_methods:
    CommandLine|contains:
        - 'Change'
        - 'Create'
        - 'Delete'
        - 'PauseService'
        - 'ResumeService'
        - 'SetSecurityDescriptor'
        - 'StartService'
        - 'StopService'
        - 'UserControlService'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematchChange
CommandLinematchCreate
CommandLinematchDelete
CommandLinematchPauseService
CommandLinematchResumeService
CommandLinematchSetSecurityDescriptor
CommandLinematchStartService
CommandLinematchStopService
CommandLinematchUserControlService

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • service corpus 5 (sigma 4, splunk 1)
Imageends_with
  • \WMIC.exe corpus 60 (sigma 60)
OriginalFileNameeq
  • wmic.exe corpus 61 (sigma 36, splunk 18, elastic 7)