T1546.013: PowerShell 配置文件
摘要
攻击者可能通过执行由 PowerShell 配置文件触发的恶意内容来获得持久化并提升权限。PowerShell 配置文件(<code>profile.ps1</code>)是在 [PowerShell](https://attack.mitre.org/techniques/T1059/001) 启动时运行的脚本,可用作登录脚本来自定义用户环境。 [PowerShell](https://attack.mitre.org/techniques/T1059/001) 根据用户或宿主程序支持若干配置文件。例如,[PowerShell](https://attack.mitre.org/techniques/T1059/001) 宿主程序(如 PowerShell 控制台、PowerShell ISE 或 Visual Studio Code)可以有不同配置文件。管理员还可以配置适用于本地计算机上所有用户和宿主程序的配置文件。(Citation: Microsoft About Profiles) 攻击者可能修改这些配置文件以包含任意命令、函数、模块和/或 [PowerShell](https://attack.mitre.org/techniques/T1059/001) 驱动器以获得持久化。除非在启动时使用 <code>-NoProfile</code> 标志,否则每次用户打开 [PowerShell](https://attack.mitre.org/techniques/T1059/001) 会话时都会执行修改后的脚本。(Citation: ESET Turla PowerShell May 2019) 如果 PowerShell 配置文件中的脚本被具有更高权限的账户(如域管理员)加载和执行,攻击者还可能提升权限。(Citation: Wits End and Shady PowerShell Profiles)
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- Windows
战术
权限提升
参考来源
- https://attack.mitre.org/techniques/T1546/013
- https://witsendandshady.blogspot.com/2019/06/lab-notes-persistence-and-privilege.html
- https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/
- http://www.malwarearchaeology.com/s/Windows-PowerShell-Logging-Cheat-Sheet-ver-June-2016-v2.pdf
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-6
- https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles