Join our Newsletter — 33% off our NHI Course
Home› Guides› Group Policy Security Guide: Securing GPOs and Using…
Guide Endpoint Security

Group Policy Security Guide: Securing GPOs and Using Them for Hardening

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 26 October 2026 14 min read
On this page

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 pathATT&CKWhat the attacker needsPrimary control
Edit an existing GPO to add a scheduled task, service, startup script or registry changeT1484.001 Group Policy ModificationWrite on the GPC or GPTRestrict edit rights; monitor 5136 and SYSVOL writes
Create a GPO and link it to an OU or the domainT1484.001GPO creation plus write on gPLink of the targetRestrict link rights per OU; alert on gPLink changes
Read stored passwords from preference XML (cpassword)T1552.006 Group Policy PreferencesAny domain accountRemove all GPP passwords; rotate exposed accounts
Enumerate GPOs to map security settings, local admin groups and weak linksT1615 Group Policy DiscoveryAny domain accountCannot 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 RelayNetwork positionHardened UNC Paths, SMB signing
Use policy to switch off defences and push ransomwareT1484.001, T1685 Disable or Modify Tools, T1489 Service StopDomain admin or delegated GPO rightsTier 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.

RightWhere it is setWho should hold it
Create GPOs in the domainGroup Policy Objects container (GPMC Delegation tab); members of Group Policy Creator OwnersA 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 securityEach 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 GPOsWrite on gPLink and gPOptions of each site, domain and OUDelegated per OU; never to helpdesk on OUs containing servers or admin accounts
Generate RSoP and modellingPer OU or domainRead-only roles can hold this safely
Read and Apply Group PolicyEach GPO's security filteringTargets 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 gPLink all 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 Policies and scripts folders 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 \\*\SYSVOL and \\*\NETLOGON set to RequireMutualAuthentication=1, RequireIntegrity=1. This makes clients require mutual authentication and signing when they fetch policy and scripts. Errors are logged in Microsoft\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.

  1. Search: scan every XML file under SYSVOL\<domain>\Policies for the cpassword attribute, and every script in SYSVOL, NETLOGON and referenced shares for passwords, connection strings and API keys.
  2. Treat findings as compromised: rotate the exposed accounts first, then remove the preference items. Check SYSVOL backups and old DCs, since copies persist.
  3. 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 choiceRecommendedAvoid
Baseline deliveryImport the vendor baseline unchanged into its own GPO; put your deviations in a separate delta GPO with higher precedenceEditing the imported baseline, which hides your deviations and complicates upgrades
GPO scopeOne purpose per GPO (for example "SEC - Server - Firewall"), named by tier and roleLarge catch-all GPOs and settings added to the Default Domain Policy beyond password, lockout and Kerberos policy
TargetingOU structure by tier and role, so links do the targetingHeavy WMI filtering and item-level targeting that is hard to reason about and slows processing
Precedence controlsEnforced links only for a few non-negotiable security GPOs at the domain levelBlock Inheritance on OUs, which quietly removes the baseline from everything below
Local accounts and groupsRestricted Groups or Local Users and Groups preferences without passwords, plus LAPSAny preference item that stores a credential
Endpoint protection settingsBaseline settings in GPO plus tamper protection managed outside Group PolicyRelying 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

  1. Back up before every change: Backup-GPO -All to a protected location on a schedule, and export Get-GPOReport -All -ReportType Xml into version control so every change produces a readable diff.
  2. 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.
  3. Peer review: a second administrator approves changes to any tier 0 GPO, and the change ticket references the GPO GUID and version.
  4. Ring rollout: link the new or changed GPO to pilot OUs first, then broad OUs, watching the Microsoft-Windows-GroupPolicy/Operational log and helpdesk tickets between rings.
  5. 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.

SignalSourceAlert when
5136 on groupPolicyContainerDC Security logAny change to a tier 0 GPO; changes outside change windows or by non-GPO-admin accounts
5136 on gPLinkDC Security logNew link on the domain root, Domain Controllers OU or tier 0 OUs
5137 and 5141 for GPO objectsDC Security logGPO created or deleted outside change control
File writes in SYSVOL Policies and scripts foldersFile auditing or EDR on DCsNew executables or scripts, new ScheduledTasks.xml or Services.xml
Group Policy processingMicrosoft-Windows-GroupPolicy/Operational on clientsSudden 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 cpassword attributes 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

FrameworkReferenceRelevance
NIST SP 800-53 Rev. 5CM-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 GenerationGPOs deliver the baseline; who may change them and how changes are logged
NIST CSF 2.0PR.PS-01 configuration management practices; PR.AA-05 access permissions managed and reviewed; DE.CM-09 monitoring of computing hardware and softwareBaseline delivery, delegation review, change monitoring
CIS Controls v8.1Control 4 Secure Configuration of Enterprise Assets and SoftwareGroup Policy as the secure configuration mechanism
ISO/IEC 27001:2022 Annex AA.8.9 Configuration management, A.8.32 Change management, A.8.2 Privileged access rightsEvidence for configuration and change control
MITRE ATT&CK v20T1484.001 Group Policy Modification, T1552.006 Group Policy Preferences, T1615 Group Policy DiscoveryTechniques 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 cpassword and 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

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

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 26 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.