GPO Abuse
Write access on a GPO lets you modify its settings — adding a scheduled task or startup script that runs on every machine the GPO applies to. BloodHound marks these as GenericWrite or WriteProperty edges on GPO objects. The scope of impact depends on which OUs the GPO is linked to: a GPO linked to the domain root affects every computer.
Find writable GPOs and their scope
displayName: Default Domain Policy
cn: {31B2F340-016D-11D2-945F-00C04FB984F9}
BloodHound shows GenericWrite on GPO objects as a direct path. The GUID from the cn attribute (including curly braces) is required for all abuse tools.
pyGPOAbuse — from Kali
pyGPOAbuse modifies GPO settings over LDAP and SMB from a Linux attacker. It adds an immediate scheduled task that executes on all machines in scope at the next policy refresh.
[+] Successfully modified GPO {31B2F340-016D-11D2-945F-00C04FB984F9}
[+] Scheduled task WindowsUpdate added
$GPO_ID is the full GUID string from cn including curly braces.
New-GPOImmediateTask — from a Windows shell
From a PowerShell session on a domain-joined machine, PowerView's New-GPOImmediateTask writes a scheduled task directly into the GPO XML on SYSVOL.
On Kali: /usr/share/windows-resources/powersploit/Recon/PowerView.ps1
Force GPO refresh
GPOs refresh automatically every 90 minutes. Force immediate execution on all affected machines with a sweep.
After execution, connect to any affected machine using the backdoor account. See AD Remote Execution for access options.
References
-
pyGPOAbuse — GitHubgithub.com/Hackndo/pyGPOAbuse (opens in new tab)
GPO abuse from Linux via LDAP and SMB, immediate scheduled task injection
-
BloodyAD — GitHubgithub.com/CravateRouge/bloodyAD (opens in new tab)
GPO object enumeration and OU link discovery
-
NetExec (nxc) — GitHubgithub.com/Pennyw0rth/NetExec (opens in new tab)
gpupdate force push across subnet after GPO modification
-
PowerSploit PowerView — GitHubgithub.com/PowerShellMafia/PowerSploit (opens in new tab)
New-GPOImmediateTask for scheduled task injection into GPO from Windows
Was this helpful?
Your feedback helps improve this page.