Detection rules › Sigma

Password Set to Never Expire via WMI

Status
experimental
Severity
medium
Log source
product windows, category process_creation
Author
Daniel Koifman (KoifSec)
Source
github.com/SigmaHQ/sigma

Detects the use of wmic.exe to modify user account settings and explicitly disable password expiration.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Password Set to Never Expire via WMI
id: 7864a175-3654-4824-9f0d-f0da18ab27c0
status: experimental
description: |
    Detects the use of wmic.exe to modify user account settings and explicitly disable password expiration.
references:
    - https://www.huntress.com/blog/the-unwanted-guest
author: "Daniel Koifman (KoifSec)"
date: 2025-07-30
tags:
    - attack.privilege-escalation
    - attack.execution
    - attack.persistence
    - attack.t1047
    - attack.t1098
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:   # Example command simulated:  wmic  useraccount where name='guest' set passwordexpires=false
        - Image|endswith: '\wmic.exe'
        - OriginalFileName: 'wmic.exe'
    selection_cli:
        CommandLine|contains|all:
            - 'useraccount'
            - ' set '
            - 'passwordexpires'
            - 'false'
    condition: all of selection_*
falsepositives:
    - Legitimate administrative activity
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

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

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - 'useraccount'
        - ' set '
        - 'passwordexpires'
        - 'false'

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
  • set corpus 4 (sigma 4)
  • false
  • passwordexpires
  • useraccount corpus 4 (sigma 2, splunk 1, chronicle 1)
Imageends_with
  • \wmic.exe corpus 60 (sigma 60)
OriginalFileNameeq
  • wmic.exe corpus 61 (sigma 36, splunk 18, elastic 7)