Group Policy is the tool most Windows estates use to harden every machine, which makes write access to it one of the most powerful privileges in the domain. Anyone who can edit a GPO linked to an OU can run code, change security settings or disable defences on every computer in that OU at the next refresh, and ransomware operators use exactly that to deploy payloads domain wide. This guide covers both sides: securing Group Policy itself (delegation, SYSVOL, secrets in policy, monitoring) and using it well to deliver baselines and hardening. It is written for Active Directory administrators, Windows infrastructure engineers and detection teams. Directory-wide hardening is covered in the Active Directory and Entra ID Hardening Guide; this page goes deeper on GPOs.
Key takeaways
- GPO edit and link rights are tier 0 when the target is tier 0. Whoever can edit or link a GPO that applies to domain controllers or admin workstations can take the domain; treat those rights like Domain Admin.
- Policy lives in two places. The Group Policy Container in Active Directory and the Group Policy Template in SYSVOL both need tight permissions; attackers who can write either one control the GPO.
- Never put secrets in policy. Group Policy Preferences passwords (MS14-025, CVE-2014-1812) are readable by any authenticated user; scripts in SYSVOL with embedded credentials are the same problem.
- Design for reviewability. Small single-purpose GPOs, a baseline plus delta model, clear naming and backups make it possible to see and reverse what changed.
- Monitor GPO changes as security events. Directory Service Changes auditing (event 5136 on groupPolicyContainer and gPLink) and SYSVOL file monitoring catch malicious edits that otherwise look like administration.
How Group Policy is attacked
A GPO has two halves. The Group Policy Container (GPC) is an object of class groupPolicyContainer under CN=Policies,CN=System in the domain partition, holding attributes such as version and the extensions in use. The Group Policy Template (GPT) is a folder under \\<domain>\SYSVOL\<domain>\Policies\{GUID} holding Registry.pol, security templates, preference XML files and scripts. A GPO applies where it is linked: the gPLink attribute on a site, the domain or an OU. Clients refresh policy in the background, so a change reaches every machine in scope within the refresh interval, or immediately when an update is forced.
| Attack path | ATT&CK | What the attacker needs | Primary control |
|---|---|---|---|
| Edit an existing GPO to add a scheduled task, service, startup script or registry change | T1484.001 Group Policy Modification | Write on the GPC or GPT | Restrict edit rights; monitor 5136 and SYSVOL writes |
| Create a GPO and link it to an OU or the domain | T1484.001 | GPO creation plus write on gPLink of the target | Restrict link rights per OU; alert on gPLink changes |
Read stored passwords from preference XML (cpassword) | T1552.006 Group Policy Preferences | Any domain account | Remove all GPP passwords; rotate exposed accounts |
| Enumerate GPOs to map security settings, local admin groups and weak links | T1615 Group Policy Discovery | Any domain account | Cannot be prevented; reduce what policy reveals and fix weak delegation first |
| Tamper with policy in transit (spoofed or intercepted SYSVOL and NETLOGON traffic) | T1557.001 Name Resolution Poisoning and SMB Relay | Network position | Hardened UNC Paths, SMB signing |
| Use policy to switch off defences and push ransomware | T1484.001, T1685 Disable or Modify Tools, T1489 Service Stop | Domain admin or delegated GPO rights | Tier 0 protection, change monitoring, tamper protection outside GPO |
The CISA and FBI advisory on LockBit 3.0 (AA23-075A) describes the ransomware spreading laterally through Group Policy and PsExec: it creates policy that changes the Group Policy refresh time, disables SmartScreen and Microsoft Defender through Registry.pol, stops services through Services.xml, places the payload in the domain's SYSVOL scripts folder and forces a policy update across the domain. See the LockBit Threat Actor Profile. The attacker usually already holds high privilege at that point; the lesson is that Group Policy turns one privileged foothold into every machine at once, so the privilege must be scarce and its use visible.
Who can change policy: delegation
Group Policy permissions are spread across several places, and attack path tools such as BloodHound find the forgotten ones. See the BloodHound and Active Directory Attack Path Guide.
| Right | Where it is set | Who should hold it |
|---|---|---|
| Create GPOs in the domain | Group Policy Objects container (GPMC Delegation tab); members of Group Policy Creator Owners | A small GPO admin group; keep Group Policy Creator Owners empty or near empty, since Microsoft describes its members as able to create and modify GPOs in the domain |
| Edit settings, delete, modify security | Each GPO's delegation (GPC ACL, mirrored to the GPT folder) | Tier-matched admin groups; tier 0 admins only for GPOs linked to DCs, the domain root or tier 0 OUs |
| Link GPOs | Write on gPLink and gPOptions of each site, domain and OU | Delegated per OU; never to helpdesk on OUs containing servers or admin accounts |
| Generate RSoP and modelling | Per OU or domain | Read-only roles can hold this safely |
| Read and Apply Group Policy | Each GPO's security filtering | Targets in scope; Authenticated Users or Domain Computers keep Read (see below) |
- Tier the GPOs: any GPO linked to the Domain Controllers OU, the domain root or OUs holding tier 0 assets is a tier 0 object. Only tier 0 admins edit it, and it is edited only from privileged access workstations. See the Tiered Administration and Enterprise Access Model Guide.
- Watch indirect control: ownership of a GPO, write on the GPT folder in SYSVOL, control over a group that holds edit rights, and write on an OU's
gPLinkall amount to control. Review all four, not just the GPMC delegation tab. - Retire orphans: GPOs whose GPC and GPT have drifted apart, unlinked GPOs and accounts of departed admins in delegation lists are cheap to clean up and common in attack paths.
Protecting the plumbing: SYSVOL, transport and filtering
- SYSVOL permissions: authenticated users need read on SYSVOL and NETLOGON; nobody outside the GPO admin and DC groups should be able to write. Check the
Policiesandscriptsfolders and every script path a GPO references, including shares outside SYSVOL. A startup script pulled from a share that ordinary users can write is a domain-wide code execution path. - Hardened UNC Paths (MS15-011): under
Computer Configuration/Administrative Templates/Network/Network Provider, enable Hardened UNC Paths with\\*\SYSVOLand\\*\NETLOGONset toRequireMutualAuthentication=1, RequireIntegrity=1. This makes clients require mutual authentication and signing when they fetch policy and scripts. Errors are logged inMicrosoft\Windows\NetworkProvider\Operational. Combine with SMB signing everywhere; see the SMB Signing Guide. - Security filtering after MS16-072: since MS16-072, user policy is retrieved in the computer's security context, so the computer account needs Read on every GPO that applies to users. Microsoft's guidance is to give Authenticated Users Read (not Apply Group Policy) on security-filtered GPOs, or Domain Computers Read if Authenticated Users cannot be used. Filtering by removing Authenticated Users entirely silently breaks policy, and gpresult shows "Filtering: Not Applied (Unknown Reason)".
- Central Store hygiene: keep ADMX and ADML files in
\\<domain>\SYSVOL\<domain>\Policies\PolicyDefinitions. Microsoft recommends building a new versioned folder from a current release, keeping the previous one for rollback, and not layering new files over old ones, which causes namespace and resource errors. Restrict write to the GPO admin group.
Secrets in Group Policy
Before MS14-025, Group Policy Preferences could set passwords for local users and groups, mapped drives, services, scheduled and immediate tasks and data sources. Those passwords were stored in preference XML in SYSVOL, readable and decryptable by any authenticated user, and Microsoft noted targeted attacks using them. The update removed the ability to set new passwords through those extensions but did not remove existing ones: administrators must find and delete them. CVE-2014-1812 is in the CISA KEV catalogue.
- Search: scan every XML file under
SYSVOL\<domain>\Policiesfor thecpasswordattribute, and every script in SYSVOL, NETLOGON and referenced shares for passwords, connection strings and API keys. - Treat findings as compromised: rotate the exposed accounts first, then remove the preference items. Check SYSVOL backups and old DCs, since copies persist.
- Replace the use case: local administrator passwords through Windows LAPS (see the Local Administrator Password Solution (LAPS) Guide), service identities through group managed service accounts, and application secrets through a secrets manager (see the Secrets Management Guide).
Using Group Policy for hardening
Group Policy is still the most common way to deliver a security baseline to domain-joined Windows machines. Microsoft distributes its security baselines in the Security Compliance Toolkit as GPO backups, and CIS offers Build Kits as GPOs to SecureSuite members. How you structure the GPOs decides whether the hardening can be reviewed, tested and rolled back.
| Design choice | Recommended | Avoid |
|---|---|---|
| Baseline delivery | Import the vendor baseline unchanged into its own GPO; put your deviations in a separate delta GPO with higher precedence | Editing the imported baseline, which hides your deviations and complicates upgrades |
| GPO scope | One purpose per GPO (for example "SEC - Server - Firewall"), named by tier and role | Large catch-all GPOs and settings added to the Default Domain Policy beyond password, lockout and Kerberos policy |
| Targeting | OU structure by tier and role, so links do the targeting | Heavy WMI filtering and item-level targeting that is hard to reason about and slows processing |
| Precedence controls | Enforced links only for a few non-negotiable security GPOs at the domain level | Block Inheritance on OUs, which quietly removes the baseline from everything below |
| Local accounts and groups | Restricted Groups or Local Users and Groups preferences without passwords, plus LAPS | Any preference item that stores a credential |
| Endpoint protection settings | Baseline settings in GPO plus tamper protection managed outside Group Policy | Relying only on GPO for Defender settings, which an attacker with GPO rights can reverse |
For servers and workstations the settings themselves are covered in the Windows Server Hardening Guide and the Windows Endpoint Hardening Guide. Where devices are cloud managed, Intune security baselines provide the same settings through MDM and the two should not both own the same setting.
Change control, testing and rollback
- Back up before every change:
Backup-GPO -Allto a protected location on a schedule, and exportGet-GPOReport -All -ReportType Xmlinto version control so every change produces a readable diff. - Stage: make the change in a copy of the GPO linked to a test OU containing representative machines for each role, then compare results with Policy Analyzer from the Security Compliance Toolkit or with
gpresult /h. - Peer review: a second administrator approves changes to any tier 0 GPO, and the change ticket references the GPO GUID and version.
- Ring rollout: link the new or changed GPO to pilot OUs first, then broad OUs, watching the
Microsoft-Windows-GroupPolicy/Operationallog and helpdesk tickets between rings. - Rollback: unlink or disable the link (fast, keeps the GPO), or restore the previous backup with
Restore-GPO. Remember that some settings tattoo the registry and persist after the GPO is removed, so plan the reverse setting rather than assuming removal reverts it.
Detection and measurement
Turn on the Audit Directory Service Changes subcategory on domain controllers and add SACL entries that audit writes on Group Policy objects and on gPLink for domain, site and OU objects. Microsoft's event 5136 documentation lists groupPolicyContainer as the class for GPOs; each change produces a "Value Deleted" and a "Value Added" event sharing an OpCorrelationID, so you can show before and after.
| Signal | Source | Alert when |
|---|---|---|
5136 on groupPolicyContainer | DC Security log | Any change to a tier 0 GPO; changes outside change windows or by non-GPO-admin accounts |
5136 on gPLink | DC Security log | New link on the domain root, Domain Controllers OU or tier 0 OUs |
| 5137 and 5141 for GPO objects | DC Security log | GPO created or deleted outside change control |
| File writes in SYSVOL Policies and scripts folders | File auditing or EDR on DCs | New executables or scripts, new ScheduledTasks.xml or Services.xml |
| Group Policy processing | Microsoft-Windows-GroupPolicy/Operational on clients | Sudden widespread processing failures or refresh interval changes |
See the Windows Event Log Guide. Useful measures:
- Delegation: number of principals able to edit or link tier 0 GPOs, target equal to the tier 0 admin group only.
- Secrets: count of
cpasswordattributes and credential-bearing scripts in SYSVOL, target zero. - Change control: percentage of 5136 GPO changes matched to an approved change, target 100 percent for tier 0.
- Hygiene: unlinked, empty or orphaned GPOs and OUs with Block Inheritance, trending down.
- Coverage: percentage of in-scope machines reporting the current baseline GPO version applied.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | CM-2 Baseline Configuration, CM-3 Configuration Change Control, CM-5 Access Restrictions for Change, CM-6 Configuration Settings, AC-6 Least Privilege, AU-12 Audit Record Generation | GPOs deliver the baseline; who may change them and how changes are logged |
| NIST CSF 2.0 | PR.PS-01 configuration management practices; PR.AA-05 access permissions managed and reviewed; DE.CM-09 monitoring of computing hardware and software | Baseline delivery, delegation review, change monitoring |
| CIS Controls v8.1 | Control 4 Secure Configuration of Enterprise Assets and Software | Group Policy as the secure configuration mechanism |
| ISO/IEC 27001:2022 Annex A | A.8.9 Configuration management, A.8.32 Change management, A.8.2 Privileged access rights | Evidence for configuration and change control |
| MITRE ATT&CK v20 | T1484.001 Group Policy Modification, T1552.006 Group Policy Preferences, T1615 Group Policy Discovery | Techniques this guide defends against |
Common failure patterns
- Helpdesk can link GPOs to server OUs: delegated years ago for printer mappings, it lets any helpdesk account push code to servers.
- Old GPP passwords still in SYSVOL: the MS14-025 update was installed, so everyone assumed the problem was gone, but the existing XML files and the passwords in them remained.
- Scripts from writable shares: logon or startup scripts referenced from a departmental share where many users have write access.
- No GPO change auditing: Directory Service Changes auditing off or no SACLs, so a malicious edit before a ransomware detonation, as in the LockBit 3.0 pattern, leaves no record.
- Security filtering broken by MS16-072: Authenticated Users removed from filtering, so hardening GPOs quietly stop applying to users and nobody notices because no error is shown.
- Baseline edited in place: custom changes made inside the imported Microsoft baseline, so upgrading to the next baseline either loses them or is never done.
Practitioner checklist
- List every principal with create, edit, link or ownership rights on GPOs, and reduce tier 0 GPO rights to tier 0 admins only.
- Empty Group Policy Creator Owners and remove link rights from helpdesk roles on server and admin OUs.
- Scan SYSVOL and script shares for
cpasswordand embedded credentials; rotate, then remove. - Configure Hardened UNC Paths for SYSVOL and NETLOGON and require SMB signing.
- Give Authenticated Users (or Domain Computers) Read on all security-filtered GPOs.
- Import vendor baselines unchanged and keep deviations in delta GPOs.
- Back up all GPOs on a schedule and keep XML reports in version control.
- Enable Directory Service Changes auditing with SACLs on GPOs and gPLink, and alert on tier 0 changes.
- Review unlinked GPOs, Block Inheritance and Enforced links quarterly.
Standards and references
- Microsoft: Security Bulletin MS14-025, Vulnerability in Group Policy Preferences
- Microsoft: MS15-011, Vulnerability in Group Policy could allow remote code execution
- Microsoft: Deploying Group Policy Security Update MS16-072
- Microsoft Learn: Event 5136, a directory service object was modified
- Microsoft Learn: Create and manage the Central Store
- MITRE ATT&CK: Group Policy Modification
- CISA: #StopRansomware LockBit 3.0 (AA23-075A)
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: Active Directory and Entra ID Hardening Guide · Windows Server Hardening Guide · Tiered Administration and Enterprise Access Model Guide · Top 10 Active Directory Security Risks