MITRE ATT&CKsub-technique
T1053.006 Systemd Timers
- Domain
- enterprise
- Tactics
- Execution, Persistence, Privilege Escalation
- Platforms
- Linux
- Version
- 1.3
- Created
- 2020-10-12
Description
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. Systemd timers may be activated remotely via the systemctl command line utility, which operates over SSH.
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. 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. 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.
Related
Subtechnique of · MITRE ATT&CK (1)
- T1053 Scheduled Task/Job technique
Tactic · MITRE ATT&CK (3)
Referenced by MITRE ATT&CK · mitigates (3)
Referenced by MITRE ATT&CK · uses (3)
Referenced by Compliance · mitigates (11)
- CIS-6.8 Define and Maintain Role-Based Access Control CIS Safeguard v8.1
- NIST-AC-2 Account Management NIST 800-53 control
- NIST-AC-3 Access Enforcement NIST 800-53 control
- NIST-AC-5 Separation of Duties NIST 800-53 control
- NIST-AC-6 Least Privilege NIST 800-53 control
- NIST-CA-7 Continuous Monitoring NIST 800-53 control
- NIST-CM-5 Access Restrictions for Change NIST 800-53 control
- NIST-CM-6 Configuration Settings NIST 800-53 control
- NIST-IA-2 Identification and Authentication (Organizational Users) NIST 800-53 control
- NIST-SI-4 System Monitoring NIST 800-53 control
- NIST-SI-7 Software, Firmware, and Information Integrity NIST 800-53 control
References
- https://www.tecmint.com/control-systemd-services-on-remote-linux-server/ Systemd Remote Control
- https://wiki.archlinux.org/index.php/Systemd/Timers archlinux Systemd Timers Aug 2020
- https://gist.github.com/campuscodi/74d0d2e35d8fd9499c76333ce027345a gist Arch package compromise 10JUL2018
- https://www.bleepingcomputer.com/news/security/malware-found-in-arch-linux-aur-package-repository/ Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018
- https://lists.archlinux.org/pipermail/aur-general/2018-July/034153.html acroread package compromised Arch Linux Mail 8JUL2018
- https://www.hybrid-analysis.com/sample/28553b3a9d2ad4361d33d29ac4bf771d008e0073cec01b5561c6348a608f8dd7?environmentId=300 Falcon Sandbox smp: 28553b3a9d
- http://man7.org/linux/man-pages/man1/systemd.1.html Linux man-pages: systemd January 2014