[Rule Tuning] Local Scheduled Task Commands (#1043)
* Update persistence_local_scheduled_task_commands.toml Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com> Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
[metadata]
|
||||
creation_date = "2020/02/18"
|
||||
maturity = "production"
|
||||
updated_date = "2021/03/03"
|
||||
|
||||
[rule]
|
||||
author = ["Elastic"]
|
||||
description = "A scheduled task can be used by an adversary to establish persistence, move laterally, and/or escalate privileges."
|
||||
false_positives = ["Legitimate scheduled tasks may be created during installation of new software."]
|
||||
from = "now-9m"
|
||||
index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
|
||||
language = "kuery"
|
||||
license = "Elastic License v2"
|
||||
name = "Local Scheduled Task Commands"
|
||||
risk_score = 21
|
||||
rule_id = "afcce5ad-65de-4ed2-8516-5e093d3ac99a"
|
||||
severity = "low"
|
||||
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Persistence"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "query"
|
||||
|
||||
query = '''
|
||||
event.category:process and event.type:(start or process_started) and
|
||||
process.name:schtasks.exe and
|
||||
process.args:(-change or -create or -run or -s or /S or /change or /create or /run)
|
||||
'''
|
||||
|
||||
|
||||
[[rule.threat]]
|
||||
framework = "MITRE ATT&CK"
|
||||
[[rule.threat.technique]]
|
||||
id = "T1053"
|
||||
name = "Scheduled Task/Job"
|
||||
reference = "https://attack.mitre.org/techniques/T1053/"
|
||||
|
||||
|
||||
[rule.threat.tactic]
|
||||
id = "TA0003"
|
||||
name = "Persistence"
|
||||
reference = "https://attack.mitre.org/tactics/TA0003/"
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
[metadata]
|
||||
creation_date = "2020/02/18"
|
||||
maturity = "production"
|
||||
updated_date = "2021/03/15"
|
||||
|
||||
[rule]
|
||||
author = ["Elastic"]
|
||||
description = "A scheduled task can be used by an adversary to establish persistence, move laterally, and/or escalate privileges."
|
||||
false_positives = ["Legitimate scheduled tasks may be created during installation of new software."]
|
||||
from = "now-9m"
|
||||
index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
|
||||
language = "eql"
|
||||
license = "Elastic License v2"
|
||||
name = "Local Scheduled Task Creation"
|
||||
risk_score = 21
|
||||
rule_id = "afcce5ad-65de-4ed2-8516-5e093d3ac99a"
|
||||
severity = "low"
|
||||
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Persistence"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "eql"
|
||||
|
||||
query = '''
|
||||
sequence with maxspan=1m
|
||||
[process where event.type != "end" and
|
||||
((process.name : ("cmd.exe", "wscript.exe", "rundll32.exe", "regsvr32.exe", "wmic.exe", "mshta.exe",
|
||||
"powershell.exe", "pwsh.exe", "WmiPrvSe.exe", "wsmprovhost.exe", "winrshost.exe") or
|
||||
process.pe.original_file_name : ("cmd.exe", "wscript.exe", "rundll32.exe", "regsvr32.exe", "wmic.exe", "mshta.exe",
|
||||
"powershell.exe", "pwsh.exe", "WmiPrvSe.exe", "wsmprovhost.exe",
|
||||
"winrshost.exe")) or
|
||||
process.code_signature.trusted == false)] by process.entity_id
|
||||
[process where event.type == "start" and
|
||||
(process.name : "schtasks.exe" or process.pe.original_file_name == "schtasks.exe") and
|
||||
process.args : ("/create", "-create") and process.args : ("/RU", "/SC", "/TN", "/TR", "/F", "/XML") and
|
||||
/* exclude SYSTEM SIDs - look for task creations by non-SYSTEM user */
|
||||
not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20")] by process.parent.entity_id
|
||||
'''
|
||||
|
||||
|
||||
[[rule.threat]]
|
||||
framework = "MITRE ATT&CK"
|
||||
[[rule.threat.technique]]
|
||||
id = "T1053"
|
||||
name = "Scheduled Task/Job"
|
||||
reference = "https://attack.mitre.org/techniques/T1053/"
|
||||
|
||||
[[rule.threat.technique.subtechnique]]
|
||||
id = "T1053.005"
|
||||
name = "Scheduled Task"
|
||||
reference = "https://attack.mitre.org/techniques/T1053/005/"
|
||||
|
||||
|
||||
|
||||
[rule.threat.tactic]
|
||||
id = "TA0003"
|
||||
name = "Persistence"
|
||||
reference = "https://attack.mitre.org/tactics/TA0003/"
|
||||
|
||||
Reference in New Issue
Block a user