CreateAny

Summary

FSProtect ACL Alias

CreateAny

AD Alias

Create all child objects

Affected Object Types

OUs, Domains, Containers

Exploitation Certainty

Certain

AD Right

CreateChild

AD Permission Guid

00000000-0000-0000-0000-000000000000

Description

The CreateAny permission in Active Directory allows an account to create any type of child object within a designated container. This includes users, groups, computers, and Organizational Units (OUs). When properly configured, this permission facilitates efficient administrative operations, enabling swift organizational adjustments, such as onboarding new personnel, forming temporary groups for specific projects, or restructuring directory hierarchies to meet evolving business needs.

However, if misconfigured or obtained by unauthorized principals, the CreateAny permission introduces severe security risks. An attacker can create arbitrary objects users, groups, computers, and nested OUs altering the directory structure to hide malicious accounts, bypass monitoring controls, and facilitate lateral movement. These unauthorized modifications may result in privilege escalation, persistent access, and widespread compromise of the domain’s confidentiality, integrity, and availability.

Identification

PowerShell

Active Directory Module

Using the ActiveDirectory PowerShell module, you can enumerate CreateAny entries.

1. Find-CreateAny function

2. Scan all OUs and containers in the domain

3. Scan a specific object

4. To exclude default admin ACLs to improve visibility

.NET Directory Services

By leveraging PowerShell’s built-in .NET DirectoryServices namespace, you can enumerate CreateAny entries without relying on any external modules or dependencies.

1. Find-CreateAnySimple function

2. Scan all containers in the domain

3. Scan a specific container in the domain

4. To exclude default admin ACLs to improve visibility

Active Directory Users and Computers

1. Open Active Directory Users and Computers on your Windows server.

2. Right-click the object name.

3. Select Properties from the context menu.

4. In the Properties window, navigate to the Security tab.

5. Click the Advanced button to open the Advanced Security Settings dialog.

6. In the Advanced Security Settings window, locate and select the relevant Access Control Entry (ACE) for the user or group you wish to configure.

7. Click Edit to modify the selected ACE.

8. In the permissions list, locate and check the option Create all child objects.

9. Click OK to save your changes and close the dialogs.

Exploitation

For exploitation details on creating user and computer objects, see CreateUser and CreateComputer.

Mitigation

Dangerous Access Control Entries should be removed by following the steps below.

1. Open Active Directory Users and Computers, and activate Advanced Features option.

2. Double-click the affected object and open the Security tab.

3. In this tab, click the Advanced button and open the suspicious Access Control Entry.

4. Remove the rights marked as dangerous.

5. Click OK and Apply to save the changes.

Detection

Adding new Access Control Entries to Active Directory objects modifies the ntSecurityDescriptor attribute of those objects. These changes can be detected with Event IDs 5136 and 4662 to identify suspicious modifications.

Event ID
Category
Description
Fields/Attributes
References

5136

Audit Directory Service Changes

A directory service object was modified.

ntSecurityDescriptor

https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5136

4662

Audit Directory Service Access

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.

Subject, TargetAccount

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.

Subject, TargetAccount

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4722

5137

A directory service object was created.

ObjectDN, ObjectClass

https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5137

4720

A user account was created.

Subject, NewAccountName

https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4720

4741

A computer account was created.

Subject, TargetAccount

https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4741

4727

A security-enabled global group was created.

Subject, GroupName

https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4727

4731

A security-enabled local group was created.

Subject, GroupName

https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4731

4754

A security-enabled universal group was created.

Subject, GroupName

https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4754

References

Last updated

Was this helpful?