{"id":"6c4e2f43-d94d-4ead-b64d-97e53fa2bd05","title":"New Cron File Created","description":"Detects the creation of cron files in Cron directories, which could indicate potential persistence mechanisms being established by an attacker.\nNote that not all cron file creations are malicious - legitimate system administration activities and software installations may also create cron files.\nThis detection should be investigated in context, considering factors such as the user creating the file, the timing of creation, and the contents of the cron job.\nFocus investigation on unexpected cron files created by non-administrative users or during suspicious timeframes.\nAdditionally, it is recommended to review the contents of the newly created cron files to assess their intent.\nFurthermore, it is suggested to baseline normal cron file creation and apply additional filters to reduce false positives based on the specific environment.\n","author":"Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC","status":"experimental","level":"low","date":"2021-10-15","modified":"2026-04-28","tags":["attack.privilege-escalation","attack.execution","attack.persistence","attack.t1053.003"],"technique_ids":["T1053.003"],"logsource":{"product":"linux","category":"file_event"},"falsepositives":["Legitimate administrative tasks, package managers, containers, configuration management tools, cloud agents, or system maintenance operations might cause false positives. Apply baselining before deployment."],"references":["https://github.com/microsoft/MSTIC-Sysmon/blob/f1477c0512b0747c1455283069c21faec758e29d/linux/configs/attack-based/persistence/T1053.003_Cron_Activity.xml","https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/","https://www.elastic.co/security-labs/primer-on-persistence-mechanisms","https://snehbavarva.medium.com/privilege-escalation-techniques-series-linux-cron-jobs-a5b797b424b4"],"source_path":"rules/linux/file_event/file_event_lnx_susp_cron_file_created.yml","source_sha256":"4eaf424d886d933be880e31432b1dae378ee222b602ed07aa26fd148c6406c35","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/linux/file_event/file_event_lnx_susp_cron_file_created.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: New Cron File Created\nid: 6c4e2f43-d94d-4ead-b64d-97e53fa2bd05\nstatus: experimental\ndescription: |\n    Detects the creation of cron files in Cron directories, which could indicate potential persistence mechanisms being established by an attacker.\n    Note that not all cron file creations are malicious - legitimate system administration activities and software installations may also create cron files.\n    This detection should be investigated in context, considering factors such as the user creating the file, the timing of creation, and the contents of the cron job.\n    Focus investigation on unexpected cron files created by non-administrative users or during suspicious timeframes.\n    Additionally, it is recommended to review the contents of the newly created cron files to assess their intent.\n    Furthermore, it is suggested to baseline normal cron file creation and apply additional filters to reduce false positives based on the specific environment.\nreferences:\n    - https://github.com/microsoft/MSTIC-Sysmon/blob/f1477c0512b0747c1455283069c21faec758e29d/linux/configs/attack-based/persistence/T1053.003_Cron_Activity.xml\n    - https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/\n    - https://www.elastic.co/security-labs/primer-on-persistence-mechanisms\n    - https://snehbavarva.medium.com/privilege-escalation-techniques-series-linux-cron-jobs-a5b797b424b4\nauthor: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC\ndate: 2021-10-15\nmodified: 2026-04-28\ntags:\n    - attack.privilege-escalation\n    - attack.execution\n    - attack.persistence\n    - attack.t1053.003\nlogsource:\n    product: linux\n    category: file_event\ndetection:\n    selection_cron_dirs:\n        TargetFilename|startswith:\n            - '/etc/cron.d/'\n            - '/etc/cron.daily/'\n            - '/etc/cron.hourly/'\n            - '/etc/cron.monthly/'\n            - '/etc/cron.weekly/'\n            - '/var/spool/cron/crontabs/'\n            - '/var/spool/cron/root'\n    selection_cron_special_files:\n        TargetFilename|contains:\n            - '/etc/cron.allow'\n            - '/etc/cron.deny'\n            - '/etc/crontab'\n    filter_optional_legit_cron:\n        # Note: FPs on docker images: golang, postgres, python, redis, ruby\n        TargetFilename:\n            - '/etc/cron.daily/apt'\n            - '/etc/cron.daily/dpkg'\n            - '/etc/cron.daily/passwd'\n            - '/etc/crontabs/root'\n    condition: 1 of selection_* and not 1 of filter_optional_*\nfalsepositives:\n    - Legitimate administrative tasks, package managers, containers, configuration management tools, cloud agents, or system maintenance operations might cause false positives. Apply baselining before deployment.\nlevel: low\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1053.003","id":"T1053.003","name":"Cron","page":"techniques/enterprise/T1053.003/"}],"data_path":"data/detection-rules/6c4e2f43-d94d-4ead-b64d-97e53fa2bd05.json","kind":"sigma"}
