GPO Abuse
Group Policy Objects
Force GPO update on all domain computers:
PS > Get-ADComputer -Filter * | % {Invoke-GPUpdate -Computer $_.name -Force -RandomDelayInMinutes 0}Hunt for GPOs
List all GPOs in the domain:
PS > .\SharpView.exe Get-DomainGPO -Properties displayNameList GPOs applied to a specifiec domain user or computer:
PS > .\SharpView.exe Get-DomainGPO -UserIdentity snovvcrash -Properties DisplayName
PS > .\SharpView.exe Get-DomainGPO -ComputerIdentity WS01 -Properties DisplayName
Or
Cmd > gpresult /r /user snovvcrash [/h gpos-snovvcrash.html]
Cmd > gpresult /r /s WS01 [/h gpos-ws01.html]Search for writable GPOs for the Domain Users security group:
Permissions Abuse
Recon
Show all GPOs in the domain:
Search for GPOs that are controlled by the MEGACORP\PolicyAdmins group:
List computers that are affected by vulnerable (modifiable) GPO:
Note: if I list all OUs affected by this GPO with PowerView, there will be no domain shown (like in BloodHound), but in Group Policy Manager we can see that it is presented.
Check if computer settings are enabled for this GPO (and enable them if not):
List users that can create a GPO and link it to a specific OU:
Immediate Scheduled Tasks
GPOImmediateTask
Create a task with a PowerShell payload:
Clean up:
Check when GP was last applied:
GPOwned + pyGPOAbuse
Get target GPO ID:
Create an immediate scheduled task:
GPPrefRegistryValue
Check if GPMC is installed and if it's not, install it as a Windows Feature (requires elevation):
Create an evil GPO and link it to the target OU (will be visible in the management console):
Locate a writable network share:
Prepare your payload, put it to the network share and create an autorun value in the evil GPO to run the payload on boot/logon:
WMI Filters
GPO Abuse via NTLM Relay
Tools
GroupPolicyBackdoor
Install:
Basic usage:
Last updated