Detection rules › Sigma
Failed Event Log Clear Via WMI NTEventLogFile ClearEventLog
Detects failed attempts to clear Windows event logs via the WMI NTEventLogFile ClearEventLog method. Event 5858 in the WMI-Activity operational log is an error event, meaning it is only generated when the WMI operation encounters an error (e.g. access denied, provider failure). It could be an indication of an attacker attempting to clear event logs via WMI, but failing due to insufficient privileges or other issues. Successful clearing operations will NOT produce this event; for those, correlate with Security event 1102 or System event 104.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry coverage
Rule body
title: Failed Event Log Clear Via WMI NTEventLogFile ClearEventLog
id: d4f1a2b3-7c8e-4d5f-b6a9-1e0c2d3f4e5b
status: test
description: |
Detects failed attempts to clear Windows event logs via the WMI NTEventLogFile ClearEventLog method.
Event 5858 in the WMI-Activity operational log is an error event, meaning it is only generated
when the WMI operation encounters an error (e.g. access denied, provider failure).
It could be an indication of an attacker attempting to clear event logs via WMI, but failing due to insufficient privileges or other issues.
Successful clearing operations will NOT produce this event; for those, correlate with
Security event 1102 or System event 104.
references:
- https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/cleareventlog-method-in-class-win32-nteventlogfile
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2026-07-01
tags:
- attack.defense-impairment
- attack.t1685.005
logsource:
product: windows
service: wmi
detection:
selection:
EventID: 5858
Operation|contains|all:
- 'Win32_NTEventlogFile'
- 'cleareventlog'
condition: selection
falsepositives:
- Unknown
level: medium
regression_tests_path: regression_data/rules/windows/builtin/wmi/win_wmi_activity_nteventlogfile_cleareventlog/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID: 5858
Operation|contains|all:
- 'Win32_NTEventlogFile'
- 'cleareventlog'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Operation | match |
| field:"Operation" kind:match |