Detection rules › Splunk
Rare Schedule Task Created (Windows Event Log)
Schedule tasks are often a form of persistence utilized by threat actors. This use case looks for rare occurrences for when a task is created
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Privilege Escalation |
References
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4698: A scheduled task was created. |
Rule body
id: '12931.18578'
title: Rare Schedule Task Created
description: 'Schedule tasks are often a form of persistence utilized by threat actors.
This use case looks for rare occurrences for when a task is created. -- Threat Actor
Association: APT-K-47/Mysterious Elephant, CL-STA-0043, Redfly, Turla (akaSecret
Blizzard, KRYPTON, and UAC-0003) -- Software Association: BianLian, Play'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4698) OR
"<EventID>4698<") | eval task_name=coalesce(Task_Name, TaskName)| table _time, host,
user process, process_*, signature_id, parent_*, task_name | bin span=1s | stats
values(*) as * by _time, host | eventstats count by task_name| where count < 5 '
techniques:
- execution:scheduled task/job:scheduled task
- persistence:scheduled task/job:scheduled task
- privilege-escalation:scheduled task/job:scheduled task
technique_id:
- T1053.005
data_category:
- Windows event logs
references:
- https://thedfirreport.com/2022/04/25/quantum-ransomware/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4698) OR "<EventID>4698<")
Stage 2: eval
| eval task_name=coalesce(Task_Name, TaskName)
Stage 3: table
| table _time, host, user process, process_*, signature_id, parent_*, task_name
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Stage 6: eventstats
| eventstats count by task_name
Stage 7: where
| where count < 5
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4698" |
count | lt |
| field:"count" kind:lt value:"5" |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4698<" |