T1053.006 Systemd Timers
Adversaries may abuse systemd timers to perform task scheduling for initial or recurring execution of malicious code. Systemd timers are unit files with file extension .timer that control services. Timers can be set to run on a calendar event or after a time span relative to a starting point. They can be used as an alternative to Cron in Linux environments.2 Systemd timers may be activated remotely via the systemctl command line utility, which operates over SSH.1
Each .timer file must have a corresponding .service file with the same name, e.g., example.timer and example.service. .service files are Systemd Service unit files that are managed by the systemd system and service manager.7 Privileged timers are written to /etc/systemd/system/ and /usr/lib/systemd/system while user level are written to ~/.config/systemd/user/.
An adversary may use systemd timers to execute malicious code at system startup or on a scheduled basis for persistence.435 Timers installed using privileged paths may be used to maintain root level persistence. Adversaries may also install user level timers to achieve user level persistence.6
| Item | Value |
|---|---|
| ID | T1053.006 |
| Sub-techniques | T1053.002, T1053.003, T1053.005, T1053.006, T1053.007 |
| Tactics | TA0002, TA0003, TA0004 |
| Platforms | Linux |
| Version | 1.3 |
| Created | 12 October 2020 |
| Last Modified | 24 October 2025 |
Mitigations
| ID | Mitigation | Description |
|---|---|---|
| M1026 | Privileged Account Management | Limit access to the root account and prevent users from creating and/or modifying systemd timer unit files. |
| M1022 | Restrict File and Directory Permissions | Restrict read/write access to systemd .timer unit files to only select privileged users who have a legitimate need to manage system services. |
| M1018 | User Account Management | Limit user access to system utilities such as ‘systemctl’ or ‘systemd-run’ to users who have a legitimate need. |
References
-
Aaron Kili. (2018, January 16). How to Control Systemd Services on Remote Linux Server. Retrieved July 26, 2021. ↩
-
archlinux. (2020, August 11). systemd/Timers. Retrieved October 12, 2020. ↩
-
Catalin Cimpanu. (2018, July 10). ~x file downloaded in public Arch package compromise. Retrieved April 23, 2019. ↩
-
Catalin Cimpanu. (2018, July 10). Malware Found in Arch Linux AUR Package Repository. Retrieved April 23, 2019. ↩
-
Eli Schwartz. (2018, June 8). acroread package compromised. Retrieved April 23, 2019. ↩
-
Hybrid Analysis. (2018, July 11). HybridAnalsysis of sample 28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7. Retrieved September 8, 2023. ↩
-
Linux man-pages. (2014, January). systemd(1) - Linux manual page. Retrieved April 23, 2019. ↩