Windows Cmd.exe: SET /p file append/override pattern via set /p=

Alerts on Cmd.exe command lines containing SET /p= syntax that may be used with redirection to modify file contents.

FreeReviewedSigma · Low · v5
Product
windows
Category
process_creation
Author
Nasreddine Bencherchali (Nextron Systems), MahirAli Khan (in/mahiralikhan) (SigmaHQ), DRL 1.1
Published
2024-08-22
Updated
2026-07-31

What it detects

This rule identifies command-line usage of Cmd.exe invoking the internal SET command with the /p flag followed immediately by '='. The pattern is often associated with indirect file content manipulation when combined with redirection such as '>>' to append data. It relies on process creation telemetry capturing the executable path and full command line arguments.

Changelog

v5
  1. v5
    Candidate ingested via manual entry.2026-07-31
  2. v4
    Candidate ingested via manual entry.2026-07-31
  3. v3
    Candidate ingested via manual entry.2026-07-31
  4. v2
    Candidate ingested via manual entry.2026-07-31
  5. 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.