Scheduled Job Creation via At Utility Inside a Container
This rule detects execution of the "at" or "atd" job-scheduling utilities inside a Linux container. Containers are typically immutable, single-purpose, and do not run interactive job schedulers, so the use of "at" to queue a one-time command is anomalous. Adversaries abuse "at" to establish persistence or to execute a payload at a later time after gaining a foothold inside a container.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/11/13"
3integration = ["cloud_defend"]
4maturity = "production"
5min_stack_comments = "Defend for Containers integration was re-introduced in 9.3.0"
6min_stack_version = "9.3.0"
7updated_date = "2026/11/13"
8
9[rule]
10author = ["Elastic"]
11description = """
12This rule detects execution of the "at" or "atd" job-scheduling utilities inside a Linux container. Containers are
13typically immutable, single-purpose, and do not run interactive job schedulers, so the use of "at" to queue a one-time
14command is anomalous. Adversaries abuse "at" to establish persistence or to execute a payload at a later time after
15gaining a foothold inside a container.
16"""
17false_positives = [
18 """
19 Some container images bundle the "at"/"atd" utilities and a small number of workloads may legitimately schedule
20 one-time jobs. Investigate the queued command and the scheduling principal; baseline and except known automation
21 images where appropriate.
22 """,
23]
24from = "now-6m"
25interval = "5m"
26language = "esql"
27license = "Elastic License v2"
28name = "Scheduled Job Creation via At Utility Inside a Container"
29note = """## Setup
30
31This rule requires the Elastic Defend for Containers integration to be configured to collect container process events.
32
33## Triage and analysis
34
35### Investigating Scheduled Job Creation via At Utility Inside a Container
36
37The "at" utility schedules a command to run once at a later time via the "atd" daemon. Inside a container this is rarely legitimate: container workloads are usually immutable and process-bound, with scheduling handled by the orchestrator (CronJobs), not an in-container scheduler. Adversaries use "at" to persist or to defer execution of a payload after compromising a container.
38
39### Possible investigation steps
40
41- Identify the container (`container.id`, `container.name`) and namespace (`orchestrator.namespace`) where "at" executed, and confirm whether in-container scheduling is expected for that workload.
42- Review the parent process (`process.parent.name`, `process.parent.executable`) to determine whether the invocation came from an interactive shell or an automated process.
43- Inspect the command that was queued (review the container's `/var/spool/cron/atjobs` or `atq`/`at -c` output) to understand what will run and when.
44- Correlate with prior activity in the same container, such as tool installation, package manager use, or shell access.
45
46### False positive analysis
47
48- A small number of images legitimately run "atd" and may schedule maintenance jobs. Baseline these images or namespaces and add exceptions.
49
50### Response and remediation
51
52- If unexpected, isolate the container, remove the scheduled job (`at -r`), capture the queued command for analysis, and redeploy the workload from a trusted image.
53- Rotate any credentials exposed to the container and review how the attacker gained execution inside it.
54"""
55references = [
56 "https://attack.mitre.org/techniques/T1053/002/",
57 "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1053.002/T1053.002.md",
58]
59risk_score = 21
60rule_id = "1a263a5f-8aea-4c42-a121-0defc82e0a2e"
61severity = "low"
62tags = [
63 "Data Source: Elastic Defend for Containers",
64 "Domain: Containers",
65 "OS: Linux",
66 "Use Case: Threat Detection",
67 "Tactic: Execution",
68 "Tactic: Persistence",
69 "Resources: Investigation Guide",
70 "Rule Type: ES|QL",
71 "Platform: Linux",
72 "Platform: Kubernetes",
73]
74timestamp_override = "event.ingested"
75type = "esql"
76
77query = '''
78from logs-cloud_defend.process* metadata _id, _index, _version
79| where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
80 container.id like "*" and
81 (
82 process.name in ("at", "atd") or
83 kql("""process.args: "at" """)
84 )
85| keep @timestamp, host.id, container.id, process.name, process.args, process.parent.name, process.parent.executable, user.id, _id, _index, _version
86'''
87
88
89[[rule.threat]]
90framework = "MITRE ATT&CK"
91[[rule.threat.technique]]
92id = "T1053"
93name = "Scheduled Task/Job"
94reference = "https://attack.mitre.org/techniques/T1053/"
95[[rule.threat.technique.subtechnique]]
96id = "T1053.002"
97name = "At"
98reference = "https://attack.mitre.org/techniques/T1053/002/"
99
100
101
102[rule.threat.tactic]
103id = "TA0002"
104name = "Execution"
105reference = "https://attack.mitre.org/tactics/TA0002/"
106[[rule.threat]]
107framework = "MITRE ATT&CK"
108[[rule.threat.technique]]
109id = "T1053"
110name = "Scheduled Task/Job"
111reference = "https://attack.mitre.org/techniques/T1053/"
112[[rule.threat.technique.subtechnique]]
113id = "T1053.002"
114name = "At"
115reference = "https://attack.mitre.org/techniques/T1053/002/"
116
117
118
119[rule.threat.tactic]
120id = "TA0003"
121name = "Persistence"
122reference = "https://attack.mitre.org/tactics/TA0003/"
Setup
This rule requires the Elastic Defend for Containers integration to be configured to collect container process events.
Triage and analysis
Investigating Scheduled Job Creation via At Utility Inside a Container
The "at" utility schedules a command to run once at a later time via the "atd" daemon. Inside a container this is rarely legitimate: container workloads are usually immutable and process-bound, with scheduling handled by the orchestrator (CronJobs), not an in-container scheduler. Adversaries use "at" to persist or to defer execution of a payload after compromising a container.
Possible investigation steps
- Identify the container (
container.id,container.name) and namespace (orchestrator.namespace) where "at" executed, and confirm whether in-container scheduling is expected for that workload. - Review the parent process (
process.parent.name,process.parent.executable) to determine whether the invocation came from an interactive shell or an automated process. - Inspect the command that was queued (review the container's
/var/spool/cron/atjobsoratq/at -coutput) to understand what will run and when. - Correlate with prior activity in the same container, such as tool installation, package manager use, or shell access.
False positive analysis
- A small number of images legitimately run "atd" and may schedule maintenance jobs. Baseline these images or namespaces and add exceptions.
Response and remediation
- If unexpected, isolate the container, remove the scheduled job (
at -r), capture the queued command for analysis, and redeploy the workload from a trusted image. - Rotate any credentials exposed to the container and review how the attacker gained execution inside it.
References
Related rules
- Web Server Exploitation Detected via Defend for Containers
- Container Image Built Inside a Container
- Container Management Utility Execution Detected via Defend for Containers
- Direct Interactive Kubernetes API Request by Common Utilities
- Direct Interactive Kubernetes API Request by Unusual Utilities