Detection rules › Sigma
Password Set to Never Expire via WMI
Detects the use of wmic.exe to modify user account settings and explicitly disable password expiration.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1047 Windows Management Instrumentation |
| Persistence | T1098 Account Manipulation |
| Privilege Escalation | T1098 Account Manipulation |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process 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.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|
Image | ends_with |
|
OriginalFileName | eq |
|