GPO Enumeration
Group Policy Objects control security settings, startup scripts, scheduled tasks, and software deployment across the domain. Enumerating GPOs tells you which machines and users are affected by which policies, reveals GPOs you can modify (a direct privilege escalation path), and surfaces embedded credentials in SYSVOL that have persisted since Group Policy Preferences was deprecated.
List all GPOs and their OU links
GPO metadata lives in LDAP under CN=Policies,CN=System. OU links are stored in the gPLink attribute on OU objects.
displayName: Default Domain Policy
gPCFileSysPath: \\corp.local\SysVol\corp.local\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}
displayName: IT Workstation Policy
gPCFileSysPath: \\corp.local\SysVol\corp.local\Policies\{A4B3C2D1-...}
distinguishedName: OU=Workstations,DC=corp,DC=local
gPLink: [LDAP://cn={A4B3C2D1-...},cn=policies,...;0]
DisplayName : Default Domain Policy
DisplayName : IT Workstation Policy
DisplayName : Server Hardening Policy
gpresult /r:
Applied Group Policy Objects
Default Domain Policy
IT Workstation Policy
Find GPOs you can modify
A writable GPO is a privilege escalation path: modify it to add a local admin, run a startup script, or deploy a scheduled task on every machine the GPO applies to. Check which GPOs your current account has edit rights on.
GPO: IT Workstation Policy ActiveDirectoryRights: WriteProperty
A writable GPO can be abused with GPO Abuse to execute commands on all machines the GPO applies to. Target GPOs linked to OUs containing domain controllers or high-value servers for immediate impact.
SYSVOL: read GPO content and find embedded credentials
SYSVOL is an SMB share on every DC containing GPO files, startup scripts, and logon scripts. Every domain user has read access. Group Policy Preferences XML files in SYSVOL historically stored AES-encrypted passwords — the key is published by Microsoft, making them trivially decryptable. Check every environment; old GPOs are rarely cleaned up.
SMB 10.10.10.10 445 DC01 [+] Found credentials in GPP SMB 10.10.10.10 445 DC01 Username: svc-deploy Password: Deploy2019!
Path : \\corp.local\SYSVOL\...\Groups.xml Line : cpassword="VPe/o9YRyz2cksnYRbNeqg=="
Startup scripts run as SYSTEM on machine boot. Logon scripts run in the context of the logging-in user. Either can contain hardcoded credentials, network share paths to other systems, or be writable by non-admins. Read every script found in SYSVOL.
References
-
BloodyAD (GitHub)github.com/CravateRouge/bloodyAD (opens in new tab)
get search for groupPolicyContainer objects, get writable for GPO ACLs
-
NetExec / nxc (GitHub)github.com/Pennyw0rth/NetExec (opens in new tab)
gpp_password and gpp_autologin modules for automated SYSVOL credential extraction
-
PowerSploit / PowerView (GitHub)github.com/PowerShellMafia/PowerSploit (opens in new tab)
Get-DomainGPO, Get-DomainOU, Get-DomainObjectAcl for GPO permission enumeration
Was this helpful?
Your feedback helps improve this page.