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"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/10/23"
 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.*", "logs-windows.*", "endgame-*"]
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"
23setup = """
24
25If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
26events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
27Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
28`event.ingested` to @timestamp.
29For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
30"""
31severity = "low"
32tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Privilege Escalation", "Tactic: Persistence", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
33timestamp_override = "event.ingested"
34type = "eql"
35
36query = '''
37file where host.os.type == "windows" and event.type != "deletion" and
38  file.path : ("?:\\Windows\\SYSVOL\\domain\\Policies\\*\\MACHINE\\Preferences\\ScheduledTasks\\ScheduledTasks.xml",
39               "?:\\Windows\\SYSVOL\\domain\\Policies\\*\\MACHINE\\Preferences\\Services\\Services.xml") and
40  not process.name : "dfsrs.exe"
41'''
42
43
44[[rule.threat]]
45framework = "MITRE ATT&CK"
46[[rule.threat.technique]]
47id = "T1484"
48name = "Domain Policy Modification"
49reference = "https://attack.mitre.org/techniques/T1484/"
50[[rule.threat.technique.subtechnique]]
51id = "T1484.001"
52name = "Group Policy Modification"
53reference = "https://attack.mitre.org/techniques/T1484/001/"
54
55
56
57[rule.threat.tactic]
58id = "TA0004"
59name = "Privilege Escalation"
60reference = "https://attack.mitre.org/tactics/TA0004/"
61
62[[rule.threat]]
63framework = "MITRE ATT&CK"
64[[rule.threat.technique]]
65id = "T1053"
66name = "Scheduled Task/Job"
67reference = "https://attack.mitre.org/techniques/T1053/"
68[[rule.threat.technique.subtechnique]]
69id = "T1053.005"
70name = "Scheduled Task"
71reference = "https://attack.mitre.org/techniques/T1053/005/"
72
73
74
75[rule.threat.tactic]
76id = "TA0003"
77name = "Persistence"
78reference = "https://attack.mitre.org/tactics/TA0003/"

Related rules

to-top