Detection rules › Sigma

PowerShell Profile Modification

Severity
medium
Author
HieuTT35, Nasreddine Bencherchali (Nextron Systems)
Source
upstream

Detects the creation or modification of a powershell profile which could indicate suspicious activity as the profile can be used as a mean of persistence

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1546.013 Event Triggered Execution: PowerShell Profile
Privilege EscalationT1546.013 Event Triggered Execution: PowerShell Profile

Event coverage

ProviderEvent IDTitle
Sysmon11FileCreate

Stages and Predicates

Stage 1: selection

or:
TargetFilename|endswith: '\Microsoft.PowerShell_profile.ps1'
TargetFilename|endswith: '\PowerShell\profile.ps1'
TargetFilename|endswith: '\Program Files\PowerShell\7-preview\profile.ps1'
TargetFilename|endswith: '\Program Files\PowerShell\7\profile.ps1'
TargetFilename|endswith: '\WindowsPowerShell\profile.ps1'
TargetFilename|endswith: '\Windows\System32\WindowsPowerShell\v1.0\profile.ps1'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
TargetFilenameends_with
  • \Microsoft.PowerShell_profile.ps1
  • \PowerShell\profile.ps1
  • \Program Files\PowerShell\7-preview\profile.ps1
  • \Program Files\PowerShell\7\profile.ps1
  • \WindowsPowerShell\profile.ps1
  • \Windows\System32\WindowsPowerShell\v1.0\profile.ps1