Skip to content

Systemd Timers

Systemd Timers are time-based activation mechanisms that serve as alternatives to traditional cron jobs in Linux environments. In the context of Deepening Control via Scheduled Tasks, attackers who have already gained initial access to a system may leverage systemd timers to ensure persistence, automate malicious activities, and maintain their foothold within the environment. Unlike cron jobs, systemd timers offer advantages such as integrated logging, configurable accuracy, and the ability to handle dependencies between services, making them less conspicuous and more resilient persistence mechanisms. Attackers typically create custom timer units (.timer files) paired with service units (.service files) in directories like /etc/systemd/system/ or user-specific locations in ~/.config/systemd/user/ to execute malicious code at predetermined intervals or specific times. The flexibility of systemd timers allows for sophisticated scheduling options including repeating intervals, specific calendar dates, or system events like boot completion, making detection more challenging as they blend with legitimate system operations.