From 5244151b2edaff39745ff10cead2f4a35ff808c2 Mon Sep 17 00:00:00 2001 From: Samirbous <64742097+Samirbous@users.noreply.github.com> Date: Tue, 15 Dec 2020 19:10:52 +0100 Subject: [PATCH] [New Rule] Outbound Scheduled Tasks Activity via PowerShell (#725) * [New Rule] Outbound Scheduled Tasks Activity via PowerShell * Update rules/windows/lateral_movement_scheduled_task_powershell_source.toml Co-authored-by: dstepanic17 <57736958+dstepanic17@users.noreply.github.com> * fixed - added pwsh to seq_netblock * Update rules/windows/lateral_movement_scheduled_task_powershell_source.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * Update rules/windows/lateral_movement_scheduled_task_powershell_source.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * Update rules/windows/lateral_movement_scheduled_task_powershell_source.toml Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> * relinted Co-authored-by: dstepanic17 <57736958+dstepanic17@users.noreply.github.com> Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com> --- ...ment_scheduled_task_powershell_source.toml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 rules/windows/lateral_movement_scheduled_task_powershell_source.toml diff --git a/rules/windows/lateral_movement_scheduled_task_powershell_source.toml b/rules/windows/lateral_movement_scheduled_task_powershell_source.toml new file mode 100644 index 000000000..75a53bd30 --- /dev/null +++ b/rules/windows/lateral_movement_scheduled_task_powershell_source.toml @@ -0,0 +1,46 @@ +[metadata] +creation_date = "2020/12/15" +maturity = "production" +updated_date = "2020/12/15" + +[rule] +author = ["Elastic"] +description = """ +Identifies the PowerShell process loading the Task Scheduler COM DLL followed by an outbound RPC network connection +within a short time period. This may indicate lateral movement or remote discovery via scheduled tasks. +""" +false_positives = ["Legitimate scheduled tasks may be created during installation of new software."] +from = "now-9m" +index = ["winlogbeat-*", "logs-endpoint.events.*"] +language = "eql" +license = "Elastic License" +name = "Outbound Scheduled Task Activity via PowerShell" +references = [ + "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/", +] +risk_score = 47 +rule_id = "5cd55388-a19c-47c7-8ec4-f41656c2fded" +severity = "medium" +tags = ["Elastic", "Host", "Windows", "Threat Detection", "Discovery", "Lateral Movement"] +type = "eql" + +query = ''' +sequence by host.id, process.entity_id with maxspan = 5s + [library where file.name: "taskschd.dll" and process.name: ("powershell.exe", "pwsh.exe")] + [network where process.name : ("powershell.exe", "pwsh.exe") and destination.port == 135 and not destination.address in ("127.0.0.1", "::1")] +''' + + +[[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 = "TA0008" +name = "Lateral Movement" +reference = "https://attack.mitre.org/tactics/TA0008/" +