From 97478d787c53850df6f2ec63ca7f15514c147865 Mon Sep 17 00:00:00 2001 From: Andrei Banaru Date: Tue, 7 Jul 2026 11:39:49 +0200 Subject: [PATCH 1/3] chore: update Short Lived Scheduled Task --- .../endpoint/short_lived_scheduled_task.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/detections/endpoint/short_lived_scheduled_task.yml b/detections/endpoint/short_lived_scheduled_task.yml index 6bfbaf2cbb..09b2cdfcf2 100644 --- a/detections/endpoint/short_lived_scheduled_task.yml +++ b/detections/endpoint/short_lived_scheduled_task.yml @@ -1,8 +1,8 @@ name: Short Lived Scheduled Task id: 6fa31414-546e-11ec-adfa-acde48001122 -version: 11 +version: 12 creation_date: '2021-12-03' -modification_date: '2026-05-13' +modification_date: '2026-07-07' author: Mauricio Velazco, Splunk status: production type: TTP @@ -12,13 +12,12 @@ data_source: - Windows Event Log Security 4699 search: |- `wineventlog_security` EventCode=4698 OR EventCode=4699 - | xmlkv Message - | transaction Task_Name startswith=(EventCode=4698) endswith=(EventCode=4699) - | eval short_lived=case((duration<30),"TRUE") - | search short_lived = TRUE - | rename ComputerName as dest - | table _time, dest, Account_Name, Command, Task_Name, short_lived - | `short_lived_scheduled_task_filter` + | xmlkv object_attrs + | transaction TaskName dest startswith=(EventCode=4698) endswith=(EventCode=4699) maxspan=30s + | stats count, min(_time) AS firstTime, max(_time) AS lastTime by Command, TaskName, user, dest + | `security_content_ctime(firstTime)` + | `security_content_ctime(lastTime)` + | `short_lived_scheduled_task_filter` how_to_implement: To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4698 EventCode enabled. The Windows TA is also required. known_false_positives: Although uncommon, legitimate applications may create and delete a Scheduled Task within 30 seconds. Filter as needed. references: From 0e6d9a55ea688f52167dc58498900ba5470d1321 Mon Sep 17 00:00:00 2001 From: nasbench <8741929+nasbench@users.noreply.github.com> Date: Fri, 17 Jul 2026 14:30:44 +0200 Subject: [PATCH 2/3] Update short_lived_scheduled_task.yml --- .../endpoint/short_lived_scheduled_task.yml | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/detections/endpoint/short_lived_scheduled_task.yml b/detections/endpoint/short_lived_scheduled_task.yml index 09b2cdfcf2..12455757b6 100644 --- a/detections/endpoint/short_lived_scheduled_task.yml +++ b/detections/endpoint/short_lived_scheduled_task.yml @@ -5,21 +5,30 @@ creation_date: '2021-12-03' modification_date: '2026-07-07' author: Mauricio Velazco, Splunk status: production -type: TTP -description: The following analytic detects the creation and deletion of scheduled tasks within a short time frame (less than 30 seconds) using Windows Security EventCodes 4698 and 4699. This behavior is identified by analyzing Windows Security Event Logs and leveraging the Windows TA for parsing. Such activity is significant as it may indicate lateral movement or remote code execution attempts by adversaries. If confirmed malicious, this could lead to unauthorized access, data exfiltration, or execution of malicious payloads, necessitating prompt investigation and response by security analysts. +type: Anomaly +description: |- + The following analytic detects the creation and deletion of scheduled tasks within a short time frame (less than 30 seconds) using Windows Security EventCodes 4698 and 4699. + This behavior is identified by analyzing Windows Security Event Logs and leveraging the Windows TA for parsing. + Such activity may indicate lateral movement or remote code execution attempts by adversaries. + If confirmed malicious, this could lead to unauthorized access, data exfiltration, or execution of malicious payloads, necessitating prompt investigation and response by security analysts. data_source: - Windows Event Log Security 4698 - Windows Event Log Security 4699 search: |- - `wineventlog_security` EventCode=4698 OR EventCode=4699 + `wineventlog_security` + EventCode IN (4698, 4699) | xmlkv object_attrs | transaction TaskName dest startswith=(EventCode=4698) endswith=(EventCode=4699) maxspan=30s - | stats count, min(_time) AS firstTime, max(_time) AS lastTime by Command, TaskName, user, dest + | stats count min(_time) AS firstTime + max(_time) AS lastTime + by Command TaskName user dest RunLevel | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `short_lived_scheduled_task_filter` -how_to_implement: To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4698 EventCode enabled. The Windows TA is also required. -known_false_positives: Although uncommon, legitimate applications may create and delete a Scheduled Task within 30 seconds. Filter as needed. +how_to_implement: |- + To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4698 EventCode enabled. The Windows TA is also required. +known_false_positives: |- + Although uncommon, legitimate applications may create and delete a Scheduled Task within 30 seconds. Filter as needed. references: - https://attack.mitre.org/techniques/T1053/005/ - https://docs.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler @@ -32,12 +41,12 @@ drilldown_searches: search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset: 7d latest_offset: "0" -finding: - title: A windows scheduled task was created and deleted in 30 seconds on $dest$ - entity: - field: dest - type: system - score: 50 +intermediate_findings: + entities: + - field: dest + type: system + score: 20 + message: A windows scheduled task $TaskName$ was created by $user$ and deleted in less than 30 seconds on $dest$ analytic_story: - Active Directory Lateral Movement - CISA AA22-257A @@ -56,7 +65,7 @@ security_domain: endpoint tests: - name: True Positive Test attack_data: - - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/lateral_movement/windows-security.log - source: WinEventLog:Security - sourcetype: WinEventLog + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/lateral_movement/windows-security-task.log + source: XmlWinEventLog:Security + sourcetype: XmlWinEventLog test_type: unit From fd1fe9b4ecda1014d2b561b2d901924a441fa458 Mon Sep 17 00:00:00 2001 From: nasbench <8741929+nasbench@users.noreply.github.com> Date: Fri, 17 Jul 2026 14:34:12 +0200 Subject: [PATCH 3/3] Update short_lived_scheduled_task.yml --- detections/endpoint/short_lived_scheduled_task.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detections/endpoint/short_lived_scheduled_task.yml b/detections/endpoint/short_lived_scheduled_task.yml index 12455757b6..e95de1b7ae 100644 --- a/detections/endpoint/short_lived_scheduled_task.yml +++ b/detections/endpoint/short_lived_scheduled_task.yml @@ -46,7 +46,7 @@ intermediate_findings: - field: dest type: system score: 20 - message: A windows scheduled task $TaskName$ was created by $user$ and deleted in less than 30 seconds on $dest$ + message: A windows scheduled task [$TaskName$] with the command [$Command$] was created by [$user$] and deleted in less than 30 seconds on [$dest$] analytic_story: - Active Directory Lateral Movement - CISA AA22-257A