Detection rules › Sigma

Service Started/Stopped Via Wmic.EXE

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

Detects usage of wmic to start or stop a service

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Service Started/Stopped Via Wmic.EXE
id: 0b7163dc-7eee-4960-af17-c0cd517f92da
status: test
description: Detects usage of wmic to start or stop a service
references:
    - https://sushant747.gitbooks.io/total-oscp-guide/content/privilege_escalation_windows.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-06-20
modified: 2023-02-14
tags:
    - attack.execution
    - attack.t1047
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'wmic.exe'
        - Image|endswith: '\WMIC.exe'
    selection_cli:
        CommandLine|contains|all:
            - ' service '
            - ' call '
        CommandLine|contains:
            - 'stopservice'
            - 'startservice'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

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

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - ' service '
        - ' call '
    CommandLine|contains:
        - 'stopservice'
        - 'startservice'

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
  • call corpus 2 (sigma 1, splunk 1)
  • service corpus 2 (sigma 2)
  • startservice
  • stopservice
Imageends_with
  • \WMIC.exe corpus 60 (sigma 60)
OriginalFileNameeq
  • wmic.exe corpus 61 (sigma 36, splunk 18, elastic 7)