Name:Windows Group Policy Object Created id:23add2a8-ea22-4fd4-8bc0-8c0b822373a1 version:4 date:2024-09-30 author:Mauricio Velazco status:production type:TTP Description:The following analytic detects the creation of a new Group Policy Object (GPO) by leveraging Event IDs 5136 and 5137. This detection uses directory service change events to identify when a new GPO is created. Monitoring GPO creation is crucial as adversaries can exploit GPOs to escalate privileges or deploy malware across an Active Directory network. If confirmed malicious, this activity could allow attackers to control system configurations, deploy ransomware, or propagate malware, leading to widespread compromise and significant operational disruption. Data_source:
-Windows Event Log Security 5136
-Windows Event Log Security 5137
search:`wineventlog_security` EventCode=5137 OR (EventCode=5136 AttributeValue!="New Group Policy Object" AND (AttributeLDAPDisplayName=displayName OR AttributeLDAPDisplayName=gPCFileSysPath) ) ObjectClass=groupPolicyContainer | stats values(AttributeValue) as details values(SubjectUserSid) as User values(ObjectDN) as ObjectDN by ObjectGUID Computer | eval GPO_Name = mvindex(details, 0) | eval GPO_Path = mvindex(details, 1) | fields - details | `windows_group_policy_object_created_filter`
how_to_implement: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:Group Policy Objects are created as part of regular administrative operations, filter as needed. References: -https://attack.mitre.org/techniques/T1484/ -https://attack.mitre.org/techniques/T1484/001 -https://www.trustedsec.com/blog/weaponizing-group-policy-objects-access/ -https://adsecurity.org/?p=2716 -https://www.bleepingcomputer.com/news/security/lockbit-ransomware-now-encrypts-windows-domains-using-group-policies/ -https://www.varonis.com/blog/group-policy-objects drilldown_searches: name:'View the detection results for - "$User$"' search:'%original_detection_search% | search User = "$User$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$User$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$User$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' tags: analytic_story: - 'Active Directory Privilege Escalation' - 'Sneaky Active Directory Persistence Tricks' asset_type:Endpoint confidence:50 impact:80 message:A new group policy objected was created by $User$ mitre_attack_id: - 'T1484' - 'T1484.001' - 'T1078.002' observable: name:'User' type:'User' - role: - 'Victim' product: - 'Splunk Enterprise' - 'Splunk Enterprise Security' - 'Splunk Cloud' required_fields: - '_time' - 'EventCode' - 'AttributeValue' - 'AttributeLDAPDisplayName' - 'ObjectClass' - 'SubjectUserSid' - 'ObjectDN' - 'ObjectGUID' - 'Computer' risk_score:40 security_domain:endpoint