Group Policy Objects (GPOs) are a double-edged sword in Active Directory. They’re designed to enforce security and configuration policies across an enterprise, but when misconfigured they become attack paths that red teams love to exploit.
Here’s a breakdown of the main risks and misconfigurations in GPOs:
⚠️ Top GPO Risks & Misconfigurations
1. Over-Permissioned GPO Objects
- Risk: If a low-privileged user or group has WriteDACL, WriteOwner, or GenericAll rights over a GPO, they can modify it. Since GPOs apply to many systems, this becomes an easy privilege escalation path.
- Attack scenario: A tester enumerates ACLs with BloodHound and finds that “Helpdesk” users can edit a GPO linked to Domain Controllers. By injecting a startup script or registry setting, they gain SYSTEM access on DCs.
2. GPOs Linked to High-Value OUs
- Risk: Mislinked GPOs can affect Organizational Units (OUs) containing Domain Controllers, Admin Workstations, or Servers.
- Attack scenario: A misconfigured “Software Deployment” GPO is linked to the Domain Controllers OU, allowing attackers to deploy malicious MSI packages with elevated rights.
3. Startup/Logon Scripts Abuse
- Risk: GPOs can assign startup, shutdown, logon, or logoff scripts. If an attacker can modify those scripts, they can achieve persistence or privilege escalation.
- Attack scenario: By editing a logon script in SYSVOL (which replicates across DCs), a red teamer ensures every user who logs in executes their payload.
4. Insecure SYSVOL Permissions
- Risk: GPOs store scripts and policies in the SYSVOL share (
\\domain\SYSVOL
). If permissions are too loose, attackers can tamper with files that apply to all domain members. - Attack scenario: An attacker places a malicious
.bat
file inSYSVOL\Policies\...
and waits for it to be executed automatically by clients during policy refresh.
5. Unrestricted Local Admin Rights via GPO
- Risk: Some organizations use GPOs to add accounts to the local Administrators group on all workstations/servers. If misused, this grants over-privileged access to accounts that shouldn’t have it.
- Attack scenario: A compromised helpdesk account added via GPO as a local admin gives attackers the ability to pivot laterally across the network.
6. Weak Security Policies in GPO
- Risk: GPOs are supposed to harden environments, but misconfigurations often weaken security. Examples:
- Password policies allowing short/weak passwords.
- Disabled Windows Defender or logging.
- UAC disabled via registry.
- Attack scenario: A pentester disables endpoint protection across an OU by abusing GPO permissions and evades detection.
7. Dangerous Delegation of GPO Management
- Risk: GPO creation/delegation is sometimes given to non-admin IT staff for convenience. If attackers compromise such an account, they can create new GPOs linked to sensitive OUs.
- Attack scenario: A junior admin account delegated with “Edit settings” rights creates a new GPO to execute reverse shells on all servers in the Finance OU.
8. WMI Filters with Weak Permissions
- Risk: GPOs can use WMI filters to target specific hosts. If attackers can edit those filters, they can redirect or expand malicious GPO application.
- Attack scenario: Red team modifies a WMI filter to apply a malicious GPO to domain controllers only.
🛡️ How to Defend Against GPO Attacks
- Audit GPO Permissions: Use tools like BloodHound,
Get-GPODelegation
, or PowerView to check who has rights over GPOs. - Harden SYSVOL: Ensure only Domain Admins and trusted accounts can modify scripts/policies.
- Separate OUs: Keep Domain Controllers and Tier-0 assets in dedicated OUs with strictly controlled GPOs.
- Restrict Delegation: Don’t give GPO edit rights to helpdesk/junior staff without strong justification.
- Monitor Changes: Log and alert on GPO modifications (
Event ID 5136
in Directory Services logs). - Secure Startup Scripts: Avoid startup/logon scripts where possible; replace with modern solutions (SCCM, Intune).
✅ In short: A misconfigured GPO is equivalent to remote code execution across the domain. That’s why attackers love them — they’re “domain-wide malware delivery systems” when abused.
No responses yet