AddAllowedToAct
Summary
FSProtect ACL Alias
AddAllowedToAct
AD Alias
Write msDS-AllowedToActOnBehalfOfOtherIdentity
Affected Object Types
Computers
Exploitation Certainty
Certain
AD Attribute
msDS-AllowedToActOnBehalfOfOtherIdentity
Attribute GUID
3f78c3e5-f79a-46bd-a0b8-9d18116ddc79
AD Right
WriteProperty
Description
The AddAllowedToAct permission in Active Directory allows an account to modify the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on computer or service accounts. This permission is crucial for configuring Kerberos Resource-Based Constrained Delegation (RBCD), enabling services to impersonate users securely and access resources on their behalf. It facilitates flexible authentication scenarios and simplifies delegation configurations within the network.
However, if misconfigured, the AddAllowedToAct permission can introduce significant security vulnerabilities. An attacker with this permission can add their own account to the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of a target computer or service account. This grants them the ability to impersonate any user when accessing services on that machine. Exploiting this vulnerability could lead to unauthorized access, privilege escalation, and full compromise of the system, as the attacker can act on behalf of any user including domain administrators to access sensitive resources.
Identification
PowerShell
Using the Active Directory PowerShell module, you can enumerate AddAllowedToAct entries.
1. Find-AddAllowedToAct Function
2. Scan all domain Service Principal Names objects
3. Scan a specific object
4. Using SearchBase to limit the searching scope
.NET Directory Services
By leveraging PowerShell’s built-in .NET DirectoryServices namespace, you can enumerate AddAllowedToAct entries without relying on any external modules or dependencies.
1. Find-AddAllowedToActSimple function
2. Scan all Service Principal Names objects in the domain
3. Scan a specific object
Active Directory Users and Computers
1. Open Active Directory Users and Computers on a Windows server.
2. Right-click the object and select Properties.
3. In the Properties window, go to the Security tab.
4. Click the Advanced button to open the Advanced Security Settings dialog.
5. In the Advanced Security Settings window, locate and select the relevant Access Control Entry (ACE) for the user or group you wish to review.
6. Click Edit to modify the selected ACE.
7. In the permissions list, locate and check the option Write msDS-AllowedToActOnBehalfOfOtherIdentity if you intend to grant it, or clear it to remove the permission.
8. Click OK to save and close the dialogs.

Exploitation
This permission can be exploited on Windows systems using tools like Rubeus and on Linux systems with the impacket suite. After exploitation, an attacker can obtain the target computer's credentials.
Windows
Create a new computer
This step can be skipped if a controlled SPN account already exists; otherwise, create a new computer using standin.

To write msDS-AllowedToActOnBehalfOfOtherIdentity attribute

Or

To get a TGT for the controlled SPN account

To get a service ticket for an impersonated user

To check admin access on the target

Linux
Creating a new Computer
This step can be skipped if a controlled SPN account already exists; otherwise, create a new computer using impacket-addcomputer.
To write msDS-AllowedToActOnBehalfOfOtherIdentity attribute
To get a service ticket
To execute on the target machine
Example:
To create a new computer
To write msDS-AllowedToActOnBehalfOfOtherIdentity Attribute

To get a service ticket

Then

Mitigation
Access Control Entries identified as dangerous should be removed by following the steps below.
1. Open Active Directory Users and Computers and enable the 'Advanced Features' option.
2. Double-click the affected object and open the Security tab.
3. In the Security tab, click the 'Advanced' button, then edit the dangerous object's Access Control Entry.
4. Remove the Write msDS-AllowedToActOnBehalfOfOtherIdentity permission from the ACE.
5. Click OK and Apply to save your changes.

Detection
Adding new Access Control Entries to Active Directory objects updates the ntSecurityDescriptor attribute on those objects.
These changes can be detected using Event IDs 5136 and 4662 to identify dangerous modifications to objects.
5136
A directory service object was modified.
ntSecurityDescriptor
https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5136
4662
An operation was performed on an object.
AccessList, AccessMask
https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4662
4724
An attempt was made to reset an account's password.
TargetUserName, SubjectUserName
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4724
4722
A user account was enabled.
TargetUserName, SubjectUserName
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4722
4768
A Kerberos authentication ticket (TGT) was requested.
TargetUserName
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768
4769
A Kerberos service ticket was requested.
TargetUserName, ServiceName
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4769
References
Last updated
Was this helpful?