UAC Flags Reference

The OldUacValue and NewUacValue fields in Microsoft-Windows-Security-Auditing events 4738 and 4720 are hexadecimal bitmasks representing the Active Directory userAccountControl attribute. Each bit maps to an account property. When an account is modified, comparing the old and new values reveals exactly which flags changed.

UAC Flags#

21 flags

BitFlagDescription
0x00000001SCRIPTLogon script will be run
0x00000002ACCOUNTDISABLEAccount is disabled
0x00000008HOMEDIR_REQUIREDHome directory is required
0x00000010LOCKOUTAccount is locked out
0x00000020PASSWD_NOTREQDNo password required
0x00000040PASSWD_CANT_CHANGEUser cannot change password
0x00000080ENCRYPTED_TEXT_PWD_ALLOWEDReversible encryption password storage allowed
0x00000100TEMP_DUPLICATE_ACCOUNTLocal account for users with a primary account in another domain
0x00000200NORMAL_ACCOUNTDefault account type for typical users
0x00000800INTERDOMAIN_TRUST_ACCOUNTTrust account for a system domain that trusts other domains
0x00001000WORKSTATION_TRUST_ACCOUNTComputer account for a workstation or server
0x00002000SERVER_TRUST_ACCOUNTComputer account for a domain controller
0x00010000DONT_EXPIRE_PASSWORDPassword never expires
0x00020000MNS_LOGON_ACCOUNTMajority Node Set logon account
0x00040000SMARTCARD_REQUIREDSmart card required for interactive logon
0x00080000TRUSTED_FOR_DELEGATIONAccount is trusted for Kerberos unconstrained delegation
0x00100000NOT_DELEGATEDAccount cannot be delegated
0x00200000USE_DES_KEY_ONLYRestrict to DES encryption types only
0x00400000DONT_REQ_PREAUTHKerberos pre-authentication is not required
0x00800000PASSWORD_EXPIREDPassword has expired
0x01000000TRUSTED_TO_AUTH_FOR_DELEGATIONAccount is trusted for constrained delegation (protocol transition / S4U2Self)
0x04000000PARTIAL_SECRETS_ACCOUNTRead-Only Domain Controller (RODC) account

Commonly Monitored Flags#

The following flag changes are frequently targeted in detection rules due to their security impact:

FlagRiskCommon Detection
DONT_REQ_PREAUTHEnables AS-REP Roasting: attacker can request a ticket encrypted with the user's hash without pre-authenticationAlert on any event 4738 that adds this flag
TRUSTED_FOR_DELEGATIONUnconstrained delegation: any service ticket to this account includes the user's TGT, enabling impersonationAlert on non-DC accounts gaining this flag
PASSWD_NOTREQDAccount can have an empty passwordAlert on any event that sets this flag on active accounts
DONT_EXPIRE_PASSWORDPersistent credential: password never rotatesMonitor for this combined with service accounts or privileged accounts
ACCOUNTDISABLERemoving this flag re-enables a disabled accountAlert when previously disabled accounts are re-enabled unexpectedly
USE_DES_KEY_ONLYForces weak DES encryption for KerberosAlert on this flag being set: may indicate Kerberoast setup
TRUSTED_TO_AUTH_FOR_DELEGATIONConstrained delegation with protocol transition: allows S4U2Self impersonationAlert on non-service accounts gaining this flag
PARTIAL_SECRETS_ACCOUNTRODC account: limited secret replicationUnexpected accounts with this flag may indicate RODC compromise

How to Decode a Change#

The old and new UAC values are hex bitmasks. XOR them to find which bits changed:

OldUacValue: 0x10200   (NORMAL_ACCOUNT | DONT_EXPIRE_PASSWORD)
NewUacValue: 0x410200  (NORMAL_ACCOUNT | DONT_EXPIRE_PASSWORD | DONT_REQ_PREAUTH)

Changed = 0x10200 XOR 0x410200 = 0x400000  → DONT_REQ_PREAUTH was added

To determine whether a flag was added or removed, check whether the bit is set in the new value: