macOS Cron Task Abuse via crontab Executed from /tmp

Detects macOS cron scheduling activity where crontab is run with /tmp in the command line.

FreeReviewedSigma · Medium · v2
Product
macos
Category
process_creation
Author
Alejandro Ortuno, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-06
Updated
2026-07-31
title: macOS Cron Task Abuse via crontab Executed from /tmp
id: 57b26184-9e01-407d-8c28-d4e6826c63c3
status: test
description: This rule matches process executions of crontab where the command line includes paths under /tmp, indicating cron job creation from a temporary directory. Attackers often use /tmp staging to drop or prepare scripts and then schedule them for initial or recurring execution. The detection relies on process creation telemetry that provides the executable path and full command line arguments.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1053.003/T1053.003.md
  - https://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_schedule_task_job_cron.yml
author: Alejandro Ortuno, oscd.community, Huntrule Team
date: 2020-10-06
modified: 2022-11-27
tags:
  - attack.execution
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1053.003
logsource:
  category: process_creation
  product: macos
detection:
  selection:
    Image|endswith: /crontab
    CommandLine|contains: /tmp/
  condition: selection
falsepositives:
  - Legitimate administration activities
level: medium
license: DRL-1.1
related:
  - id: 7c3b43d8-d794-47d2-800a-d277715aa460
    type: derived