Suspicious PowerShell Profile Change (via file_event)

This rule detects the creation or modification of a powershell profile which could indicate anomalous behavior as the profile can be used as a mean of persistence

SigmamediumWindowsv1
sigma
title: Suspicious PowerShell Profile Change (via file_event)
id: dc1bccc4-d2a6-5bb6-bcc3-f19594bac045
status: stable
description: This rule detects the creation or modification of a powershell profile which could indicate anomalous behavior as the profile can be used as a mean of persistence
references:
    - https://attack.mitre.org/techniques/T1546/013/
    - https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/
    - https://persistence-info.github.io/Data/powershellprofile.html
author: Huntrule Team
date: 2026-06-17
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1546.013
logsource:
    product: windows
    category: file_event
detection:
    selection:
        TargetFilename|endswith:
            - '\Microsoft.PowerShell_profile.ps1'
            - '\PowerShell\profile.ps1'
            - '\Program Files\PowerShell\7-preview\profile.ps1'
            - '\Program Files\PowerShell\7\profile.ps1'
            - '\Windows\System32\WindowsPowerShell\v1.0\profile.ps1'
            - '\WindowsPowerShell\profile.ps1'
    condition: selection
falsepositives:
    - Unknown
level: medium

Known false positives

  • Unknown

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