Detection: Windows Default Group Policy Object Modified
Description
The following analytic detects modifications to default Group Policy Objects (GPOs) using Event ID 5136. It monitors changes to the Default Domain Controllers Policy and Default Domain Policy, which are critical for enforcing security settings across domain controllers and all users/computers, respectively. This activity is significant because unauthorized changes to these GPOs can indicate an adversary with privileged access attempting to deploy persistence mechanisms or execute malware across the network. If confirmed malicious, such modifications could lead to widespread compromise, allowing attackers to maintain control and execute arbitrary code on numerous hosts.
Search
1`wineventlog_security` EventCode=5136 ObjectClass=groupPolicyContainer AttributeLDAPDisplayName=versionNumber (ObjectDN="CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=POLICIES,CN=SYSTEM,DC=*" OR ObjectDN="CN={6AC1786C-016F-11D2-945F-00C04fB984F9},CN=POLICIES,CN=SYSTEM,DC=*")
2
3| stats min(_time) as firstTime max(_time) as lastTime
4 BY ObjectDN SubjectUserSid AttributeValue
5 Computer DSName dest
6
7| rename AttributeValue as versionNumber
8
9| `security_content_ctime(firstTime)`
10
11| `security_content_ctime(lastTime)`
12
13| `windows_default_group_policy_object_modified_filter`
Data Source
Macros Used
| Name |
Value |
| wineventlog_security |
eventtype="wineventlog_security" OR Channel="security" OR source="XmlWinEventLog:Security" OR source="WinEventLog:Security" |
| windows_default_group_policy_object_modified_filter |
search * |
windows_default_group_policy_object_modified_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
| ID |
Technique |
Tactic |
| T1484.001 |
Group Policy Modification |
Defense Impairment |
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting |
Value |
| Disabled |
true |
| Cron Schedule |
0 * * * * |
| Earliest Time |
-70m@m |
| Latest Time |
-10m@m |
| Schedule Window |
auto |
| Creates Finding (Notable) |
Yes |
| Rule Title |
%name% |
| Rule Description |
%description% |
| Notable Event Fields |
user, dest |
| Creates Intermediate Finding (Risk Event) |
Yes |
TTP detections generate a Finding (Notable) and may generate Intermediate Findings (Risk Events) for associated entities.
Implementation
To successfully implement this search, the Advanced Security Audit policy setting Audit Directory Service Changes within DS Access needs to be enabled. Furthermore, the appropriate system access control lists (SACL) need to be created as the used events are not logged by default. A good guide to accomplish this can be found here https://jgspiers.com/audit-group-policy-changes/.
Known False Positives
The default Group Policy Objects within an AD network may be legitimately updated for administrative operations, filter as needed.
Associated Analytic Story
Finding
| Title |
Entity Field |
Entity Type |
Risk Score |
| A default group policy object was modified on $Computer$ by $SubjectUserSid$ |
SubjectUserSid |
user |
50 |
| Message |
Entity Field |
Entity Type |
Risk Score |
| A default group policy object was modified on $Computer$ by $SubjectUserSid$ |
Computer |
system |
50 |
References
Detection Testing
| Test Type |
Status |
Dataset |
Source |
Sourcetype |
| Validation |
✅ Passing |
N/A |
N/A |
N/A |
| Unit |
✅ Passing |
Dataset |
XmlWinEventLog:Security |
XmlWinEventLog |
| Integration |
✅ Passing |
Dataset |
XmlWinEventLog:Security |
XmlWinEventLog |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 13