Sigma rule: Potentially Suspicious EventLog Recon Activity Using Log Query Utilities

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-cf39805fe45a, updated 2025-12-02T00:00:00.000Z.

Rule

Title
Potentially Suspicious EventLog Recon Activity Using Log Query Utilities
Status
test
Level
medium
Author
Nasreddine Bencherchali (Nextron Systems), X__Junior (Nextron Systems)
Date
2022-09-09
Modified
2025-12-02
File
rules/windows/process_creation/proc_creation_win_susp_eventlog_content_recon.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects execution of different log query utilities and commands to search and dump the content of specific event logs or look for specific event IDs.
This technique is used by threat actors in order to extract sensitive information from events logs such as usernames, IP addresses, hostnames, etc.

Log source

product
windows
category
process_creation

Detection

selection_wmi:
    CommandLine|contains|all:
        - 'Select'
        - 'Win32_NTLogEvent'
selection_wevtutil_img:
    - Image|endswith: '\wevtutil.exe'
    - OriginalFileName: 'wevtutil.exe'
selection_wevtutil_cli:
    CommandLine|contains:
        - ' qe '
        - ' query-events '
selection_wmic_img:
    - Image|endswith: '\wmic.exe'
    - OriginalFileName: 'wmic.exe'
selection_wmic_cli:
    CommandLine|contains: ' ntevent'
selection_cmdlet:
    CommandLine|contains:
        - 'Get-WinEvent '
        - 'get-eventlog '
selection_logs_name:
    CommandLine|contains:
        # Note: Add more event log channels that are interesting for attackers
        - 'Microsoft-Windows-PowerShell'
        - 'Microsoft-Windows-Security-Auditing'
        - 'Microsoft-Windows-TerminalServices-LocalSessionManager'
        - 'Microsoft-Windows-TerminalServices-RemoteConnectionManager'
        - 'Microsoft-Windows-Windows Defender'
        - 'PowerShellCore'
        - 'Security'
        - 'Windows PowerShell'
selection_logs_eid:
    CommandLine|contains:
        # Note: We use the "?" to account for both a single and a double quote
        # Note: Please add additional interesting event IDs
        # Note: As this only focuses on EIDs and we know EIDs are not unique across providers. Rare FPs might occur with legit queries to EIDs from different providers.
        # This covers EID 4624 and 4628 from Security Log
        - '-InstanceId 462?'
        - '.eventid -eq 462?'
        - '.ID -eq 462?'
        - 'EventCode=?462?'
        - 'EventIdentifier=?462?'
        - 'System[EventID=462?]'
        # This covers EID 4778 from Security Log
        - '-InstanceId 4778'
        - '.eventid -eq 4778'
        - '.ID -eq 4778'
        - 'EventCode=?4778?'
        - 'EventIdentifier=?4778?'
        - 'System[EventID=4778]'
        # This covers EID 25 from Microsoft-Windows-TerminalServices-LocalSessionManager/Operational log
        - '-InstanceId 25'
        - '.eventid -eq 25'
        - '.ID -eq 25'
        - 'EventCode=?25?'
        - 'EventIdentifier=?25?'
        - 'System[EventID=25]'
        # This covers EID 1149 from Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational log
        - '-InstanceId 1149'
        - '.eventid -eq 1149'
        - '.ID -eq 1149'
        - 'EventCode=?1149?'
        - 'EventIdentifier=?1149?'
        - 'System[EventID=1149]'
        # This covers EID 21 from Microsoft-Windows-TerminalServices-LocalSessionManager/Operational log
        - '-InstanceId 21'
        - '.eventid -eq 21'
        - '.ID -eq 21'
        - 'EventCode=?21?'
        - 'EventIdentifier=?21?'
        - 'System[EventID=21]'
        # This covers EID 22 from Microsoft-Windows-TerminalServices-LocalSessionManager/Operational log
        - '-InstanceId 22'
        - '.eventid -eq 22'
        - '.ID -eq 22'
        - 'EventCode=?22?'
        - 'EventIdentifier=?22?'
        - 'System[EventID=22]'
condition: 1 of selection_logs_* and (selection_wmi or all of selection_wevtutil_* or all of selection_wmic_* or selection_cmdlet)

False positives (as the rule lists them)

  • Legitimate usage of the utility by administrators to query the event log

Tags

  • attack.credential-access
  • attack.discovery
  • attack.t1552
  • attack.t1087

MITRE ATT&CK ids this rule names

Related rules

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/process_creation/proc_creation_win_susp_eventlog_content_recon.yml

Sources and licences

  • SigmaHQ

    "Potentially Suspicious EventLog Recon Activity Using Log Query Utilities" by Nasreddine Bencherchali (Nextron Systems), X__Junior (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_susp_eventlog_content_recon.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 EventLog Recon Activity Using Log Query Utilities",
entity page, dataset version ref-cf39805fe45a, updated 2025-12-02T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/beaa66d6-aa1b-4e3c-80f5-e0145369bfaf (accessed 2026-11-03).
Underlying source: SigmaHQ rule beaa66d6-aa1b-4e3c-80f5-e0145369bfaf, 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.