Detection rules › Splunk

Windows Group Policy Object Created

Status
production
Severity
medium
Group by
ObjectGUID, computer_name, dest
Author
Mauricio Velazco
Source
github.com/splunk/security_content

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.

MITRE ATT&CK coverage

Event coverage

Rule body splunk

name: Windows Group Policy Object Created
id: 23add2a8-ea22-4fd4-8bc0-8c0b822373a1
version: 12
creation_date: '2023-03-28'
modification_date: '2026-05-13'
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 dest
      | 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$") | 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: 7d
      latest_offset: "0"
finding:
    title: A new group policy objected was created by $User$
    entity:
        field: User
        type: user
        score: 50
analytic_story:
    - Active Directory Privilege Escalation
    - Sneaky Active Directory Persistence Tricks
asset_type: Endpoint
mitre_attack_id:
    - T1078.002
    - T1484.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1484.001/group_policy_created/windows-security.log
          source: XmlWinEventLog:Security
          sourcetype: XmlWinEventLog
      test_type: unit

Stages and Predicates

Stage 1: search

`wineventlog_security` EventCode=5137 OR (EventCode=5136 AttributeValue!="New Group Policy Object" AND (AttributeLDAPDisplayName=displayName OR AttributeLDAPDisplayName=gPCFileSysPath) ) ObjectClass=groupPolicyContainer

Stage 2: stats

| stats values(AttributeValue) as details values(SubjectUserSid) as User values(ObjectDN) as ObjectDN
    BY ObjectGUID Computer dest

Stage 3: eval

| eval GPO_Name = mvindex(details, 0)

Stage 4: eval

| eval GPO_Path = mvindex(details, 1)

Stage 5: fields

| fields - details

Stage 6: search

| `windows_group_policy_object_created_filter`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
AttributeLDAPDisplayNameeq
  • displayName
  • gPCFileSysPath
AttributeValuene
  • "New Group Policy Object"
EventCodeeq
  • 5136 corpus 30 (splunk 24, kusto 5, elastic 1)
  • 5137 corpus 6 (splunk 5, elastic 1)
ObjectClasseq
  • groupPolicyContainer corpus 6 (sigma 3, splunk 3)