Execution Persistence Privilege Escalation

T1053.003: Cron

Adversaries may abuse the <code>cron</code> utility to perform task scheduling for initial or recurring execution of malicious code.(Citation: 20 macOS Common Tools and Techniques) The <code>cron</cod...

T1053.003 · Sub-technique ·3 platforms ·3 groups

Description

Adversaries may abuse the cron utility to perform task scheduling for initial or recurring execution of malicious code.(Citation: 20 macOS Common Tools and Techniques) The cron utility is a time-based job scheduler for Unix-like operating systems. The crontab file contains the schedule of cron entries to be run and the specified times for execution. Any crontab files are stored in operating system-specific file paths.

An adversary may use cron in Linux or Unix environments to execute programs at system startup or on a scheduled basis for Persistence. In ESXi environments, cron jobs must be created directly via the crontab file (e.g., /var/spool/cron/crontabs/root).(Citation: CloudSEK ESXiArgs 2023)

Platforms

LinuxmacOSESXi

Mitigations (2)

AuditM1047

Review changes to the cron schedule. cron execution can be reviewed within the /var/log directory. To validate the location of the cron log file, check the syslog config at /etc/rsyslog.conf or /etc/syslog.conf.

User Account ManagementM1018

cron permissions are controlled by /etc/cron.allow and /etc/cron.deny. If there is a cron.allow file, then the user or users that need to use cron will need to be listed in the file. cron.deny is used to explicitly disallow users from using cron. If neither files exist, then only the super user is allowed to run cron.

Threat Groups (3)

IDGroupContext
G0106Rocke[Rocke](https://attack.mitre.org/groups/G0106) installed a cron job that downloaded and executed files from the C2.(Citation: Talos Rocke August 2018)...
G1023APT5[APT5](https://attack.mitre.org/groups/G1023) has made modifications to the crontab file including in `/var/cron/tabs/`.(Citation: NSA APT5 Citrix Thr...
G0082APT38[APT38](https://attack.mitre.org/groups/G0082) has used cron to create pre-scheduled and periodic background jobs on a Linux system.(Citation: CISA AA...

Associated Software (12)

IDNameTypeContext
S0374SpeakUpMalware[SpeakUp](https://attack.mitre.org/software/S0374) uses cron tasks to ensure persistence. (Citation: CheckPoint SpeakUp Feb 2019)
S0504AnchorMalware[Anchor](https://attack.mitre.org/software/S0504) can install itself as a cron job.(Citation: Medium Anchor DNS July 2020)
S0163JanicabMalware[Janicab](https://attack.mitre.org/software/S0163) used a cron job for persistence on Mac devices.(Citation: Janicab)
S0468SkidmapMalware[Skidmap](https://attack.mitre.org/software/S0468) has installed itself via crontab.(Citation: Trend Micro Skidmap)
S0341XbashMalware[Xbash](https://attack.mitre.org/software/S0341) can create a cronjob for persistence if it determines it is on a Linux system.(Citation: Unit42 Xbash...
S0198NETWIREMalware[NETWIRE](https://attack.mitre.org/software/S0198) can use crontabs to establish persistence.(Citation: Red Canary NETWIRE January 2020)
S0588GoldMaxMalwareThe [GoldMax](https://attack.mitre.org/software/S0588) Linux variant has used a crontab entry with a <code>@reboot</code> line to gain persistence.(Ci...
S1198GomirMalware[Gomir](https://attack.mitre.org/software/S1198) will configure a crontab for process execution to start the backdoor on reboot if it is not initially...
S0587PenquinMalware[Penquin](https://attack.mitre.org/software/S0587) can use Cron to create periodic and pre-scheduled background jobs.(Citation: Leonardo Turla Penquin...
S0599KinsingMalware[Kinsing](https://attack.mitre.org/software/S0599) has used crontab to download and run shell scripts every minute to ensure persistence.(Citation: Aq...
S0401Exaramel for LinuxMalware[Exaramel for Linux](https://attack.mitre.org/software/S0401) uses crontab for persistence if it does not have root privileges.(Citation: ESET TeleBot...
S1107NKAbuseMalware[NKAbuse](https://attack.mitre.org/software/S1107) uses a Cron job to establish persistence when infecting Linux hosts.(Citation: NKAbuse SL)

References

Frequently Asked Questions

What is T1053.003 (Cron)?

T1053.003 is a MITRE ATT&CK technique named 'Cron'. It belongs to the Execution, Persistence, Privilege Escalation tactic(s). Adversaries may abuse the <code>cron</code> utility to perform task scheduling for initial or recurring execution of malicious code.(Citation: 20 macOS Common Tools and Techniques) The <code>cron</cod...

How can T1053.003 be detected?

Detection of T1053.003 (Cron) typically involves monitoring system logs, network traffic, and endpoint telemetry. Use SIEM rules, EDR solutions, and behavioral analytics to identify suspicious activity associated with this technique.

What mitigations exist for T1053.003?

There are 2 documented mitigations for T1053.003. Key mitigations include: Audit, User Account Management.

Which threat groups use T1053.003?

Known threat groups using T1053.003 include: Rocke, APT5, APT38.