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

Event ID 5137: A directory service object was created

Written by a domain controller when an object is created in Active Directory under a parent whose SACL audits that creation. Catches rogue DNS records, new domain controller registrations, delegated managed service accounts and CA objects.

Log source
Windows Security log
Detection value
Essential
Volume
High
Last updated
Audit subcategory
Audit Directory Service Changes (DS Access, Success)
Logged on
Domain controllers only
Event versions
0
Detects
5 attacks (6 rules · 4 detection logic)
MITRE ATT&CK
4 techniques in 5 tactics
Threat groups
8 groups that MITRE ATT&CK records using these techniques
Fields the rules read
ObjectDNObjectClass

When it is written

A domain controller writes 5137 when an object is created in Active Directory and the parent of the new object (the OU, container or DNS zone it is created in) has an auditing entry for the Create action on that class. Microsoft's example is a Create Computer objects entry on an organizational unit. Only successful creations are logged.

The event names the new object (ObjectDN, ObjectGUID) and its class, not its attributes. The other events of the same LDAP operation share its Correlation ID: Microsoft's AD DS auditing guide says the values set while the object is created are logged as 5136 events, where the new object's SACL audits the write, except the values AD DS assigns by itself, such as a default sAMAccountName. Only the domain controller that created the object logs it: copies that arrive by replication are not audited on the other domain controllers.

A deleted object that is brought back is logged as 5138, not 5137, and a moved object as 5139. Microsoft's guide gives one exception: an object moved to another domain is logged as a creation by the domain controller in the target domain.

How to turn it on

Advanced audit policy subcategory Audit Directory Service Changes, 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 > DS Access > Audit Directory Service Changes
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccessMicrosoft recommends Success auditing in both its general and stronger baselines, with SACLs designed for the important objects, classes and operations (it names changes to AdminSDHolder and the Domain Admins group). The subcategory has no failure events; failed access attempts are logged by Audit Directory Service Access.
Member serversNot loggedMicrosoft says the subcategory makes sense only on domain controllers.
WorkstationsNot loggedMicrosoft says the subcategory makes sense only on domain controllers.
Check the current setting
auditpol /get /subcategory:"Directory Service Changes"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Directory Service Changes" /success:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE923C-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

5137 needs an auditing entry for Create on the parent of the new object, for the class being created, and Audit Directory Service Changes (Success) on every domain controller. The default SACL of the domain object (the Windows Server 2003 and later default in Microsoft's schema reference) does not audit creation. Microsoft's Defender for Identity setup selects Full control minus the read permissions, which includes Create all child objects, but its entries apply to user, group, computer and managed service account objects: they audit objects created beneath an account, not accounts, DNS names or other objects created in an OU, a container or a zone. Neither gives the events the rules on this page read. The rules need:

  • DNS records (dnsNode): on each AD-integrated zone you watch, Create dnsNode objects (or Create all child objects) for Everyone.
  • Domain controller registrations (nTDSDSA): on CN=Sites in the Configuration partition, Create all child objects, applied to this object and all descendant objects. The NTDS Settings object of a domain controller is created under its server object there.
  • CA objects (certificationAuthority, pKIEnrollmentService): on CN=Public Key Services,CN=Services in the Configuration partition, Create all child objects for this object and all descendant objects.
  • Delegated managed service accounts (msDS-DelegatedManagedServiceAccount): on the domain root, Create msDS-DelegatedManagedServiceAccount objects for this object and all descendant objects. The class comes with the Windows Server 2025 schema update, and Microsoft's Defender for Identity guidance calls it relevant only for domains with at least one Windows Server 2025 domain controller.

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 object. Event Viewer resolves it to a name.v0
Account NameSubjectUserNameSubjectName of the account that created the object. Computer accounts end with $; DNS hypotheses separate records created by computers from records created by users.v0
Account DomainSubjectDomainNameSubjectDomain of the account that created the object, usually as a NetBIOS name.v0
Logon IDSubjectLogonIdSubjectLogon ID of the session that created the object, in hexadecimal. Matches the 4624 event of that session on this domain controller, which holds the client address.v0
NameDSNameDirectory ServiceName of the Active Directory domain in which the object was created, as a DNS name (Microsoft's description).v0
TypeDSTypeDirectory ServiceDirectory service type. %%14676 (Active Directory Domain Services) on domain controllers.v0
DNObjectDNObjectRead by 4 rulesDistinguished name of the new object. For a DNS record the first component is the record name and the second the zone; for an nTDSDSA object it ends in the server, site and Configuration partition.v0
GUIDObjectGUIDObjectobjectGUID of the new object, in braces. Use it to follow the object through later 5136, 5139 and 5141 events, whatever its name becomes.v0
ClassObjectClassObjectRead by 6 rulesClass of the new object, for example user, computer, group, groupPolicyContainer, dnsNode, nTDSDSA or msDS-DelegatedManagedServiceAccount.v0
Correlation IDOpCorrelationIDOperationCorrelation ID shared by every event of the same LDAP operation, in braces. Microsoft points to it for finding the 5136 and 5139 events of the same operation.v0
Application Correlation IDAppCorrelationIDOperationApplication Correlation ID. Microsoft says it is not in use and always holds a dash.v0

Values to know

Class ObjectClass

ValueMeaningSignal
dnsNodeA name in an AD-integrated DNS zoneMost are dynamic registrations. The rules look at the name in ObjectDN (see below); any authenticated user can create a new name in a default zone, which is what makes these records useful to an attacker.Attack signal
nTDSDSANTDS Settings object of a domain controllerCreated when a server is promoted. Outside a planned promotion it is the registration a rogue domain controller (DCShadow) leaves behind; a 5141 for the same object minutes later is a second sign.Attack signal
msDS-DelegatedManagedServiceAccountDelegated managed service account (dMSA)Creating a dMSA where you do not plan any is the first step of the BadSuccessor abuse.Attack signal
certificationAuthority or pKIEnrollmentServiceCA object or enrollment service under Public Key ServicesPublishes a CA or an issuing service to the forest. Expected only when you install or renew a CA.Attack signal
user, computer or groupNew account or groupRoutine provisioning; also logged as 4720, 4741 or 4727, 4731 and 4754 without a SACL.Expected
groupPolicyContainerNew Group Policy objectMicrosoft suggests monitoring every new GPO.Worth knowing

DN ObjectDN

ValueMeaningSignal
Starts with DC=*,A wildcard record, which answers for every name the zone does not holdAttack signal
Starts with DC=wpad,A WPAD name, which browsers and services use to find a web proxyAttack signal
Contains 1UWhRCAA name that carries marshalled target informationA known coercion and authentication reflection technique relies on such names; an ordinary registration is not expected to produce one.Attack signal

Volume and noise

Microsoft rates Audit Directory Service Changes high on domain controllers; for 5137 the volume is whatever creations your SACLs audit. Account provisioning, domain joins (the new computer object), new Group Policy objects (each one creates the policy container and its child containers) and, in audited DNS zones, every new name registered by dynamic DNS are the common sources.

Keeping it manageable

  • Audit creation only for the classes you need on each container. Microsoft says there is no reason to audit every creation of every type of object: pick the important locations and the classes to watch there.
  • Keep every dnsNode creation in the zones you audit: the DNS rules match wildcard (DC=*), wpad and marshalled-target names, and two hypotheses follow names created by user accounts or for host names that a service principal name still references.
  • Keep every nTDSDSA creation even though most come from planned domain controller promotions: the rule and a hypothesis compare them with the server trust flag on the account, which is how a rogue registration stands out.
  • If DHCP servers register names with a dedicated user account, as Microsoft recommends, that account creates many dnsNode objects: exclude it by SID from the checks for names created by user accounts.
  • Computer and user creations are also logged as 4741 and 4720 without any SACL; if you already collect those, 5137 for these classes adds only the parent container.

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>5137</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>14081</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="OpCorrelationID">{c41a7e93-2b6d-4f08-9e15-6a3d8b2c7f40}</Data>
    <Data Name="AppCorrelationID">-</Data>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1105</Data>
    <Data Name="SubjectUserName">alice</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x3e5a21</Data>
    <Data Name="DSName">corp.example.com</Data>
    <Data Name="DSType">%%14676</Data>
    <Data Name="ObjectDN">CN=WS0142,OU=Workstations,DC=corp,DC=example,DC=com</Data>
    <Data Name="ObjectGUID">{9e2b4c71-0d5a-4b3f-8c6e-1f7a2d9b5e38}</Data>
    <Data Name="ObjectClass">computer</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Detection logic (hypotheses that join this event with others) for:

Frequently asked questions

Why do I see 4741 for a new computer but no 5137?

The two come from different subcategories. 4741 (Audit Computer Account Management) needs no SACL. 5137 (Audit Directory Service Changes) is written only when the OU or container the computer was created in has an auditing entry for Create Computer objects.

How do I see what was set on the new object?

5137 gives only the name, GUID and class. Read the object from the directory, or look for 5136 events with the same Correlation ID, which Microsoft describes as the way to tie together the events of one LDAP operation. Those 5136 events exist only where the new object's SACL audits property writes, and they leave out the values AD DS assigns by itself.

Is a new nTDSDSA object always suspicious?

No. Every promotion of a domain controller creates one under the server's object in the Sites container. It deserves a look when no promotion was planned, when it sits under the server object of a computer that is not one of your domain controllers, or when it is removed again within minutes (5141).

Why log the creation of DNS records at all?

In AD-integrated zones a record is a directory object, and by default authenticated users can create new names. Wildcard and WPAD names, or names crafted to look like a host's own name, redirect other computers' connections and authentication. 5137 names both the new record and the account that created it.

References