AD Attributes
userAccountControl — the account control flags
userAccountControl is a bitmask of flags that control an account: whether it is disabled, requires pre-authentication, is trusted for delegation, or has a non-expiring password. Several bits are security-critical.
What it is
userAccountControl (UAC) is a single integer bitmask on every account.
Each bit is a property of the account; the attribute's decimal value is the sum
of the set bits. A normal enabled user is 512; a disabled one is 514.
Security-critical bits
| Flag | Hex | Meaning / risk |
|---|---|---|
ACCOUNTDISABLE | 0x2 | Account is disabled. |
DONT_REQ_PREAUTH | 0x400000 | No Kerberos pre-auth → AS-REP roasting. |
TRUSTED_FOR_DELEGATION | 0x80000 | Unconstrained delegation — TGTs cached on the host. |
NOT_DELEGATED | 0x100000 | Account is sensitive and cannot be delegated. |
DONT_EXPIRE_PASSWORD | 0x10000 | Password never expires. |
PASSWD_NOTREQD | 0x20 | No password required. |
Querying flags
Bits are tested with a bitwise AND:
# Accounts that don't require Kerberos pre-auth (AS-REP roastable)
Get-ADUser -LDAPFilter "(userAccountControl:1.2.840.113556.1.4.803:=4194304)"
That 1.2.840.113556.1.4.803 is the LDAP bitwise-AND matching rule — the
standard way to filter on a single UAC bit.
Related
servicePrincipalName— Kerberoasting surfacemsDS-AllowedToActOnBehalfOfOtherIdentity— resource-based constrained delegation