Creation or Modification of a new GPO Scheduled Task or Service

Detects the creation or modification of a new Group Policy based scheduled task or service. These methods are used for legitimate system administration, but can also be abused by an attacker with domain admin permissions to execute a malicious payload remotely on all or a subset of the domain joined machines.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/08/13"
 3integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
 4maturity = "production"
 5updated_date = "2024/10/15"
 6min_stack_version = "8.14.0"
 7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Detects the creation or modification of a new Group Policy based scheduled task or service. These methods are used for
13legitimate system administration, but can also be abused by an attacker with domain admin permissions to execute a
14malicious payload remotely on all or a subset of the domain joined machines.
15"""
16from = "now-9m"
17index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Creation or Modification of a new GPO Scheduled Task or Service"
21risk_score = 21
22rule_id = "c0429aa8-9974-42da-bfb6-53a0a515a145"
23severity = "low"
24tags = [
25    "Domain: Endpoint",
26    "OS: Windows",
27    "Use Case: Threat Detection",
28    "Tactic: Privilege Escalation",
29    "Tactic: Persistence",
30    "Data Source: Elastic Endgame",
31    "Data Source: Elastic Defend",
32    "Data Source: Sysmon",
33    "Data Source: Microsoft Defender for Endpoint",
34    "Data Source: SentinelOne",
35]
36timestamp_override = "event.ingested"
37type = "eql"
38
39query = '''
40file where host.os.type == "windows" and event.type != "deletion" and event.action != "open" and 
41 file.name : ("ScheduledTasks.xml", "Services.xml") and 
42  file.path : (
43    "?:\\Windows\\SYSVOL\\domain\\Policies\\*\\MACHINE\\Preferences\\ScheduledTasks\\ScheduledTasks.xml",
44    "?:\\Windows\\SYSVOL\\domain\\Policies\\*\\MACHINE\\Preferences\\Services\\Services.xml"
45  ) and
46  not process.executable : "C:\\Windows\\System32\\dfsrs.exe"
47'''
48
49
50[[rule.threat]]
51framework = "MITRE ATT&CK"
52[[rule.threat.technique]]
53id = "T1484"
54name = "Domain or Tenant Policy Modification"
55reference = "https://attack.mitre.org/techniques/T1484/"
56[[rule.threat.technique.subtechnique]]
57id = "T1484.001"
58name = "Group Policy Modification"
59reference = "https://attack.mitre.org/techniques/T1484/001/"
60
61
62
63[rule.threat.tactic]
64id = "TA0004"
65name = "Privilege Escalation"
66reference = "https://attack.mitre.org/tactics/TA0004/"
67[[rule.threat]]
68framework = "MITRE ATT&CK"
69[[rule.threat.technique]]
70id = "T1053"
71name = "Scheduled Task/Job"
72reference = "https://attack.mitre.org/techniques/T1053/"
73[[rule.threat.technique.subtechnique]]
74id = "T1053.005"
75name = "Scheduled Task"
76reference = "https://attack.mitre.org/techniques/T1053/005/"
77
78
79
80[rule.threat.tactic]
81id = "TA0003"
82name = "Persistence"
83reference = "https://attack.mitre.org/tactics/TA0003/"

Related rules

to-top