Persistence via Scheduled Job Creation

A job can be used to schedule programs or scripts to be executed at a specified date and time. Adversaries may abuse task scheduling functionality to facilitate initial or recurring execution of malicious code.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2021/03/15"
 3integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
 4maturity = "production"
 5min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 6min_stack_version = "8.14.0"
 7updated_date = "2024/10/15"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12A job can be used to schedule programs or scripts to be executed at a specified date and time. Adversaries may abuse
13task scheduling functionality to facilitate initial or recurring execution of malicious code.
14"""
15false_positives = ["Legitimate scheduled jobs may be created during installation of new software."]
16from = "now-9m"
17index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-sentinel_one_cloud_funnel.*", "logs-m365_defender.event-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Persistence via Scheduled Job Creation"
21risk_score = 47
22rule_id = "1327384f-00f3-44d5-9a8c-2373ba071e92"
23severity = "medium"
24tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Persistence", "Data Source: Elastic Endgame", "Data Source: Elastic Defend", "Data Source: Sysmon", "Data Source: SentinelOne", "Data Source: Microsoft Defender for Endpoint"]
25timestamp_override = "event.ingested"
26type = "eql"
27
28query = '''
29file where host.os.type == "windows" and event.type != "deletion" and
30  file.path : "?:\\Windows\\Tasks\\*" and file.extension : "job" and
31  not (
32    (
33      process.executable : "?:\\Program Files\\CCleaner\\CCleaner64.exe" and
34      file.path : "?:\\Windows\\Tasks\\CCleanerCrashReporting.job"
35    ) or
36    (
37      process.executable : (
38        "?:\\Program Files (x86)\\ManageEngine\\UEMS_Agent\\bin\\dcagentregister.exe",
39        "?:\\Program Files (x86)\\DesktopCentral_Agent\\bin\\dcagentregister.exe"
40      ) and
41      file.path : "?:\\Windows\\Tasks\\DCAgentUpdater.job"
42    )
43  )
44'''
45
46
47[[rule.threat]]
48framework = "MITRE ATT&CK"
49[[rule.threat.technique]]
50id = "T1053"
51name = "Scheduled Task/Job"
52reference = "https://attack.mitre.org/techniques/T1053/"
53[[rule.threat.technique.subtechnique]]
54id = "T1053.005"
55name = "Scheduled Task"
56reference = "https://attack.mitre.org/techniques/T1053/005/"
57
58
59
60[rule.threat.tactic]
61id = "TA0003"
62name = "Persistence"
63reference = "https://attack.mitre.org/tactics/TA0003/"

Related rules

to-top