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.
Known false positives
- Legitimate administrative activity
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Privilege Escalation |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule body
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
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\wmic.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"wmic.exe" |