Potential Persistence via Cron Jobedit

Identifies the creation or execution of a cron job. Adversaries may abuse cron jobs to perform task scheduling for initial or recurring execution of malicious code.

Rule type: query

Rule indices:

  • auditbeat-*
  • logs-endpoint.events.*

Severity: low

Risk score: 21

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100



  • Elastic
  • Host
  • Linux
  • macOS
  • Threat Detection
  • Persistence

Version: 1

Added (Elastic Stack release): 7.12.0

Rule authors: Elastic

Rule license: Elastic License v2

Potential false positivesedit

Legitimate software or scripts using cron jobs for recurring tasks.

Rule queryedit

event.category:process and event.type:(start or process_started or
info) and not user.name:root and ((process.name:crontab and not
process.args:("-l" or "-r" or "-e" or "-help" or "-h")) or
(process.parent.name:cron and not process.name:"running job" and not p
ker or /usr/bin/killall or /usr/sbin/sendmail or /usr/bin/env or
/usr/bin/timeshift or /bin/rm)))

Threat mappingedit