Outbound Scheduled Task Activity via PowerShell

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.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/12/15"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/02/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the PowerShell process loading the Task Scheduler COM DLL followed by an outbound RPC network connection
13within a short time period. This may indicate lateral movement or remote discovery via scheduled tasks.
14"""
15false_positives = ["Legitimate scheduled tasks may be created during installation of new software."]
16from = "now-9m"
17index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Outbound Scheduled Task Activity via PowerShell"
21references = [
22    "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/",
23]
24risk_score = 47
25rule_id = "5cd55388-a19c-47c7-8ec4-f41656c2fded"
26severity = "medium"
27tags = ["Elastic", "Host", "Windows", "Threat Detection", "Execution"]
28type = "eql"
29
30query = '''
31sequence by host.id, process.entity_id with maxspan = 5s
32 [any where host.os.type == "windows" and (event.category == "library" or (event.category == "process" and event.action : "Image loaded*")) and
33  (dll.name : "taskschd.dll" or file.name : "taskschd.dll") and process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe")]
34 [network where host.os.type == "windows" and process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") and destination.port == 135 and not destination.address in ("127.0.0.1", "::1")]
35'''
36
37
38[[rule.threat]]
39framework = "MITRE ATT&CK"
40[[rule.threat.technique]]
41id = "T1053"
42name = "Scheduled Task/Job"
43reference = "https://attack.mitre.org/techniques/T1053/"
44[[rule.threat.technique.subtechnique]]
45id = "T1053.005"
46name = "Scheduled Task"
47reference = "https://attack.mitre.org/techniques/T1053/005/"
48
49
50
51[rule.threat.tactic]
52id = "TA0002"
53name = "Execution"
54reference = "https://attack.mitre.org/tactics/TA0002/"

to-top