1
1
name : Windows AD Suspicious GPO Modification
2
2
id : 0a2afc18-a3b5-4452-b60a-2e774214f9bf
3
3
version : 7
4
- date : ' 2025-06-10 '
4
+ date : ' 2025-06-16 '
5
5
author : Dean Luxton
6
- status : production
6
+ status : deprecated
7
7
type : TTP
8
8
data_source :
9
9
- Windows Event Log Security 5136
10
10
- Windows Event Log Security 5145
11
- description : |
12
- This analytic looks for a the creation of potentially harmful GPO which
11
+ description : This analytic looks for a the creation of potentially harmful GPO which
13
12
could lead to persistence or code execution on remote hosts. Note, this analyic
14
13
is looking for the absence of the corresponding 5136 events which is evidence of
15
14
the GPOs being manually edited (using a tool like PowerView) or potentially missing
@@ -27,7 +26,7 @@ search: "`wineventlog_security` EventCode=5145 ShareName=\"\\\\\\\\*\\\\SYSVOL\"
27
26
$gpo_guid$\" \n | stats min(_time) as _time values(eval(if(OperationType==\" %%14675\" \
28
27
,AttributeValue,null))) as old_value values(eval(if(OperationType==\" %%14674\" ,AttributeValue,null)))
29
28
as new_value values(OperationType) as OperationType by ObjectClass ObjectDN OpCorrelationID
30
- src_user SubjectLogonId dest \n | rex field=old_value max_match=10000 \" (?P<old_values>\\ \
29
+ src_user SubjectLogonId \n | rex field=old_value max_match=10000 \" (?P<old_values>\\ \
31
30
{.*?\\ })\" \n | rex field=new_value max_match=10000 \" (?P<new_values>\\ {.*?\\ })\" \
32
31
\ \n | rex field=ObjectDN max_match=10000 \" CN=(?P<policy_guid>\\ {.*?\\ })\" \n \
33
32
\ | mvexpand new_values \n | where NOT new_values IN (old_values,\" {00000000-0000-0000-0000-000000000000}\" \
@@ -41,34 +40,20 @@ search: "`wineventlog_security` EventCode=5145 ShareName=\"\\\\\\\\*\\\\SYSVOL\"
41
40
values(Logon_ID) as Logon_ID values(newPolicy) as newPolicy values(OpCorrelationID)
42
41
as OpCorrelationID values(folder) as folder values(file) as file by gpo_guid |
43
42
mvexpand folder | where NOT folder IN (newPolicy) | `windows_ad_suspicious_gpo_modification_filter`"
44
- how_to_implement : |
45
- Ingest EventCodes 5145 and 5136 from domain controllers. Additional
43
+ how_to_implement : Ingest EventCodes 5145 and 5136 from domain controllers. Additional
46
44
SACLs required to capture EventCode 5136, see references for further information
47
45
on how to configure this. The Group Policy - Audit Detailed File Share will need
48
46
to be enabled on the DCs to generate event code 5145, this event is very noisy on
49
47
DCs, consider tuning out sysvol events which do not match access mask 0x2.
50
- known_false_positives : When a GPO is manually edited and 5136 events are not logging to Splunk.
48
+ known_false_positives : When a GPO is manually edited and 5136 events are not logging
49
+ to Splunk.
51
50
references :
52
51
- https://github.com/PowerShellMafia/PowerSploit/blob/26a0757612e5654b4f792b012ab8f10f95d391c9/Recon/PowerView.ps1#L5907-L6122
53
52
- https://github.com/X-C3LL/GPOwned
54
53
- https://rastamouse.me/ous-and-gpos-and-wmi-filters-oh-my/
55
54
- https://wald0.com/?p=179
56
55
- https://github.com/FSecureLABS/SharpGPOAbuse
57
56
- https://lantern.splunk.com/Security/Product_Tips/Enterprise_Security/Enabling_an_audit_trail_from_Active_Directory
58
- drilldown_searches :
59
- - name : View the detection results for - "$dest$"
60
- search : ' %original_detection_search% | search dest = "$dest$"'
61
- earliest_offset : $info_min_time$
62
- latest_offset : $info_max_time$
63
- - name : View risk events for the last 7 days for - "$dest$"
64
- search : ' | from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
65
- starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
66
- values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
67
- as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
68
- as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
69
- | `security_content_ctime(lastTime)`'
70
- earliest_offset : $info_min_time$
71
- latest_offset : $info_max_time$
72
57
rba :
73
58
message : $src_user$ has added new GPO Client Side Extensions $folder$ to the policy
74
59
$gpo_guid$
98
83
- data :
99
84
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1484.001/group_policy_new_cse/windows-security.log
100
85
source : XmlWinEventLog:Security
101
- sourcetype : XmlWinEventLog
86
+ sourcetype : XmlWinEventLog
0 commit comments