ATT&CK coverage › Technique

Event Triggered Execution: PowerShell Profile T1546.013

Adversaries may gain persistence and elevate privileges by executing malicious content triggered by PowerShell profiles. A PowerShell profile (<code>profile.ps1</code>) is a script that runs when PowerShell starts and can be used as a logon script to customize user environments.

Events covered

2 catalog events are tagged with this technique by at least one rule.

ProviderEvent IDTitle
Sysmon11FileCreate
PowerShell4104Creating Scriptblock text (MessageNumber of MessageTotal).

Authoring guide

Patterns shared across the 3 rules above: which fields they filter on, what specific values they look for, and what they exclude. Field names are normalized across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (2 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
TargetFilename2ends_with 2\Program Files\PowerShell\7-preview\profile.ps1, \Program Files\PowerShell\7\profile.ps1, \PowerShell\profile.ps1, \Microsoft.VSCode_profile.ps1
ScriptBlockText1match 1-Value "Invoke-WebRequest, -Value 'Start-Process, Add-Content $profile

Top indicator values (16 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique.

FieldKindValueRules (here)Corpus reach
ScriptBlockTextmatch-Value 'Invoke-Expression1
ScriptBlockTextmatch-Value 'Start-Process1
ScriptBlockTextmatch-Value "Invoke-Expression1
ScriptBlockTextmatchAdd-Content $profile1
ScriptBlockTextmatch-Value "Invoke-WebRequest1
ScriptBlockTextmatch-Value "Start-Process1
ScriptBlockTextmatch-Value 'IEX 1
ScriptBlockTextmatch-Value "IEX 1
ScriptBlockTextmatch-Value 'Invoke-WebRequest1
TargetFilenameends_with\Microsoft.PowerShell_profile.ps11
TargetFilenameends_with\PowerShell\profile.ps11
TargetFilenameends_with\WindowsPowerShell\profile.ps11
TargetFilenameends_with\Program Files\PowerShell\7-preview\profile.ps11
TargetFilenameends_with\Windows\System32\WindowsPowerShell\v1.0\profile.ps11
TargetFilenameends_with\Program Files\PowerShell\7\profile.ps11
TargetFilenameends_with\Microsoft.VSCode_profile.ps11

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Sigma 3 rules