| name | T1546.013_powershell-profile |
| description | Adversaries may gain persistence and elevate privileges by executing malicious content triggered by PowerShell profiles. |
| category | authorization |
| version | 18.1 |
| author | cyberstrike-official |
| tags | ["mitre-attack","enterprise","t1546.013","privilege-escalation","persistence","windows","sub-technique"] |
| technique_id | T1546.013 |
| tactic | privilege-escalation |
| all_tactics | ["privilege-escalation","persistence"] |
| platforms | ["Windows"] |
| mitre_url | https://attack.mitre.org/techniques/T1546/013 |
| tech_stack | ["windows"] |
| cwe_ids | ["CWE-269"] |
| chains_with | ["T1546","T1546.001","T1546.002","T1546.003","T1546.004","T1546.005","T1546.006","T1546.007","T1546.008","T1546.009","T1546.010","T1546.011","T1546.012","T1546.014","T1546.015","T1546.016","T1546.017","T1546.018"] |
| prerequisites | ["T1546"] |
| severity_boost | {"T1546":"Chain with T1546 for deeper attack path","T1546.001":"Chain with T1546.001 for deeper attack path","T1546.002":"Chain with T1546.002 for deeper attack path"} |
T1546.013 PowerShell Profile
Sub-technique of: T1546
High-Level Description
Adversaries may gain persistence and elevate privileges by executing malicious content triggered by PowerShell profiles. A PowerShell profile (profile.ps1) is a script that runs when PowerShell starts and can be used as a logon script to customize user environments.
PowerShell supports several profiles depending on the user or host program. For example, there can be different profiles for PowerShell host programs such as the PowerShell console, PowerShell ISE or Visual Studio Code. An administrator can also configure a profile that applies to all users and host programs on the local computer.
Adversaries may modify these profiles to include arbitrary commands, functions, modules, and/or PowerShell drives to gain persistence. Every time a user opens a PowerShell session the modified script will be executed unless the -NoProfile flag is used when it is launched.
An adversary may also be able to escalate privileges if a script in a PowerShell profile is loaded and executed by an account with higher privileges, such as a domain administrator.
Kill Chain Phase
- Privilege Escalation (TA0004)
- Persistence (TA0003)
Platforms: Windows
What to Check
How to Test
Atomic Red Team Tests
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Atomic Test 1: Append malicious start-process cmdlet
Appends a start process cmdlet to the current user's powershell profile pofile that points to a malicious executable. Upon execution, calc.exe will be launched.
Supported Platforms: windows
Add-Content #{ps_profile} -Value ""
Add-Content #{ps_profile} -Value "Start-Process #{exe_path}"
powershell -Command exit
Dependencies:
- Ensure a powershell profile exists for the current user