MITRE ATT&CKsub-technique
T1546.013 PowerShell Profile
- Domain
- enterprise
- Tactics
- Privilege Escalation, Persistence
- Platforms
- Windows
- Version
- 1.2
- Created
- 2020-01-24
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.
Related
Subtechnique of · MITRE ATT&CK (1)
- T1546 Event Triggered Execution technique
Referenced by MITRE ATT&CK · mitigates (3)
Referenced by MITRE ATT&CK · uses (1)
- G0010 Turla group
Referenced by Compliance · mitigates (12)
- CIS-18.3 Remediate Penetration Test Findings CIS Safeguard v8.1
- CIS-2.7 Allowlist Authorized Scripts CIS Safeguard v8.1
- NIST-AC-3 Access Enforcement NIST 800-53 control
- NIST-AC-6 Least Privilege NIST 800-53 control
- NIST-CA-7 Continuous Monitoring NIST 800-53 control
- NIST-CM-10 Software Usage Restrictions NIST 800-53 control
- NIST-CM-2 Baseline Configuration NIST 800-53 control
- NIST-CM-6 Configuration Settings NIST 800-53 control
- NIST-IA-9 Service Identification and Authentication NIST 800-53 control
- NIST-SI-3 Malicious Code Protection NIST 800-53 control
- NIST-SI-4 System Monitoring NIST 800-53 control
- NIST-SI-7 Software, Firmware, and Information Integrity NIST 800-53 control
References
- https://witsendandshady.blogspot.com/2019/06/lab-notes-persistence-and-privilege.html Wits End and Shady PowerShell Profiles
- https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/ ESET Turla PowerShell May 2019
- http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf Malware Archaeology PowerShell Cheat Sheet
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-6 Microsoft About Profiles
- https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles Microsoft Profiles