Detection rules › Splunk
Windows AD GPO New CSE Addition
This detection identifies when a a new client side extension is added to an Active Directory Group Policy using the Group Policy Management Console.
Known false positives
- General usage of group policy will trigger this detection, also please not GPOs modified using tools such as SharpGPOAbuse will not generate the AD audit events which enable this detection.
MITRE ATT&CK coverage
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 5136: A directory service object was modified. |
Rule body
name: Windows AD GPO New CSE Addition
id: 700c11d1-da09-47b2-81aa-358c143c7986
version: 10
creation_date: '2024-07-01'
modification_date: '2026-05-13'
author: Dean Luxton
status: production
type: TTP
description: This detection identifies when a a new client side extension is added to an Active Directory Group Policy using the Group Policy Management Console.
data_source:
- Windows Event Log Security 5136
search: |-
`wineventlog_security` EventCode=5136 ObjectClass=groupPolicyContainer AttributeLDAPDisplayName=gPCMachineExtensionNames
| stats min(_time) as _time 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(dest) as dest
BY ObjectClass ObjectDN OpCorrelationID
src_user SubjectLogonId
| rex field=old_value max_match=10000 "(?P<old_values>\{.*?\})"
| rex field=new_value max_match=10000 "(?P<new_values>\{.*?\})"
| rex field=ObjectDN max_match=10000 "CN=(?P<policy_guid>\{.*?\})"
| mvexpand new_values
| where NOT new_values IN (old_values,"{00000000-0000-0000-0000-000000000000}",policy_guid) AND match(new_values, "^\{[A-Z
| \d]+\-[A-Z
| \d]+\-[A-Z
| \d]+\-[A-Z
| \d]+\-[A-Z
| \d]+\}")
| lookup msad_guid_lookup guid as new_values OUTPUTNEW displayName as policyType
| eval newPolicy=if(policyType like "%",policyType,new_values)
| join ObjectDN [
| search `admon` objectCategory="CN=Group-Policy-Container*" admonEventType=Update
| stats latest(displayName) as displayName
BY distinguishedName
| eval ObjectDN=upper(distinguishedName)]
| stats values(OpCorrelationID) as OpCorrelationID values(src_user) as src_user values(SubjectLogonId) as SubjectLogonId values(newPolicy) as newPolicy values(displayName) as policyName
BY ObjectDN
| `windows_ad_gpo_new_cse_addition_filter`
how_to_implement: 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: General usage of group policy will trigger this detection, also please not GPOs modified using tools such as SharpGPOAbuse will not generate the AD audit events which enable this detection.
references:
- https://wald0.com/?p=179
- https://learn.microsoft.com/en-gb/archive/blogs/mempson/group-policy-client-side-extension-list
- https://lantern.splunk.com/Security/Product_Tips/Enterprise_Security/Enabling_an_audit_trail_from_Active_Directory
- https://github.com/FSecureLABS/SharpGPOAbuse
finding:
title: $src_user$ has added new GPO Client Side Extensions $newPolicy$ to the policy $policyName$
entity:
field: src_user
type: user
score: 50
analytic_story:
- Sneaky Active Directory Persistence Tricks
asset_type: Endpoint
mitre_attack_id:
- T1222.001
- T1484.001
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`wineventlog_security` EventCode=5136 ObjectClass=groupPolicyContainer AttributeLDAPDisplayName=gPCMachineExtensionNames
Stage 2: stats
| stats min(_time) as _time 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(dest) as dest
BY ObjectClass ObjectDN OpCorrelationID
src_user SubjectLogonId
Stage 3: rex
| rex field=old_value max_match=10000 "(?P<old_values>\{.*?\})"
Stage 4: rex
| rex field=new_value max_match=10000 "(?P<new_values>\{.*?\})"
Stage 5: rex
| rex field=ObjectDN max_match=10000 "CN=(?P<policy_guid>\{.*?\})"
Stage 6: mvexpand
| mvexpand new_values
Stage 7: where
| where NOT new_values IN (old_values,"{00000000-0000-0000-0000-000000000000}",policy_guid) AND match(new_values, "^\{[A-Z
| \d]+\-[A-Z
| \d]+\-[A-Z
| \d]+\-[A-Z
| \d]+\-[A-Z
| \d]+\}")
Stage 8: lookup
| lookup msad_guid_lookup guid as new_values OUTPUTNEW displayName as policyType
Stage 9: eval
| eval newPolicy=if(policyType like "%",policyType,new_values)
newPolicy =if
like(policyType, "%")policyTypeelse
new_valuesStage 10: join
| join ObjectDN [
| search `admon` objectCategory="CN=Group-Policy-Container*" admonEventType=Update
| stats latest(displayName) as displayName
BY distinguishedName
| eval ObjectDN=upper(distinguishedName)]
Stage 11: stats
| stats values(OpCorrelationID) as OpCorrelationID values(src_user) as src_user values(SubjectLogonId) as SubjectLogonId values(newPolicy) as newPolicy values(displayName) as policyName
BY ObjectDN
Stage 12: search
| `windows_ad_gpo_new_cse_addition_filter`
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
new_values | in | "{00000000-0000-0000-0000-000000000000}", old_values, policy_guid | excludes:new_values |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AttributeLDAPDisplayName | eq |
| field:"AttributeLDAPDisplayName" kind:eq value:"gPCMachineExtensionNames" |
EventCode | eq |
| field:"EventID" kind:eq value:"5136" |
ObjectClass | eq |
| field:"ObjectClass" kind:eq value:"groupPolicyContainer" |
admonEventType | eq |
| field:"admonEventType" kind:eq value:"Update" |
new_values | regex_match |
| field:"new_values" kind:regex_match |
objectCategory | eq |
| field:"objectCategory" kind:eq |