1. Resources
  2. Detection sources
  3. Event ID 4731

Event ID 4731: A security-enabled local group was created

Written when a new local security group is created: on member servers and workstations in the computer's own account database, on domain controllers as a domain local group. The ESX Admins rule reads it.

Log source
Windows Security log
Detection value
Supporting
Volume
Low
Last updated
Audit subcategory
Audit Security Group Management (Account Management, Success)
Logged on
All Windows computers
Event versions
0
Detects
1 attack (1 rule)
MITRE ATT&CK
1 technique in 2 tactics
Threat groups
7 groups that MITRE ATT&CK records using these techniques
Fields the rules read
TargetUserName

When it is written

Windows writes 4731 each time a new security-enabled local group is created. On member servers and workstations that is a group in the computer's own account database, and the computer itself writes the event. On domain controllers it is a group with domain local scope in Active Directory, written by the domain controller that created it.

Group Domain (TargetDomainName) tells the two cases apart: the computer name for a group of a member server or workstation, the domain name for a domain local group. A new global group is event 4727, a new universal group event 4754. A new distribution group is not a security group and is logged under Audit Distribution Group Management instead, on domain controllers only. The subcategory has no failure events.

How to turn it on

Advanced audit policy subcategory Audit Security Group Management, Success. Set it in a Group Policy object linked to the computers that write the event:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Account Management > Audit Security Group Management
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccessMicrosoft's general and stronger baselines both recommend Success auditing, to see security groups created, changed and deleted, members added and removed, and group membership enumerated. The subcategory has no failure events, so there is nothing to gain from Failure auditing.
Member serversSuccessMicrosoft's general and stronger baselines both recommend Success auditing, to see security groups created, changed and deleted, members added and removed, and group membership enumerated. The subcategory has no failure events, so there is nothing to gain from Failure auditing.
WorkstationsSuccessMicrosoft's general and stronger baselines both recommend Success auditing, to see security groups created, changed and deleted, members added and removed, and group membership enumerated. The subcategory has no failure events, so there is nothing to gain from Failure auditing.
Check the current setting
auditpol /get /subcategory:"Security Group Management"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Security Group Management" /success:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9237-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.

Run the commands in an elevated prompt on a computer that writes the event. Subcategory settings take effect only when the security option Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is enabled (the default), and a Group Policy object that sets advanced audit policy replaces local changes at its next refresh. Microsoft's advanced audit policy reference

Fields

In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.

FieldWhat it holdsSince
Security IDSubjectUserSidSubjectSID of the account that created the group. Event Viewer shows the resolved name when it can.v0
Account NameSubjectUserNameSubjectName of the account that created the group.v0
Account DomainSubjectDomainNameSubjectDomain of that account, or the computer name for a local account. NT AUTHORITY for some well-known principals.v0
Logon IDSubjectLogonIdSubjectLogon ID of the subject's session on the computer that wrote the event, in hexadecimal. The logon event (4624) with the same ID shows where the session came from.v0
Security IDTargetSidNew GroupSID of the new group. For a domain local group the domain SID and a new RID; for a group of a member server or workstation that computer's own SID and a RID.v0
Group NameTargetUserNameNew GroupRead by 1 ruleName of the new group (shown as Group Name under New Group).v0
Group DomainTargetDomainNameNew GroupDomain or computer of the new group (shown as Group Domain). The domain name for a domain local group, the computer name for a group of a member server or workstation.v0
SAM Account NameSamAccountNameAttributesPre-Windows 2000 name of the group, the value of its sAMAccountName attribute (shown as SAM Account Name under Attributes). For a local group of a member server or workstation it is simply the group name.v0
SID HistorySidHistoryAttributesPrevious SIDs of the group, from its sIDHistory attribute, set when a group is moved from another domain. A dash when there are none or when the value was not captured; always a dash for local groups of member servers and workstations.v0
PrivilegesPrivilegeListAdditional InformationPrivileges used for the operation. A dash when none were captured, as in Microsoft's sample event; Microsoft says only that the list might not be captured.v0

Values to know

Group Name TargetUserName

ValueMeaningSignal
ESX AdminsThe group that domain-joined VMware ESXi hosts trust by name (CVE-2024-37085)Not a built-in group and absent by default. Microsoft reports that domain-joined hosts without VMware's update for CVE-2024-37085 give full administrative access to the members of any domain group with this name, matched by name and not by SID, even if the group did not exist when the host joined the domain. Whoever creates it and adds members gives them that access. Microsoft describes a domain group, and a local group with this name on a member server also matches the rule, so check Group Domain. A group renamed to ESX Admins is a change, not a creation, so watch the rename too (4781, 4735).Attack signal
Any other nameAn ordinary new groupExpected

Group Domain TargetDomainName

ValueMeaningSignal
The domain's NetBIOS nameA domain local groupWritten only by domain controllers.Worth knowing
The computer's nameA group of that member server or workstationMicrosoft suggests checking this field when you collect 4731 from many servers.Worth knowing

SID History SidHistory

ValueMeaningSignal
-No SID historyThe normal value, and always the value for a local group of a member server or workstation.Expected
One or more SIDsThe group carries SIDs from another domainExpected when groups are migrated between domains. Outside a migration it needs an explanation, since members gain the access granted to those SIDs.Worth knowing

Volume and noise

Microsoft rates the volume of the whole subcategory as low. On domain controllers new domain local groups come from administrators and provisioning products creating resource groups, for example for file shares. On member servers and workstations they come from administrators and from software that creates its own local groups during installation.

Keeping it manageable

  • Keep every 4731 event from domain controllers. The volume is low and the ESX Admins rule reads it.
  • On member servers and workstations, new local groups are of little use to the rules: Microsoft describes the hypervisors as trusting a domain group named ESX Admins and says nothing of a local group on another computer. Filter them by TargetDomainName if you collect those logs.
  • If you have a naming convention for groups, compare SamAccountName with it, as Microsoft suggests. A new group outside the convention, created by an account that does not normally create groups, deserves a look.

Sample event

Version 0, with made-up values.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
    <EventID>4731</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>13826</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
    <EventRecordID>1048576</EventRecordID>
    <Correlation />
    <Execution ProcessID="712" ThreadID="2408" />
    <Channel>Security</Channel>
    <Computer>DC01.corp.example.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="TargetUserName">FileShare-Finance-RW</Data>
    <Data Name="TargetDomainName">CORP</Data>
    <Data Name="TargetSid">S-1-5-21-1004336348-1177238915-682003330-1132</Data>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1108</Data>
    <Data Name="SubjectUserName">adm-bob</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x4a3f21</Data>
    <Data Name="PrivilegeList">-</Data>
    <Data Name="SamAccountName">FileShare-Finance-RW</Data>
    <Data Name="SidHistory">-</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Why does the ESX Admins rule read group creation events?

Microsoft reported that domain-joined VMware ESXi hosts without VMware's update for CVE-2024-37085 give full administrative access to members of a domain group named ESX Admins, find the group by name and not by SID, and do not need it to exist when they join the domain. Creating the group and adding an account is the whole abuse. Microsoft does not say which group scope the hosts accept, so the rule reads all three creation events, 4727, 4731 and 4754.

How do I tell a local group on a server from a domain local group?

Look at Group Domain (TargetDomainName) and at the computer that wrote the event. A group of a member server or workstation carries the computer name and is written by that computer; a domain local group carries the domain name and is written by a domain controller.

Is 4731 written when a distribution group is created?

No. Distribution groups are not security-enabled, so their creation is logged under Audit Distribution Group Management, which only domain controllers write and which Microsoft recommends only if you need it.

References