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

Event ID 4794: An attempt was made to set the Directory Services Restore Mode administrator password

Written by a domain controller when someone sets the password of its Directory Services Restore Mode (DSRM) administrator, the local administrator used to start it without Active Directory. Microsoft says to alert on every one.

Log source
Windows Security log
Detection value
Supporting
Volume
Low
Last updated
Audit subcategory
Audit User Account Management (Account Management, Success and Failure)
Logged on
Domain controllers only
Event versions
0
Detects
1 attack (1 rule · 1 detection logic)
MITRE ATT&CK
1 technique in 2 tactics
Threat groups
6 groups that MITRE ATT&CK records using these techniques
Fields the rules read
The event ID and the provider only

When it is written

A domain controller writes 4794 each time an attempt is made to set the password of its Directory Services Restore Mode (DSRM) administrator. That account is the domain controller's own local administrator, used to sign in when the domain controller is started without Active Directory Domain Services. Its password is chosen when the server is promoted, and members of Domain Admins can reset it later, for the domain controller they work on or for another domain controller of the domain.

A successful attempt is an Audit Success event with Status Code 0x0; a failed one is an Audit Failure event. Microsoft documents only the success value. Caller Workstation names the computer the request came from; for a request made on the domain controller itself it holds the domain controller's own name.

Only domain controllers write the event. Where Windows LAPS manages the DSRM password (Windows Server 2019 and later domain controllers, a 2016 or later domain functional level and password encryption enabled), Microsoft does not say whether its rotations write 4794 or under which account.

How to turn it on

Advanced audit policy subcategory Audit User Account Management, Success and Failure. 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 User Account Management
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccess and FailureMicrosoft's general and stronger baselines both recommend Success and Failure auditing. Microsoft calls the subcategory useful for watching critical domain accounts (domain admins, service accounts, database admins) and recommends Failure auditing mainly for invalid password change and reset attempts on domain accounts, failed changes of the DSRM password and failed SID History additions.
Member serversSuccess and FailureBoth baselines recommend Success and Failure auditing. Microsoft recommends watching every change to local user accounts, especially the built-in local Administrator and other critical accounts, and Failure auditing mainly for invalid password change and reset attempts on local accounts.
WorkstationsSuccess and FailureBoth baselines recommend Success and Failure auditing. Microsoft recommends watching every change to local user accounts, especially the built-in local Administrator and other critical accounts, and Failure auditing mainly for invalid password change and reset attempts on local accounts.
Check the current setting
auditpol /get /subcategory:"User Account Management"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"User Account Management" /success:enable /failure:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9235-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 tried to set the DSRM password. Event Viewer resolves it to a name when it can.v0
Account NameSubjectUserNameSubjectName of the account that tried to set the DSRM password.v0
Account DomainSubjectDomainNameSubjectDomain of that account. NT AUTHORITY for well-known principals such as LOCAL SERVICE.v0
Logon IDSubjectLogonIdSubjectLogon ID of the session that made the attempt, in hexadecimal. The logon event of that session (4624) on the same domain controller carries the same value.v0
Caller WorkstationWorkstationAdditional InformationCaller Workstation (Event Viewer label): the name of the computer the request came from, such as DC01. The domain controller's own name when the request was made locally.v0
Status CodeStatusAdditional InformationStatus Code (Event Viewer label), in hexadecimal. 0x0 on success; Microsoft documents no other value.v0

Values to know

Status Code Status

ValueMeaningSignal
0x0The DSRM password was setThe DSRM rule alerts on every 4794. Setting this password is a known persistence step; confirm it against a change record.Attack signal
Any other valueThe attempt failedMicrosoft does not list the failure codes. A failed attempt by an unexpected account still deserves a look.Failure

Caller Workstation Workstation

ValueMeaningSignal
The domain controller's own nameThe request was made on the domain controller itselfWorth knowing
Another computerThe password was set remotelyExpected from another domain controller or a Tier 0 administration workstation; anything else is suspicious.Worth knowing

Volume and noise

Microsoft rates the volume of the subcategory as low, and 4794 is rare: a planned reset of the DSRM password by Tier 0 administrators, after a domain controller is promoted or as part of a recovery procedure, and possibly the rotations of Windows LAPS where it manages the DSRM password.

Keeping it manageable

  • Collect 4794 from every domain controller, successes and failures, and alert on each one, as Microsoft recommends: the DSRM rule reads every event.
  • Confirm each event against a change record or your Windows LAPS configuration instead of excluding accounts. Check in your own environment which account LAPS rotations appear under before treating them as expected.
  • Give priority to a request whose Caller Workstation is neither a domain controller nor one of your Tier 0 administration workstations.
  • After a 4794, watch for a logon of the domain controller's local Administrator (4624 with a SID ending in -500 and the domain controller's own name as the account domain) while the directory is running.

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>4794</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>13824</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="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1104</Data>
    <Data Name="SubjectUserName">adm-alice</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x3a7f21</Data>
    <Data Name="Workstation">DC01</Data>
    <Data Name="Status">0x0</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Why alert on every 4794?

Microsoft recommends it. The DSRM administrator is a local administrator of the domain controller that is not managed in Active Directory, and its password is rarely changed outside planned work, so a new password set by an unexpected account, or from an unexpected computer, is a persistence step on a Tier 0 server.

Who can set the DSRM password, and from where?

Microsoft describes it as a task for members of Domain Admins, who can reset it for the domain controller they work on or for another domain controller of the domain. 4794 is written by the domain controller whose password was set, with the requesting computer in Caller Workstation, so a remote reset shows up on the target domain controller with the administrator's computer name.

Does Windows LAPS write 4794 when it rotates the DSRM password?

Microsoft does not say. Windows LAPS can manage the DSRM password on Windows Server 2019 and later domain controllers when password encryption is enabled. Check in your own environment whether its rotations write 4794 and under which account before treating them as expected.

References