T1053.006 CrowdStrike LogScale · LogScale

Detect Systemd Timers in CrowdStrike LogScale

Adversaries may abuse systemd timers to perform task scheduling for initial or recurring execution of malicious code. Systemd timers are unit files with file extension .timer that control services. Timers can be set to run on a calendar event or after a time span relative to a starting point. Each .timer file must have a corresponding .service file with the same name. Privileged timers are written to /etc/systemd/system/ and /usr/lib/systemd/system while user level timers are written to ~/.config/systemd/user/. Adversaries may use systemd timers to execute malicious code at system startup or on a scheduled basis for persistence, and may leverage root-level timer paths to maintain privileged persistence.

MITRE ATT&CK

Tactic
Execution Persistence Privilege Escalation
Technique
T1053 Scheduled Task/Job
Sub-technique
T1053.006 Systemd Timers
Canonical reference
https://attack.mitre.org/techniques/T1053/006/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// Detect systemctl commands operating on .timer units OR .timer/.service file writes
#event_simpleName = /^(ProcessRollup2|NewExecutableWritten|SuspiciousScriptContent)$/

// Branch: systemctl timer management
| case {
    #event_simpleName = "ProcessRollup2"
    and ImageFileName = /systemctl/
    and CommandLine = /\.timer.*(enable|start|link|daemon-reload)/
    => eval(detection_type := "systemctl_timer_action");

    #event_simpleName = "NewExecutableWritten"
    and TargetFileName = /\.(timer|service)$/
    and TargetDirectoryName = /(\/(etc|usr\/lib|lib)\/systemd\/system|\.config\/systemd\/user)/
    => eval(detection_type := "timer_file_write");

    * => drop()
  }

// Extract timer name from command line or file name
| eval(
    timer_name := ifnull(
      regex("([\\w\\-\\.]+\\.timer)", field=TargetFileName, flags="i"),
      regex("([\\w\\-\\.]+\\.timer)", field=CommandLine, flags="i")
    )
  )

// Classify path privilege level
| eval(
    is_privileged := if(
      CommandLine =~ /(\/(etc|usr\/lib|lib)\/systemd\/system)/
      or TargetDirectoryName =~ /(\/(etc|usr\/lib|lib)\/systemd\/system)/,
      "true", "false"
    )
  )

// Flag suspicious payload indicators
| eval(
    is_suspicious := if(
      CommandLine =~ /(\/tmp\/|\/dev\/shm\/|\/var\/tmp\/|bash -i|base64|chmod \+x|wget |curl |python|perl|nc |ncat )/,
      "true", "false"
    )
  )

| groupBy(
    [ComputerName, UserName, detection_type, timer_name, is_privileged, is_suspicious],
    function=[
      count(as=event_count),
      collect(CommandLine, limit=5),
      min(@timestamp, as=first_seen),
      max(@timestamp, as=last_seen)
    ]
  )
| sort(event_count, order=desc)
high severity medium confidence

CrowdStrike LogScale (Falcon) query detecting systemd timer persistence (T1053.006) using ProcessRollup2 events to identify systemctl commands managing .timer units and NewExecutableWritten events for .timer/.service file creation in systemd directories. Results are aggregated by host, user, timer name, and privilege level, with flags for suspicious payload content patterns.

Data Sources

CrowdStrike Falcon Endpoint Protection (Linux)Falcon Insight XDRCrowdStrike LogScale

Required Tables

ProcessRollup2NewExecutableWritten

False Positives & Tuning

  • Software deployment pipelines on Falcon-monitored Linux hosts that install application packages bundling their own systemd timer units (e.g., Prometheus exporters, backup agents, certificate renewal tools)
  • System administrators running systemctl enable/start commands for legitimate timer units during server provisioning or service restoration after maintenance windows
  • Automated OS patching tools (unattended-upgrades, yum-cron) that write updated timer files to /usr/lib/systemd/system/ as part of package upgrade operations
Download portable Sigma rule (.yml)

Other platforms for T1053.006


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Create and Enable a Privileged Systemd Timer for Persistence

    Expected signal: Auditd: SYSCALL openat/write events for /etc/systemd/system/argus-test.timer and /etc/systemd/system/argus-test.service creation. Process creation events for 'systemctl daemon-reload', 'systemctl enable argus-test.timer', 'systemctl start argus-test.timer'. Syslog: systemd entries showing 'argus-test.timer' enabled and started. After 1 minute: process creation for /bin/bash /tmp/argus_payload.sh spawned with parent=systemd.

  2. Test 2Create User-Level Systemd Timer for Unprivileged Persistence

    Expected signal: File creation events for ~/.config/systemd/user/argus-user-test.timer and ~/.config/systemd/user/argus-user-test.service. Process creation events for 'systemctl --user daemon-reload', 'systemctl --user enable', 'systemctl --user start'. User journal entries: 'journalctl --user -u argus-user-test.timer' shows activation. On calendar trigger: process creation for /bin/bash /tmp/user_payload.sh with parent process systemd (user instance).

  3. Test 3Deploy Systemd Timer with Base64-Encoded Payload in ExecStart

    Expected signal: File creation events for /etc/systemd/system/argus-encoded-test.service and /etc/systemd/system/argus-encoded-test.timer. The service unit file content contains 'base64 -d | bash' in ExecStart — detectable via file content inspection. Syslog: systemctl enable/start events. Process creation: /bin/bash spawned by systemd with base64 decode pipe pattern visible in command line arguments.

  4. Test 4Simulate Remote Systemd Timer Activation via SSH

    Expected signal: File creation for unit files in /etc/systemd/system/. Process creation: systemctl enable and start commands. If run via SSH: /var/log/auth.log shows SSH session from source IP, with subsequent systemctl commands in the same session. Syslog: 'argus-remote-test.timer' enabled and started entries. Auditd: EXECVE records for systemctl with timer arguments.

Unlock Pro Content

Get the full detection package for T1053.006 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections