← Back to SOC feed Coverage →

Persistence Via Cron Files

sigma MEDIUM SigmaHQ
T1053.003
imFileEvent
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-03-25T02:50:08Z · Confidence: medium

Hunt Hypothesis

Adversaries may leverage cron files to establish persistence by scheduling malicious commands to run at specific intervals. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential long-term access and maintain system integrity.

Detection Rule

Sigma (Original)

title: Persistence Via Cron Files
id: 6c4e2f43-d94d-4ead-b64d-97e53fa2bd05
status: test
description: Detects creation of cron file or files in Cron directories which could indicates potential persistence.
references:
    - https://github.com/microsoft/MSTIC-Sysmon/blob/f1477c0512b0747c1455283069c21faec758e29d/linux/configs/attack-based/persistence/T1053.003_Cron_Activity.xml
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC
date: 2021-10-15
modified: 2022-12-31
tags:
    - attack.privilege-escalation
    - attack.execution
    - attack.persistence
    - attack.t1053.003
logsource:
    product: linux
    category: file_event
detection:
    selection1:
        TargetFilename|startswith:
            - '/etc/cron.d/'
            - '/etc/cron.daily/'
            - '/etc/cron.hourly/'
            - '/etc/cron.monthly/'
            - '/etc/cron.weekly/'
            - '/var/spool/cron/crontabs/'
    selection2:
        TargetFilename|contains:
            - '/etc/cron.allow'
            - '/etc/cron.deny'
            - '/etc/crontab'
    condition: 1 of selection*
falsepositives:
    - Any legitimate cron file.
level: medium

KQL (Azure Sentinel)

imFileEvent
| where (TargetFileName startswith "/etc/cron.d/" or TargetFileName startswith "/etc/cron.daily/" or TargetFileName startswith "/etc/cron.hourly/" or TargetFileName startswith "/etc/cron.monthly/" or TargetFileName startswith "/etc/cron.weekly/" or TargetFileName startswith "/var/spool/cron/crontabs/") or (TargetFileName contains "/etc/cron.allow" or TargetFileName contains "/etc/cron.deny" or TargetFileName contains "/etc/crontab")

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/linux/file_event/file_event_lnx_persistence_cron_files.yml