Sigma rule: Potentially Suspicious Call To Win32_NTEventlogFile Class - PSScript

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-f42c236e52b8, updated 2023-07-13T00:00:00.000Z.

Rule

Title
Potentially Suspicious Call To Win32_NTEventlogFile Class - PSScript
Status
test
Level
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Date
2023-07-13
File
rules/windows/powershell/powershell_script/posh_ps_win32_nteventlogfile_usage.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects usage of the WMI class "Win32_NTEventlogFile" in a potentially suspicious way (delete, backup, change permissions, etc.) from a PowerShell script

Log source

product
windows
category
ps_script
definition
bade5735-5ab0-4aa7-a642-a11be0e40872

Detection

selection_class:
    ScriptBlockText|contains: 'Win32_NTEventlogFile'
selection_function:
    ScriptBlockText|contains:
        - '.BackupEventlog('
        - '.ChangeSecurityPermissions('
        - '.ChangeSecurityPermissionsEx('
        - '.ClearEventLog('
        - '.Delete('
        - '.DeleteEx('
        - '.Rename('
        - '.TakeOwnerShip('
        - '.TakeOwnerShipEx('
condition: all of selection_*

False positives (as the rule lists them)

  • Legitimate administration and backup scripts

Tags

  • attack.defense-impairment

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_win32_nteventlogfile_usage.yml

Sources and licences

  • SigmaHQ

    "Potentially Suspicious Call To Win32_NTEventlogFile Class - PSScript" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_win32_nteventlogfile_usage.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Potentially Suspicious Call To Win32_NTEventlogFile Class - PSScript",
entity page, dataset version ref-f42c236e52b8, updated 2023-07-13T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/e2812b49-bae0-4b21-b366-7c142eafcde2 (accessed 2026-11-03).
Underlying source: SigmaHQ rule e2812b49-bae0-4b21-b366-7c142eafcde2, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.