T1053.006: Systemd 定时器

执行

摘要

攻击者可能滥用 systemd 定时器执行任务计划,以实现恶意代码的初始执行或反复执行。Systemd 定时器是文件扩展名为 <code>.timer</code> 的单元文件,用于控制服务。定时器可以设置为在日历事件时运行,或在相对于起点的某段时间之后运行。在 Linux 环境中,它们可作为 [Cron](https://attack.mitre.org/techniques/T1053/003) 的替代方案。(Citation: archlinux Systemd Timers Aug 2020) Systemd 定时器可通过 <code>systemctl</code> 命令行实用工具远程激活,该工具通过 [SSH](https://attack.mitre.org/techniques/T1021/004) 运行。(Citation: Systemd Remote Control) 每个 <code>.timer</code> 文件必须有一个同名的对应 <code>.service</code> 文件,例如 <code>example.timer</code> 和 <code>example.service</code>。<code>.service</code> 文件是由 systemd 系统和服务管理器管理的 [Systemd Service](https://attack.mitre.org/techniques/T1543/002) 单元文件。(Citation: Linux man-pages: systemd January 2014) 特权定时器写入 <code>/etc/systemd/system/</code> 和 <code>/usr/lib/systemd/system</code>,而用户级定时器写入 <code>~/.config/systemd/user/</code>。 攻击者可能使用 systemd 定时器在系统启动时或按计划执行恶意代码以实现持久化。(Citation: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018)(Citation: gist Arch package compromise 10JUL2018)(Citation: acroread package compromised Arch Linux Mail 8JUL2018) 使用特权路径安装的定时器可用于维持 root 级持久化。攻击者还可能安装用户级定时器以实现用户级持久化。(Citation: Falcon Sandbox smp: 28553b3a9d)

来源归属

来源:MITRE ATT&CK · 置信度:high

平台

  • Linux

战术

执行

参考来源