ID | Technique | Tactic |
---|---|---|
T1562.001 | Disable or Modify Tools | Defense Evasion |
T1484.001 | Group Policy Modification | Defense Evasion |
Detection: Windows AD GPO Deleted
Description
This detection identifies when an Active Directory Group Policy is deleted using the Group Policy Management Console.
Search
1`wineventlog_security` EventCode=5136 AttributeLDAPDisplayName=gpLink
2| eval ObjectDN=upper(ObjectDN)
3| stats min(_time) as eventTime values(eval(if(OperationType=="%%14675",AttributeValue,null))) as old_value values(eval(if(OperationType=="%%14674",AttributeValue,null))) as new_value values(OperationType) as OperationType values(src_user) as src_user by OpCorrelationID ObjectDN SubjectLogonId
4| rex field=old_value max_match=10000 "(?i)LDAP://(?P<old_dn>cn.*?);(?P<old_flag>\d)\]"
5| rex field=new_value max_match=10000 "(?i)LDAP://(?P<new_dn>cn.*?);(?P<new_flag>\d)\]"
6| mvexpand old_dn
7| where NOT old_dn IN (new_dn)
8| eval ObjectDN=upper(old_dn)
9| join ObjectDN type=outer [
10| search `admon` objectCategory="CN=Group-Policy-Container*" admonEventType=Update
11| eval ObjectDN=upper(distinguishedName)
12| stats latest(displayName) as displayName by ObjectDN ]
13| stats min(eventTime) as _time values(OpCorrelationID) as OpCorrelationID values(displayName) as policyName values(src_user) as src_user by ObjectDN SubjectLogonId
14| `windows_ad_gpo_deleted_filter`
Data Source
No data sources specified for this detection.
Macros Used
Name | Value |
---|---|
admon | source=ActiveDirectory |
windows_ad_gpo_deleted_filter | search * |
windows_ad_gpo_deleted_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
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 Notable | Yes |
Rule Title | %name% |
Rule Description | %description% |
Notable Event Fields | user, dest |
Creates Risk Event | True |
Implementation
Ensure you are ingesting Active Directory audit logs - specifically event 5136, admon data is also used to display the display name of the GPO. See lantern article in references for further on how to onboard AD audit data. Ensure the wineventlog_security and admon macros are configured with the correct indexes.
Known False Positives
Unknown
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
GPO $policyName$ was deleted by $src_user$ | 64 | 80 | 80 |
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: 2