Windows PowerShell Profile File Creation or Modification

Alerts on creation or modification of PowerShell profile.ps1 files in typical Windows and PowerShell 7 locations.

FreeReviewedSigma · Medium · v2
Product
windows
Category
file_event
Author
HieuTT35, Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2019-10-24
Updated
2026-07-31

ATT&CK techniques

Persistence → Priv Esc
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. C2

  11. Exfiltration

  12. Impact

What it detects

This rule flags file events where key PowerShell profile scripts are created or modified on Windows. Attackers may change these profile files to enable persistence by ensuring their code runs automatically in future PowerShell sessions. The detection relies on Windows file event telemetry that includes the modified/created target filename paths matching common PowerShell profile locations.

Related detections3 linkedT1546.013 — drag to rearrange
Suspicious Creation of PowerShell Profile Script for Persistence
Windows File Changes to Microsoft.VSCode_profile.ps1 via PowerShell Profile
Windows PowerShell: Add-Content to $profile for Potential Persistence
Windows PowerShell Profile File Creation or Modification
Pivot detection · T1546.013 · 3 related

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.