Detection rules › Sigma

Potentially Suspicious Call To Win32_NTEventlogFile Class

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

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

MITRE ATT&CK coverage

TacticTechniques
Defense ImpairmentNo specific technique

Event coverage

Rule body yaml

title: Potentially Suspicious Call To Win32_NTEventlogFile Class
id: caf201a9-c2ce-4a26-9c3a-2b9525413711
related:
    - id: e2812b49-bae0-4b21-b366-7c142eafcde2
      type: similar
status: test
description: Detects usage of the WMI class "Win32_NTEventlogFile" in a potentially suspicious way (delete, backup, change permissions, etc.) from a PowerShell script
references:
    - https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa394225(v=vs.85)
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-07-13
tags:
    - attack.defense-impairment
logsource:
    category: process_creation
    product: windows
detection:
    selection_class:
        CommandLine|contains: 'Win32_NTEventlogFile'
    selection_function:
        CommandLine|contains:
            - '.BackupEventlog('
            - '.ChangeSecurityPermissions('
            - '.ChangeSecurityPermissionsEx('
            - '.ClearEventLog('
            - '.Delete('
            - '.DeleteEx('
            - '.Rename('
            - '.TakeOwnerShip('
            - '.TakeOwnerShipEx('
    condition: all of selection_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_class

selection_class:
    CommandLine|contains: 'Win32_NTEventlogFile'

Stage 2: selection_function

selection_function:
    CommandLine|contains:
        - '.BackupEventlog('
        - '.ChangeSecurityPermissions('
        - '.ChangeSecurityPermissionsEx('
        - '.ClearEventLog('
        - '.Delete('
        - '.DeleteEx('
        - '.Rename('
        - '.TakeOwnerShip('
        - '.TakeOwnerShipEx('

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
  • .BackupEventlog(
  • .ChangeSecurityPermissions(
  • .ChangeSecurityPermissionsEx(
  • .ClearEventLog(
  • .Delete(
  • .DeleteEx(
  • .Rename(
  • .TakeOwnerShip(
  • .TakeOwnerShipEx(
  • Win32_NTEventlogFile