How the attack works
Windows separates what an account may do on a computer into privileges and logon rights. Privileges allow system-level actions. Debug programs (SeDebugPrivilege) gives access to the memory of any process, Back up files and directories (SeBackupPrivilege) reads every file regardless of its permissions, Restore files and directories (SeRestorePrivilege) writes every file and sets any owner, Take ownership (SeTakeOwnershipPrivilege) takes over any securable object including directory objects, Load and unload device drivers (SeLoadDriverPrivilege) runs code in the kernel, and Act as part of the operating system (SeTcbPrivilege) lets a process impersonate any user without authentication. Logon rights decide how an account may start a session, for example locally, through Remote Desktop, as a batch job or as a service.
On a domain controller each of these is a path to the whole domain. An account that can read every file can copy the directory database, an account that can debug processes can read the credentials held in memory, and an account that may log on to a domain controller has a place to run code next to them. The rights are assigned through the user rights policy the domain controllers apply, normally a Group Policy Object linked to the Domain Controllers organizational unit. An attacker who can edit such a policy, or who already administers one domain controller, gives a right to an account they control. That account is in no administrative group, so membership reviews do not find it, and the assignment survives password resets.
Each domain controller records the change to its local security policy when it applies it. Event 4704 is written for privileges, one event per account, with the SID of the account and the list of assigned rights. Event 4717 is written for logon rights, with the SID and the name of the right. Both are usually written under the SYSTEM account of the domain controller and not under the account of the person who edited the policy. The right to enable delegation (SeEnableDelegationPrivilege) has its own page, Delegation User Right Assigned, and is not matched here.
What an attacker needs
- The ability to change the user rights assignment that domain controllers apply. That is edit rights on a Group Policy Object linked to the Domain Controllers organizational unit (or to the domain or a site that holds domain controllers), or administrator rights on a domain controller.
- An account to receive the right, and for logon rights a way to reach the domain controller with it.
Impact
The holder of one of these privileges on a domain controller can reach the credentials of the whole domain, by reading the directory database, by reading process memory, by loading a driver or by taking ownership of protected objects. A logon right gives an unprivileged account a session on a domain controller, from which local weaknesses and the credentials of administrators who are logged on come into reach. The assignment is stored in the security policy of the domain controllers, not on the account, so it survives password resets and clean-ups of group memberships.
Detection rules
Logon Right Granted to an Account
Detects event 4717 (system security access was granted to an account) in which the granted logon right lets the account start a session on the computer: SeRemoteInteractiveLogonRight (log on through Remote Desktop), SeInteractiveLogonRight (log on locally), SeBatchLogonRight (log on as a batch job) or SeServiceLogonRight (log on as a service). On a domain controller such a right gives an account outside the administrators a place to run code next to the credentials of the domain. Attack path tools model the Remote Desktop right as its own edge to a host for that reason. The built-in Administrators group (S-1-5-32-544) is excluded. The right to access the computer from the network and the deny rights use the same event and are not matched. The event is written when the computer applies the changed policy, usually under its SYSTEM account. The rule cannot tell whether the computer is a domain controller, so apply it to the Security logs of domain controllers. Requires the audit subcategory Audit Authentication Policy Change.
title: Logon Right Granted to an Account
id: 67a7d032-8095-4e43-8917-bbf90f5fce2f
status: experimental
description: >-
Detects event 4717 (system security access was granted to an account) in
which the granted logon right lets the account start a session on the
computer: SeRemoteInteractiveLogonRight (log on through Remote Desktop),
SeInteractiveLogonRight (log on locally), SeBatchLogonRight (log on as a
batch job) or SeServiceLogonRight (log on as a service). On a domain
controller such a right gives an account outside the administrators a
place to run code next to the credentials of the domain. Attack path
tools model the Remote Desktop right as its own edge to a host for that
reason. The built-in Administrators group (S-1-5-32-544) is excluded.
The right to access the computer from the network and the deny rights
use the same event and are not matched. The event is written when the
computer applies the changed policy, usually under its SYSTEM account.
The rule cannot tell whether the computer is a domain controller, so
apply it to the Security logs of domain controllers. Requires the audit
subcategory Audit Authentication Policy Change.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4717
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-authentication-policy-change
- https://attack.mitre.org/techniques/T1098/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098
logsource:
product: windows
service: security
detection:
selection:
EventID: 4717
AccessGranted:
- SeRemoteInteractiveLogonRight
- SeInteractiveLogonRight
- SeBatchLogonRight
- SeServiceLogonRight
filter_builtin_administrators:
TargetSid: 'S-1-5-32-544'
condition: selection and not 1 of filter_*
falsepositives:
- A service installed with a named account, which is granted the right to log on as a service, and scheduled tasks that run under a named account. On a domain controller these accounts are Tier 0. Confirm the installation and exclude the account by TargetSid.
- The first application of the domain controller policy and the promotion of a new domain controller, which grant the default logon rights to the built-in operator groups.
level: medium
False positives
- A service installed with a named account, which is granted the right to log on as a service, and scheduled tasks that run under a named account. On a domain controller these accounts are Tier 0. Confirm the installation and exclude the account by TargetSid.
- The first application of the domain controller policy and the promotion of a new domain controller, which grant the default logon rights to the built-in operator groups.
Powerful Privilege Assigned to an Account
Detects event 4704 (a user right was assigned) in which the list of assigned rights contains a privilege that gives control of the computer: SeTcbPrivilege (act as part of the operating system), SeCreateTokenPrivilege (create a token object), SeDebugPrivilege (debug programs), SeLoadDriverPrivilege (load and unload device drivers), SeBackupPrivilege and SeRestorePrivilege (read and write every file regardless of its permissions), SeTakeOwnershipPrivilege (take ownership of any object), SeSecurityPrivilege (manage auditing and the security log) and SeSyncAgentPrivilege (read all objects and properties in the directory). On a domain controller each of them is a path to the credentials of the domain. The built-in Administrators group (S-1-5-32-544), which holds most of these rights by default, is excluded. The event is written when the computer applies the changed policy, under its SYSTEM account, so the subject is the computer and not the person who edited the policy. The rule cannot tell whether the computer is a domain controller, so apply it to the Security logs of domain controllers. SeEnableDelegationPrivilege is covered by the attack Delegation User Right Assigned. Requires the audit subcategory Audit Authorization Policy Change.
title: Powerful Privilege Assigned to an Account
id: 29a40bb7-980c-46aa-a626-f042780a3406
status: experimental
description: >-
Detects event 4704 (a user right was assigned) in which the list of
assigned rights contains a privilege that gives control of the computer:
SeTcbPrivilege (act as part of the operating system), SeCreateTokenPrivilege
(create a token object), SeDebugPrivilege (debug programs),
SeLoadDriverPrivilege (load and unload device drivers), SeBackupPrivilege
and SeRestorePrivilege (read and write every file regardless of its
permissions), SeTakeOwnershipPrivilege (take ownership of any object),
SeSecurityPrivilege (manage auditing and the security log) and
SeSyncAgentPrivilege (read all objects and properties in the directory).
On a domain controller each of them is a path to the credentials of the
domain. The built-in Administrators group (S-1-5-32-544), which holds
most of these rights by default, is excluded. The event is written when
the computer applies the changed policy, under its SYSTEM account, so the
subject is the computer and not the person who edited the policy. The
rule cannot tell whether the computer is a domain controller, so apply it
to the Security logs of domain controllers. SeEnableDelegationPrivilege
is covered by the attack Delegation User Right Assigned. Requires the
audit subcategory Audit Authorization Policy Change.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4704
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-authorization-policy-change
- https://attack.mitre.org/techniques/T1098/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098
logsource:
product: windows
service: security
detection:
selection:
EventID: 4704
PrivilegeList|contains:
- SeTcbPrivilege
- SeCreateTokenPrivilege
- SeDebugPrivilege
- SeLoadDriverPrivilege
- SeBackupPrivilege
- SeRestorePrivilege
- SeTakeOwnershipPrivilege
- SeSecurityPrivilege
- SeSyncAgentPrivilege
filter_builtin_administrators:
TargetSid: 'S-1-5-32-544'
condition: selection and not 1 of filter_*
falsepositives:
- The first application of the domain controller policy and the promotion of a new domain controller, which assign the default rights to Backup Operators (S-1-5-32-551), Server Operators (S-1-5-32-549) and Print Operators (S-1-5-32-550). Add these SIDs as filter blocks if the events appear in your environment.
- Backup, monitoring or security software whose service account was given a privilege on purpose. Confirm the change record and exclude that account by TargetSid. On a domain controller such an account is Tier 0.
level: high
False positives
- The first application of the domain controller policy and the promotion of a new domain controller, which assign the default rights to Backup Operators (S-1-5-32-551), Server Operators (S-1-5-32-549) and Print Operators (S-1-5-32-550). Add these SIDs as filter blocks if the events appear in your environment.
- Backup, monitoring or security software whose service account was given a privilege on purpose. Confirm the change record and exclude that account by TargetSid. On a domain controller such an account is Tier 0.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Right assigned on one domain controller but not on the others
A right that arrives through Group Policy is applied by every domain controller within one policy refresh, so the same event appears on all of them. A right that appears on a single domain controller was set locally on that machine by someone who already administers it, which is persistence and not policy.
- Collect events 4704 and 4717 from all domain controllers and group them by
TargetSidand by the right inPrivilegeListorAccessGranted. - For each group, count the domain controllers that logged it within 3 hours, using the computer name in the System part of the event.
- Report the assignments that were logged by fewer domain controllers than you have.
- On the domain controller that logged the event alone, find the logon behind
SubjectLogonId(event 4624) to see who changed the local policy.
Events470447174624
LimitsIt needs the list of your domain controllers and logs from all of them. A domain controller that was offline applies the policy later and looks like an exception, and a policy linked to one site reaches only the domain controllers of that site. The 3 hours are a starting point.
Triage
- Resolve the SID in the Target Account field (4704) or the Account Modified field (4717), and read the rights in PrivilegeList or AccessGranted.
- Compare with the default holders. On domain controllers the built-in Administrators group holds most of these privileges, and Backup Operators, Server Operators and Print Operators hold some of them. Any other principal needs a documented reason.
- Find out how the right arrived. Look for a change to a Group Policy Object that applies to domain controllers shortly before the event (event 5136 on the policy object, or a new version of the policy in SYSVOL), and for who made it.
- Check whether the same assignment appears on every domain controller. An assignment on a single domain controller points to a local change on that machine.
- Look for use of the right, that is logons of the account to a domain controller (event 4624) after the assignment and what it did there.
Response
Once the attack is confirmed:
- Remove the right in the policy that assigns it, not only on one domain controller, and disable the account that received it.
- Disable the account that edited the policy and remove its edit rights on Group Policy Objects that apply to domain controllers. Review the same policy for other changes made in that edit.
- If the account logged on to a domain controller or used the right, handle the directory database and the credentials in memory of that domain controller as exposed and start the recovery described for NTDS.dit Extraction.
- After the next policy refresh, confirm on every domain controller that the right is held only by the principals of the baseline.
Mitigation
- Define the user rights assignment for domain controllers explicitly in one policy and keep each right with the groups of the default configuration, so that a local change on one domain controller is overwritten at the next policy refresh.
- Limit who can edit or link Group Policy Objects that apply to domain controllers to Tier 0 administrators.
- Do not grant logon rights on domain controllers to accounts outside Tier 0, and keep the built-in operator groups, which hold some of these rights by default, empty.
- Review the effective user rights on domain controllers on a schedule and compare them with the baseline.
- Enable the audit subcategories Audit Authorization Policy Change and Audit Authentication Policy Change on domain controllers, so that events 4704 and 4717 are written.
Frequently asked questions
Why are there two events for user rights?
Windows treats privileges and logon rights separately. Event 4704 is written when a privilege such as SeDebugPrivilege is assigned, and Microsoft states that it is generated only for user rights and not for logon rights. Event 4717 is written when a logon right such as SeRemoteInteractiveLogonRight is granted. They also belong to different audit subcategories.
Why does the event name the domain controller and not the person who assigned the right?
The event is written when the domain controller applies the changed policy, and it does that under its own SYSTEM account. The person who made the change edited a Group Policy Object. Look for the change to that object shortly before the event, as event 5136 on the policy object or as a new version of the policy in SYSVOL.
Do these rules also fire on member servers and workstations?
Yes, when their Security logs are collected. Events 4704 and 4717 are written on any Windows computer, and the rules cannot tell a domain controller from another machine. Apply them to the logs of domain controllers, or to other Tier 0 servers on purpose. On ordinary servers these assignments are common, for example for service accounts.
Would a review of privileged group memberships find such an assignment?
No. The right is stored in the security policy of the computer and the account that holds it does not need to be in any group. Only the events on this page, or a review of the effective user rights on the domain controllers, show it.