T1543.003: Windows 服务
摘要
攻击者可能创建或修改 Windows 服务,以作为持久化的一部分反复执行恶意载荷。当 Windows 启动时,它会启动称为服务的程序或应用程序来执行后台系统功能。(Citation: TechNet Services) Windows 服务配置信息(包括服务可执行文件或恢复程序/命令的文件路径)存储在 Windows 注册表中。 攻击者可能安装新服务或修改现有服务以在启动时执行,从而在系统上持久化。可以使用系统实用工具(如 sc.exe)设置或修改服务配置,通过直接修改注册表,或通过直接与 Windows API 交互。 攻击者还可能使用服务来安装和执行恶意驱动程序。例如,在将一个驱动程序文件(例如 `.sys`)投放到磁盘后,可以通过[本机 API](https://attack.mitre.org/techniques/T1106) 函数(如 `CreateServiceW()`,或通过 `ZwLoadDriver()` 和 `ZwSetValueKey()` 等函数手动执行)加载并注册该载荷,通过创建所需的服务注册表值(即[修改注册表](https://attack.mitre.org/techniques/T1112)),或使用命令行实用工具(如 `PnPUtil.exe`)。(Citation: Symantec W.32 Stuxnet Dossier)(Citation: Crowdstrike DriveSlayer February 2022)(Citation: Unit42 AcidBox June 2020) 攻击者可能利用这些驱动程序作为[Rootkit](https://attack.mitre.org/techniques/T1014) 来隐藏系统上恶意活动的存在。攻击者还可能将已签名但存在漏洞的驱动程序加载到受感染机器上(称为“自带易受攻击驱动程序”(BYOVD)),作为[为权限提升而利用](https://attack.mitre.org/techniques/T1068)的一部分。(Citation: ESET InvisiMole June 2020)(Citation: Unit42 AcidBox June 2020) 服务可能以管理员权限创建,但在 SYSTEM 权限下执行,因此攻击者也可能使用服务提升权限。攻击者还可能通过[服务执行](https://attack.mitre.org/techniques/T1569/002)直接启动服务。 为了使检测分析更具挑战性,恶意服务还可能结合[伪装任务或服务](https://attack.mitre.org/techniques/T1036/004)(例如使用与合法操作系统或良性软件组件相关的服务和/或载荷名称)。攻击者还可能创建“隐藏的”服务(即[隐藏痕迹](https://attack.mitre.org/techniques/T1564)),例如使用 `sc sdset` 命令通过服务描述符定义语言(SDDL)设置服务权限。这可能使 Windows 服务从标准服务枚举方法(如 `Get-Service`、`sc query` 和 `services.exe`)的视图中隐藏起来。(Citation: SANS 1)(Citation: SANS 2)
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- Windows
战术
持久化
参考来源
- https://attack.mitre.org/techniques/T1543/003
- https://docs.microsoft.com/windows/security/threat-protection/use-windows-event-forwarding-to-assist-in-intrusion-detection
- https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf
- https://www.sans.org/blog/red-team-tactics-hiding-windows-services/
- https://www.sans.org/blog/defense-spotlight-finding-hidden-windows-services/
- https://technet.microsoft.com/en-us/library/cc772408.aspx
- https://docs.microsoft.com/windows/security/threat-protection/auditing/event-4697
- https://www.wired.com/images_blogs/threatlevel/2010/11/w32_stuxnet_dossier.pdf
- https://unit42.paloaltonetworks.com/acidbox-rare-malware/
- https://technet.microsoft.com/en-us/sysinternals/bb963902
- https://www.crowdstrike.com/blog/how-crowdstrike-falcon-protects-against-wiper-malware-used-in-ukraine-attacks/