T1053.005: 计划任务
摘要
攻击者可能滥用 Windows 任务计划程序执行任务计划,以实现恶意代码的初始执行或反复执行。在 Windows 中有多种方式访问任务计划程序。[schtasks](https://attack.mitre.org/software/S0111) 实用工具可直接在命令行上运行,也可以通过控制面板「管理工具」部分中的 GUI 打开任务计划程序。(Citation: Stack Overflow) 在某些情况下,攻击者使用了 Windows 任务计划程序的 .NET 包装器;或者,攻击者使用 Windows netapi32 库和 [Windows Management Instrumentation](https://attack.mitre.org/techniques/T1047)(WMI)来创建计划任务。攻击者还可能利用 PowerShell Cmdlet `Invoke-CimMethod`,它借助 WMI 类 `PS_ScheduledTask` 通过 XML 路径创建计划任务。(Citation: Red Canary - Atomic Red Team) 攻击者可能使用 Windows 任务计划程序在系统启动时或按计划执行程序以实现持久化。Windows 任务计划程序还可被滥用来进行远程 Execution,作为 Lateral Movement 的一部分,和/或在指定账户(如 SYSTEM)的上下文下运行进程。与 [System Binary Proxy Execution](https://attack.mitre.org/techniques/T1218) 类似,攻击者还滥用 Windows 任务计划程序,以可能在已签名/受信任的系统进程下掩盖一次性执行。(Citation: ProofPoint Serpent) 攻击者还可能创建「隐藏」的计划任务(即 [Hide Artifacts](https://attack.mitre.org/techniques/T1564)),使其可能无法被防御者工具和用于枚举任务的手动查询看到。具体而言,攻击者可以通过删除关联的安全描述符(SD)注册表值,使任务对 `schtasks /query` 和任务计划程序隐藏(其中删除该值必须使用 SYSTEM 权限完成)。(Citation: SigmaHQ)(Citation: Tarrask scheduled task) 攻击者还可能采用其他方法来隐藏任务,例如修改关联注册表键中的元数据(如 `Index` 值)。(Citation: Defending Against Scheduled Task Attacks in Windows Environments)
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- Windows
战术
执行
参考来源
- https://attack.mitre.org/techniques/T1053/005
- https://www.proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain
- https://blog.qualys.com/vulnerabilities-threat-research/2022/06/20/defending-against-scheduled-task-attacks-in-windows-environments
- https://x.com/leoloobeek/status/939248813465853953
- https://www.microsoft.com/security/blog/2022/04/12/tarrask-malware-uses-scheduled-tasks-for-defense-evasion/
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events
- https://technet.microsoft.com/library/dd315590.aspx
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1053.005/T1053.005.md
- https://technet.microsoft.com/en-us/sysinternals/bb963902
- https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_delete/registry_delete_schtasks_hide_task_via_sd_value_removal.yml
- https://stackoverflow.com/questions/2913816/how-to-find-the-location-of-the-scheduled-tasks-folder