Event ID 4732
Event ID 4732: Member Added to Local Group
A member was added to a security-enabled local group
- Log source
- Security
- How to enable it
- Account Management > Audit Security Group Management (Success)
- Category
- Privilege Escalation
- Priority
- High
- Typical volume
- Low
- MITRE ATT&CK
What Event ID 4732 means
4732 covers two different places. On a workstation or member server it records changes to local groups such as Administrators. On a domain controller it records changes to domain local groups, including the built-in Administrators, Backup Operators and Account Operators of the domain.
On endpoints it is one of the best indicators of persistence. A user who becomes a local administrator can disable protection and dump credentials, and an attacker who adds an account to Remote Desktop Users has a way back in.
The member is often shown only as a SID. For local groups MemberName is a dash, because the computer does not resolve a distinguished name. Resolve MemberSid before you draw conclusions, and remember that it may belong to an account deleted later.
Key fields to inspect
| Field | Meaning | Suspicious when |
|---|---|---|
TargetUserName | Group that gained a member. | Administrators, Remote Desktop Users, Remote Management Users or Backup Operators. |
TargetSid | Security identifier of the group. | S-1-5-32-544 (Administrators) or S-1-5-32-555 (Remote Desktop Users). |
MemberSid | Security identifier of the new member. | A local account, or a broad group such as Domain Users or Everyone. |
MemberName | Distinguished name, or a dash for local groups. | A dash is normal and means that MemberSid must be resolved. |
SubjectUserName | Who made the change. | SYSTEM, a service account, or the new member itself. |
SubjectLogonId | Session that made the change. | 0x3e7 (SYSTEM) when no management tool explains it. |
Detection queries
List additions to sensitive built-in groups on endpoints and servers. Adjust names and thresholds to your environment. About these queries.
Splunk SPL
index=windows source="XmlWinEventLog:Security" EventCode=4732
TargetSid IN ("S-1-5-32-544", "S-1-5-32-555", "S-1-5-32-551", "S-1-5-32-580", "S-1-5-32-548")
| table _time Computer SubjectUserName MemberSid TargetUserName SubjectLogonId Microsoft Sentinel KQL
SecurityEvent
| where EventID == 4732
| where TargetSid in ("S-1-5-32-544", "S-1-5-32-555", "S-1-5-32-551", "S-1-5-32-580", "S-1-5-32-548")
| project TimeGenerated, Computer, SubjectUserName, MemberSid, Group = TargetUserName, SubjectLogonId PowerShell
Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4732; StartTime = (Get-Date).AddDays(-30) } |
ForEach-Object { $d = @{ Time = $_.TimeCreated }; ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }; [pscustomobject]$d } |
Select-Object Time, SubjectUserName, MemberSid, TargetUserName, TargetSid | Format-Table -AutoSize Attack scenarios
New local administrator
net localgroup administrators user /add on a compromised host. Paired with 4720 for the same SID it is a backdoor. With a domain SID it is a user who was given rights, possibly by an attacker who already controls the machine.
Remote Desktop access for persistence
The account is added to Remote Desktop Users, and the firewall is opened with a new rule (4946). Both events within minutes show preparation for interactive return.
Domain escalation through built-in groups
Backup Operators can copy the directory database, and Account Operators can create users. On a domain controller, an addition to either is close to an addition to Domain Admins.
Investigation checklist
- Resolve MemberSid and find out when that account was created.
- Find the process that made the change in 4688, such as net1.exe, powershell.exe or mmc.exe.
- Check whether the same member was added on other hosts.
- Remove the membership and look for logons that used it.
Common benign causes
- Group Policy preferences and endpoint management that set local administrators.
- Setup of a new computer, when the first user becomes an administrator.
- Software that adds its service account to a local group.
Event ID 4732 FAQ
Why is MemberName a dash in 4732?
For local groups the event stores only the SID of the member. Resolve MemberSid on the same computer, or look for the 4720 that created it.
Does 4732 on a domain controller mean a local administrator was added?
Domain controllers have no separate local groups. The event there concerns domain local groups, so an addition to Administrators grants rights over every domain controller.
Is 4732 logged when Group Policy changes local groups?
Yes. The computer applies the change as SYSTEM, so SubjectUserName is the computer account and the same change appears on many hosts at policy refresh.