PowerShell Write-EventLog with -RawData Flag

Alerts when PowerShell script blocks call Write-EventLog using the -RawData flag.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-08-16
Updated
2026-07-31

What it detects

This rule flags PowerShell script content that invokes the Write-EventLog cmdlet with the -RawData flag. Attackers may use this functionality to store attacker-controlled data in the Windows Event Log for later retrieval or use, blending with legitimate logging activity. The detection relies on PowerShell script block text visibility matching both "Write-EventLog" and "-RawData " in the same script block.

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.