WriteAltSecurityIdentities
Summary
Forestall ACL Alias
WriteAltSecurityIdentities
AD Alias
Write Alt-Security-Identities
Affected Object Types
Users, Computers, Managed Service Accounts
Exploitation Certainty
Likely
AD Attribute
altSecurityIdentities
AD Right
WriteProperty
AD Permission Guid
00fbf30c-91fe-11d1-aebc-0000f80367c1
Description
The WriteAltSecurityIdentities permission allows an account to create, update, or remove values in the altSecurityIdentities attribute on Active Directory authentication principals. This attribute stores explicit certificate mappings that tell domain controllers which X.509 certificates can authenticate as the target account.
Explicit mappings are commonly used for certificate based authentication through Kerberos PKINIT or Schannel. They must be tightly controlled because a new mapping can make a certificate controlled by another principal valid for the target account.
Risk
An attacker with WriteAltSecurityIdentities over a target object can add a mapping for a certificate they control and then authenticate as that target. If the target is privileged, a computer, or a managed service account with valuable access, this can lead to privilege escalation, persistence, credential access, and domain compromise.
The risk is higher when weak explicit mapping formats are used. Strong mappings bind to certificate specific values such as issuer and serial number, Subject Key Identifier, or SHA1 public key hash. Weak mappings such as X509:<RFC822>, X509:<S>, and X509:<I>...<S> rely on reusable certificate fields like e-mail address or subject name.
Identification
PowerShell
Active Directory Module
Using the ActiveDirectory PowerShell module, you can enumerate WriteAltSecurityIdentities entries.
1. Find-WriteAltSecurityIdentities function
2. Scan all supported domain principals
3. Scan a specific account
4. Using SearchBase to limit the searching scope
.NET Directory Services
By leveraging PowerShell's built-in .NET DirectoryServices namespace, you can enumerate WriteAltSecurityIdentities entries without relying on external modules.
1. Find-WriteAltSecurityIdentitiesSimple function
2. Scan all supported domain principals
3. Scan a specific account
Active Directory Users and Computers
1. Open Active Directory Users and Computers on your Windows server, and activate the Advanced Features option.
2. Right-click the affected object.
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. Select the relevant Access Control Entry (ACE).
7. Click Edit to modify the selected ACE.
8. In the permissions list, locate and check the Write altSecurityIdentities option.
9. Click OK and Apply to save changes.

Exploitation
Windows
An attacker first obtains a certificate they control. Then they write an explicit mapping to the target account so the certificate is accepted as that target.
After the mapping is added, the attacker can request a TGT as the target by using the mapped certificate.
Linux
On Linux, the mapping can be written with bloodyAD by using an account that holds the WriteAltSecurityIdentities permission.
The attacker can then authenticate with the certificate using Certipy.
Mitigation
Access Control Entries identified as dangerous should be removed by following the steps below.
1. Open Active Directory Users and Computers, and activate the Advanced Features option.
2. Double-click the affected object and open the Security tab.
3. Click the Advanced button and open the dangerous Access Control Entry.
4. Remove the Write altSecurityIdentities permission.
5. Click OK and Apply to save changes.

Review existing altSecurityIdentities values on privileged users, computers, and managed service accounts. Remove mappings that are no longer required, and replace weak mappings such as X509:<RFC822>, X509:<S>, and X509:<I>...<S> with strong mappings such as X509:<SKI>, X509:<SR>, or X509:<SHA1-PUKEY> where explicit mapping is required.
Detection
Changes to the altSecurityIdentities attribute and changes to object security descriptors can be detected by auditing directory service modifications. Ensure Audit Directory Service Changes and Audit Directory Service Access are enabled on Domain Controllers. Look for the following events:
5136
A directory service object was modified.
AttributeLDAPDisplayName should equal altSecurityIdentities.
https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5136
4662
An operation was performed on an object.
AccessMask, Properties, and ObjectType for WriteProperty activity.
https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4662
4768
A Kerberos authentication ticket was requested.
CertIssuerName, CertSerialNumber, CertThumbprint when certificate fields are logged.
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768
References
Last updated
Was this helpful?