2020-12-03 23:10:51 +01:00
[ metadata ]
creation_date = "2020/11/29"
2023-01-04 09:30:07 -05:00
integration = [ "endpoint" , "windows" ]
2020-12-03 23:10:51 +01:00
maturity = "production"
2026-05-04 11:17:05 -03:00
updated_date = "2026/05/04"
2020-12-03 23:10:51 +01:00
[ rule ]
author = [ "Elastic" ]
2021-01-28 20:53:57 -09:00
description = "" "
A scheduled task was created by a Windows script via cscript.exe, wscript.exe or powershell.exe. This can be abused by
an adversary to establish persistence.
" ""
2020-12-03 23:10:51 +01:00
false_positives = [ "Legitimate scheduled tasks may be created during installation of new software." ]
from = "now-9m"
2024-05-23 00:45:10 +05:30
index = [
"winlogbeat-*" ,
"logs-endpoint.events.registry-*" ,
"logs-endpoint.events.library-*" ,
"logs-windows.sysmon_operational-*" ,
"endgame-*" ,
]
2020-12-03 23:10:51 +01:00
language = "eql"
2021-03-03 22:12:11 -09:00
license = "Elastic License v2"
2020-12-03 23:10:51 +01:00
name = "Scheduled Task Created by a Windows Script"
2021-05-10 13:40:56 -08:00
note = "" "## Triage and analysis
Decode the base64 encoded Tasks Actions registry value to investigate the task's configured action." ""
2021-02-03 11:09:29 -05:00
risk_score = 47
2020-12-03 23:10:51 +01:00
rule_id = "689b9d57-e4d5-4357-ad17-9c334609d79a"
severity = "medium"
2024-05-23 00:45:10 +05:30
tags = [
"Domain: Endpoint" ,
"OS: Windows" ,
"Use Case: Threat Detection" ,
"Tactic: Persistence" ,
"Tactic: Execution" ,
"Data Source: Elastic Endgame" ,
"Data Source: Elastic Defend" ,
"Data Source: Sysmon" ,
2025-01-22 11:17:38 -06:00
"Resources: Investigation Guide" ,
2024-05-23 00:45:10 +05:30
]
2020-12-03 23:10:51 +01:00
type = "eql"
query = '' '
sequence by host.id with maxspan = 30s
2023-03-06 12:47:11 -03:00
[any where host.os.type == "windows" and
(event.category : ("library", "driver") or (event.category == "process" and event.action : "Image loaded*")) and
2024-03-13 10:27:44 -03:00
(?dll.name : "taskschd.dll" or file.name : "taskschd.dll") and
2023-03-06 12:47:11 -03:00
process.name : ("cscript.exe", "wscript.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe")]
2024-08-06 08:45:08 -03:00
[registry where host.os.type == "windows" and event.type == "change" and registry.value : "Actions" and
registry.path : (
"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\TaskCache\\Tasks\\*\\Actions",
"\\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\TaskCache\\Tasks\\*\\Actions"
)]
2020-12-03 23:10:51 +01:00
' ''
2026-05-04 11:17:05 -03:00
setup = "" "## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [Sysmon Event ID 7 - Image Loaded](https://ela.st/sysmon-event-7-setup)
- [Sysmon Registry Events](https://ela.st/sysmon-event-reg-setup)
" ""
2020-12-03 23:10:51 +01:00
[ [ rule . threat ] ]
framework = "MITRE ATT&CK"
[ [ rule . threat . technique ] ]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"
2023-01-04 09:30:07 -05:00
[ [ rule . threat . technique . subtechnique ] ]
id = "T1053.005"
name = "Scheduled Task"
reference = "https://attack.mitre.org/techniques/T1053/005/"
2020-12-03 23:10:51 +01:00
2021-09-23 14:08:38 -03:00
2020-12-03 23:10:51 +01:00
[ rule . threat . tactic ]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
2023-10-15 18:12:20 -03:00
[ [ rule . threat ] ]
framework = "MITRE ATT&CK"
[ [ rule . threat . technique ] ]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[ [ rule . threat . technique . subtechnique ] ]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"
[ [ rule . threat . technique . subtechnique ] ]
id = "T1059.005"
name = "Visual Basic"
reference = "https://attack.mitre.org/techniques/T1059/005/"
[ rule . threat . tactic ]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"