1. Resources
  2. Detection rules
  3. Group Policy Object Modification

Group Policy Object Modification detection rules

An attacker who can edit a GPO or the gPLink of an OU pushes settings, scripts or scheduled tasks to every computer the policy applies to. Detected as 5136 changes to groupPolicyContainer extensions and paths, and to gPLink.

Platform
Active Directory
Severity
High
Log source
Windows Security event log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Edit rights on a GPO, write access to gPLink on a domain, OU or site, or membership of Group Policy Creator Owners plus a link right.
Impact
Code execution as SYSTEM, or configuration changes, on every computer and user in scope of the policy, up to control of the whole domain.
Response
Disable the link or the policy object at once, disable the account that made the change, and restore the policy object from a known-good backup.
Mitigation
Remove non-administrative principals from those who can edit GPOs or write gPLink on the domain root, the Domain Controllers OU and Tier 0 OUs.
Event IDs
513651415145

How the attack works

A Group Policy Object has two halves: a groupPolicyContainer object in CN=Policies,CN=System and a folder in SYSVOL that holds the actual settings. The container records which client-side extensions the policy uses (gPCMachineExtensionNames, gPCUserExtensionNames), where its SYSVOL folder is (gPCFileSysPath) and a versionNumber that changes on every edit. Domains, OUs and sites point to the policies that apply to them through their gPLink attribute.

With edit rights on a GPO an attacker can add a startup script, a scheduled task, a local group membership or a registry setting that every targeted computer applies on its next refresh (by default every 90 minutes plus a random offset of up to 30, and every 5 minutes on domain controllers). With write access to gPLink they can instead link a policy they control to an OU, the domain root or the Domain Controllers OU. Adding a new type of setting registers a new extension in the container, which is the clearest directory-side trace of the change. Editing a script, scheduled task or setting of a type the policy already uses adds no extension: the one attribute Microsoft documents as incremented whenever the administrative tools change a GPO is versionNumber, and a file changed directly in SYSVOL leaves no trace in the directory at all. A write to the script, scheduled task, service, group or security template files through the SYSVOL share is logged by the share access event 5145 on the domain controller, and Microsoft recommends watching the deletion of policy objects (event 5141). Disabling a policy for users, computers or both writes its flags attribute, which event 5136 records like any other attribute of the container.

What an attacker needs

  • Edit rights on a GPO (GenericWrite, GenericAll or write on the container and its SYSVOL folder), or write access to gPLink on a domain, OU or site, or membership of Group Policy Creator Owners plus a link right.

Impact

Code execution as SYSTEM, or configuration changes, on every computer and user in scope of the policy. A GPO linked to the Domain Controllers OU or the domain root gives control of the whole domain; it is also a common way to deploy ransomware domain-wide.

Detection rules

Default Domain Policy or Default Domain Controllers Policy Changed

Detects a write to the groupPolicyContainer object of the Default Domain Policy ({31B2F340-016D-11D2-945F-00C04FB984F9}) or of the Default Domain Controllers Policy ({6AC1786C-016F-11D2-945F-00C04fB984F9}). These two policies exist in every domain with the same GUIDs and are linked by default to the domain root and to the Domain Controllers OU, so a change to them reaches every computer or every domain controller. Every edit with the administrative tools writes at least versionNumber. Requires Audit Directory Service Changes and a SACL on CN=Policies,CN=System.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Default Domain Policy or Default Domain Controllers Policy Changed
id: c3e4e852-e621-4d42-940d-6e32689c4539
status: experimental
description: >-
  Detects a write to the groupPolicyContainer object of the Default Domain
  Policy ({31B2F340-016D-11D2-945F-00C04FB984F9}) or of the Default Domain
  Controllers Policy ({6AC1786C-016F-11D2-945F-00C04fB984F9}). These two
  policies exist in every domain with the same GUIDs and are linked by default
  to the domain root and to the Domain Controllers OU, so a change to them
  reaches every computer or every domain controller. Every edit with the
  administrative tools writes at least versionNumber. Requires Audit Directory
  Service Changes and a SACL on CN=Policies,CN=System.
references:
  - https://attack.mitre.org/techniques/T1484/001/
  - https://learn.microsoft.com/en-us/troubleshoot/windows-server/group-policy/rebuild-sysvol-tree-and-content-in-a-domain
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpol/3b027be3-62ac-4b85-9334-37f79c83bfea
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    ObjectClass: groupPolicyContainer
    ObjectDN|startswith:
      - 'CN={31B2F340-016D-11D2-945F-00C04FB984F9},'
      - 'CN={6AC1786C-016F-11D2-945F-00C04FB984F9},'
    OperationType:
      - '%%14674'
      - 'Value Added'
  condition: selection
falsepositives:
  - Planned changes to the domain password, account lockout or Kerberos policy, to user rights on domain controllers, or to the audit policy of domain controllers, which are often kept in these two policies. Match each change to a change record by SubjectUserName and time.
level: medium

False positives

  • Planned changes to the domain password, account lockout or Kerberos policy, to user rights on domain controllers, or to the audit policy of domain controllers, which are often kept in these two policies. Match each change to a change record by SubjectUserName and time.

Group Policy Object Deleted

Detects the deletion of a groupPolicyContainer object, which removes the policy and every setting in it from all the domains, OUs and sites it was linked to. Microsoft recommends monitoring the deletion of group policy objects with event 5141 and the groupPolicyContainer class. Deleting the policy that carries security settings (audit policy, user rights, firewall, endpoint protection) weakens every computer in its scope at the next policy refresh. Requires Audit Directory Service Changes and a SACL that audits Delete on CN=Policies,CN=System.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Group Policy Object Deleted
id: 7877803c-cce7-49db-a9bb-98e7ecee9581
status: experimental
description: >-
  Detects the deletion of a groupPolicyContainer object, which removes the
  policy and every setting in it from all the domains, OUs and sites it was
  linked to. Microsoft recommends monitoring the deletion of group policy
  objects with event 5141 and the groupPolicyContainer class. Deleting the
  policy that carries security settings (audit policy, user rights, firewall,
  endpoint protection) weakens every computer in its scope at the next policy
  refresh. Requires Audit Directory Service Changes and a SACL that audits
  Delete on CN=Policies,CN=System.
references:
  - https://attack.mitre.org/techniques/T1484/001/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5141
  - https://learn.microsoft.com/en-us/windows/win32/adschema/c-grouppolicycontainer
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5141
    ObjectClass: groupPolicyContainer
  condition: selection
falsepositives:
  - Clean-up of unused or test policies by Group Policy administrators. Match the deletion to a change record by SubjectUserName and the GPO GUID in ObjectDN.
level: medium

False positives

  • Clean-up of unused or test policies by Group Policy administrators. Match the deletion to a change record by SubjectUserName and the GPO GUID in ObjectDN.

Group Policy Object Disabled for Users, Computers or Both

Detects a write to the flags attribute of a groupPolicyContainer that disables the policy for user policy mode (1), for computer policy mode (2) or for both (3), as the Group Policy core protocol defines the bits. Clients ignore a disabled policy, so turning off the policy that carries audit, user rights, firewall or endpoint protection settings weakens every computer in its scope at the next refresh, while the policy and its links stay in place. Requires Audit Directory Service Changes and a SACL on CN=Policies,CN=System.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Group Policy Object Disabled for Users, Computers or Both
id: 01c7858a-2283-4884-a5ce-654e84af99a7
status: experimental
description: >-
  Detects a write to the flags attribute of a groupPolicyContainer that
  disables the policy for user policy mode (1), for computer policy mode (2) or
  for both (3), as the Group Policy core protocol defines the bits. Clients
  ignore a disabled policy, so turning off the policy that carries audit,
  user rights, firewall or endpoint protection settings weakens every computer
  in its scope at the next refresh, while the policy and its links stay in
  place. Requires Audit Directory Service Changes and a SACL on
  CN=Policies,CN=System.
references:
  - https://attack.mitre.org/techniques/T1484/001/
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpol/b0e5c9e8-e858-4a7a-a94a-4a3d0a9d87a2
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-flags
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    ObjectClass: groupPolicyContainer
    AttributeLDAPDisplayName: flags
    AttributeValue:
      - 1
      - 2
      - 3
    OperationType:
      - '%%14674'
      - 'Value Added'
  condition: selection
falsepositives:
  - Administrators who disable the unused half of a policy (for example the user settings of a computer-only policy) for faster processing, or who switch off a policy during troubleshooting. Match the change to a change record by SubjectUserName and the GPO GUID in ObjectDN.
level: medium

False positives

  • Administrators who disable the unused half of a policy (for example the user settings of a computer-only policy) for faster processing, or who switch off a policy during troubleshooting. Match the change to a change record by SubjectUserName and the GPO GUID in ObjectDN.

Script, Scheduled Task, Service, Group or Security Template File Written in a GPO Folder of SYSVOL

Detects write access over the network (5145 on the SYSVOL share with WriteData, %%4417, in the access list) to the files in a GPO's SYSVOL folder that make computers or users run code, install services or change local group membership and user rights: the script lists scripts.ini and psscripts.ini, the Group Policy Preferences files ScheduledTasks.xml, Services.xml and Groups.xml, and the security template GptTmpl.inf. Editing an existing script or scheduled task adds no client-side extension to the GPO, and a file changed directly in SYSVOL does not update the version in the directory, so this file write is the trace those edits leave. Requires "Audit Detailed File Share" on the domain controllers. A change made locally on a domain controller, not through the share, does not produce this event.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Script, Scheduled Task, Service, Group or Security Template File Written in a GPO Folder of SYSVOL
id: 8b05f2fb-f4d8-4c07-9055-e2441902c25a
status: experimental
description: >-
  Detects write access over the network (5145 on the SYSVOL share with
  WriteData, %%4417, in the access list) to the files in a GPO's SYSVOL folder
  that make computers or users run code, install services or change local
  group membership and user rights: the script lists scripts.ini and
  psscripts.ini, the Group Policy Preferences files ScheduledTasks.xml,
  Services.xml and Groups.xml, and the security template GptTmpl.inf. Editing
  an existing script or scheduled task adds no client-side extension to the
  GPO, and a file changed directly in SYSVOL does not update the version in the
  directory, so this file write is the trace those edits leave. Requires "Audit
  Detailed File Share" on the domain controllers. A change made locally on a
  domain controller, not through the share, does not produce this event.
references:
  - https://attack.mitre.org/techniques/T1484/001/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5145
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpscr/e1857ceb-fdef-4c1b-a545-5c4f3f4a55a2
  - https://support.microsoft.com/en-us/servicing/os/windows/2014/05/ms14-025-vulnerability-in-group-policy-preferences-could-allow-elevation-of-privilege-may-13-2014
  - https://learn.microsoft.com/en-us/troubleshoot/windows-server/group-policy/reset-user-rights-in-default-domain-group-policy
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5145
    ShareName|endswith: '\SYSVOL'
    RelativeTargetName|contains: '\Policies\'
    RelativeTargetName|endswith:
      - '\scripts.ini'
      - '\psscripts.ini'
      - '\ScheduledTasks.xml'
      - '\Services.xml'
      - '\Groups.xml'
      - '\GptTmpl.inf'
    AccessList|contains: '%%4417'
  condition: selection
falsepositives:
  - Group Policy administrators who edit scripts, scheduled tasks, services, local group settings or security settings with the management console, which writes these files through the SYSVOL share. Exclude the management workstations by IpAddress or the administrators by exact SubjectUserName, and review the rest.
  - Backup or GPO management products that restore or import policies through the share with a service account. Exclude that account by exact SubjectUserName.
level: medium

False positives

  • Group Policy administrators who edit scripts, scheduled tasks, services, local group settings or security settings with the management console, which writes these files through the SYSVOL share. Exclude the management workstations by IpAddress or the administrators by exact SubjectUserName, and review the rest.
  • Backup or GPO management products that restore or import policies through the share with a service account. Exclude that account by exact SubjectUserName.

Group Policy Object Extensions or SYSVOL Path Modified

Detects a change to the client-side extension lists (gPCMachineExtensionNames, gPCUserExtensionNames) or the SYSVOL path (gPCFileSysPath) of a groupPolicyContainer. A new extension means a new type of setting (scripts, scheduled tasks, group membership, registry) was added to the GPO; a changed path redirects the policy to another file location. Requires Audit Directory Service Changes and a SACL on CN=Policies,CN=System. An edit to a script, scheduled task or setting of a type the GPO already uses adds no extension and is not detected by this rule; the versionNumber rule of this attack covers it at a lower level.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Group Policy Object Extensions or SYSVOL Path Modified
id: 843cc042-5d8d-4bfd-8da9-fa573e247440
status: experimental
description: >-
  Detects a change to the client-side extension lists (gPCMachineExtensionNames,
  gPCUserExtensionNames) or the SYSVOL path (gPCFileSysPath) of a
  groupPolicyContainer. A new extension means a new type of setting (scripts,
  scheduled tasks, group membership, registry) was added to the GPO; a changed
  path redirects the policy to another file location. Requires Audit Directory
  Service Changes and a SACL on CN=Policies,CN=System.
  An edit to a script, scheduled task or setting of a type the GPO already uses
  adds no extension and is not detected by this rule; the versionNumber rule of
  this attack covers it at a lower level.
references:
  - https://attack.mitre.org/techniques/T1484/001/
  - https://learn.microsoft.com/en-us/windows/win32/adschema/c-grouppolicycontainer
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-gpcmachineextensionnames
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-gpcfilesyspath
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    ObjectClass: groupPolicyContainer
    AttributeLDAPDisplayName:
      - gPCMachineExtensionNames
      - gPCUserExtensionNames
      - gPCFileSysPath
    OperationType:
      - '%%14674'
      - 'Value Added'
  condition: selection
falsepositives:
  - Routine GPO editing by administrators that adds a new setting type. Prioritize GPOs linked to the domain root or Tier 0 OUs and writers outside the GPO administration group.
level: medium

False positives

  • Routine GPO editing by administrators that adds a new setting type. Prioritize GPOs linked to the domain root or Tier 0 OUs and writers outside the GPO administration group.

Group Policy Link Modified on a Domain, OU or Site

Detects a change to gPLink, the attribute through which a domain, OU or site points to the GPOs that apply to it. Linking an attacker-controlled GPO to the domain root, the Domain Controllers OU or a Tier 0 OU applies its settings to every object below it. Requires Audit Directory Service Changes and a SACL that audits writes to gPLink.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Group Policy Link Modified on a Domain, OU or Site
id: 74c524de-1af6-4bc7-b967-368d71fbb017
status: experimental
description: >-
  Detects a change to gPLink, the attribute through which a domain, OU or site
  points to the GPOs that apply to it. Linking an attacker-controlled GPO to the
  domain root, the Domain Controllers OU or a Tier 0 OU applies its settings to
  every object below it. Requires Audit Directory Service Changes and a SACL that
  audits writes to gPLink.
references:
  - https://attack.mitre.org/techniques/T1484/001/
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-gplink
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    AttributeLDAPDisplayName: gPLink
    OperationType:
      - '%%14674'
      - 'Value Added'
  condition: selection
falsepositives:
  - Administrators linking, unlinking or reordering GPOs. Raise priority when ObjectDN is the domain root or an OU that contains domain controllers or Tier 0 accounts.
level: medium

False positives

  • Administrators linking, unlinking or reordering GPOs. Raise priority when ObjectDN is the domain root or an OU that contains domain controllers or Tier 0 accounts.

Group Policy Object Version Number Changed

Detects a write to versionNumber on a groupPolicyContainer object. The Group Policy administrative tools increment this attribute whenever they change a GPO, so the rule also sees edits that add no new extension, such as changing an existing script, scheduled task or setting. Every legitimate GPO edit matches, which is why the level is low: use it as a baseline and scope it to the GPOs linked to the domain root and the Domain Controllers OU. A file changed directly in SYSVOL without updating the version in the directory is not detected. Requires Audit Directory Service Changes and a SACL on CN=Policies,CN=System.

LevelLowStatusExperimentalLog sourceWindows Security event log
title: Group Policy Object Version Number Changed
id: 1077adfa-1fa0-4ca9-8db9-16433e8baed8
status: experimental
description: >-
  Detects a write to versionNumber on a groupPolicyContainer object. The Group
  Policy administrative tools increment this attribute whenever they change a
  GPO, so the rule also sees edits that add no new extension, such as changing
  an existing script, scheduled task or setting. Every legitimate GPO edit
  matches, which is why the level is low: use it as a baseline and scope it to
  the GPOs linked to the domain root and the Domain Controllers OU. A file
  changed directly in SYSVOL without updating the version in the directory is
  not detected. Requires Audit Directory Service Changes and a SACL on
  CN=Policies,CN=System.
references:
  - https://attack.mitre.org/techniques/T1484/001/
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpol/3b027be3-62ac-4b85-9334-37f79c83bfea
  - https://learn.microsoft.com/en-us/windows/win32/adschema/c-grouppolicycontainer
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-versionnumber
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-11
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.001
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    ObjectClass: groupPolicyContainer
    AttributeLDAPDisplayName: versionNumber
    OperationType:
      - '%%14674'
      - 'Value Added'
  condition: selection
falsepositives:
  - Every legitimate edit of any GPO by Group Policy administrators or by products that manage GPOs. Restrict ObjectDN to the GUIDs of the GPOs linked to the domain root, the Domain Controllers OU and other Tier 0 OUs, and review each change there against a change record.
level: low

False positives

  • Every legitimate edit of any GPO by Group Policy administrators or by products that manage GPOs. Restrict ObjectDN to the GUIDs of the GPOs linked to the domain root, the Domain Controllers OU and other Tier 0 OUs, and review each change there against a change record.

Triage

  • Identify the GPO from ObjectDN (its GUID) and resolve its display name; for gPLink changes, read the linked GPOs in AttributeValue and the OU in ObjectDN.
  • Check where the policy applies; links to the domain root or the Domain Controllers OU are the highest impact.
  • Confirm the writer (SubjectUserName) is a GPO administrator acting under a change record.
  • Inspect the GPO's SYSVOL folder for new scripts, scheduled task XML or group membership files written at the same time.

Response

Once the attack is confirmed:

  1. Stop the policy from spreading. Disable the link or the policy object at once, because domain controllers refresh policy every 5 minutes and other computers within about two hours.
  2. Disable the account that made the change and remove its edit rights on the policy object or its write access to gPLink.
  3. Restore the policy object from a known-good backup, or remove the added settings in both halves, the container in the directory and the folder in SYSVOL.
  4. Find the computers that applied the changed policy while it was linked and treat them as compromised. Removing the policy does not remove what a script, a scheduled task or an added local administrator already did there. If domain controllers were in scope, respond as for a domain compromise.
  5. Compare the policy objects linked to the domain root, the Domain Controllers OU and Tier 0 OUs with the baseline, in the directory and in SYSVOL.

Mitigation

  • Review who can edit GPOs and who can write gPLink on the domain root, the Domain Controllers OU and Tier 0 OUs; remove non-administrative principals.
  • Keep the membership of Group Policy Creator Owners empty or tightly controlled.
  • Baseline the GPOs linked to Tier 0 OUs and monitor SYSVOL policy folders for file changes (file system auditing on the domain controllers).
  • Configure a SACL that audits writes on CN=Policies,CN=System and on OUs, and enable "Audit Directory Service Changes" on domain controllers.

Frequently asked questions

How quickly does a changed GPO reach the computers in its scope?

At their next policy refresh. By default that is every 90 minutes plus a random offset of up to 30 minutes for most computers, and every 5 minutes on domain controllers. A change to a policy linked to the Domain Controllers OU is therefore applied within minutes, which leaves little time between the alert and the effect.

Can a GPO be changed without any of these rules firing?

Yes. A file changed directly in the SYSVOL folder of the policy, without an update of the version in the directory, leaves no trace in the directory at all. The SYSVOL file rule sees such a write when it goes through the SYSVOL share and Audit Detailed File Share is on, but not a change made locally on a domain controller, and it watches only the files that run code or change groups and rights. The directory rules also need a SACL on the Policies container and on the objects whose `gPLink` is watched.

Why is the version number rule only rated low?

The administrative tools increment versionNumber on every edit, so the rule matches every legitimate change of every policy. Its value is coverage. It sees edits that add no new extension, such as a changed script or scheduled task, which the extension rule misses. Scope it to the policies linked to the domain root and the Domain Controllers OU.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.