Skip to content

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

FlagHexMeaning / risk
ACCOUNTDISABLE0x2Account is disabled.
DONT_REQ_PREAUTH0x400000No Kerberos pre-auth → AS-REP roasting.
TRUSTED_FOR_DELEGATION0x80000Unconstrained delegation — TGTs cached on the host.
NOT_DELEGATED0x100000Account is sensitive and cannot be delegated.
DONT_EXPIRE_PASSWORD0x10000Password never expires.
PASSWD_NOTREQD0x20No 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.

  • servicePrincipalName — Kerberoasting surface
  • msDS-AllowedToActOnBehalfOfOtherIdentity — resource-based constrained delegation