Other constants

Enumerated values that are not access rights. Access rights are catalogued separately in Access mask bits.

Impersonation levels #

A token's impersonation level. The conceptual model is Impersonation levels.

ConstantValueMeaning
KACS_IMLEVEL_ANONYMOUS0No identity.
KACS_IMLEVEL_IDENTIFICATION1Inspect only. Cannot be used for an access check.
KACS_IMLEVEL_IMPERSONATION2Act as the client locally. The default.
KACS_IMLEVEL_DELEGATION3Act as the client locally, and forward credentials to remote machines.

Older documents spell these KACS_LEVEL_*. That spelling does not exist in any header.

A primary token reports level 0.

Integrity levels #

The RIDs used in S-1-16-* SIDs and in a token's integrity_level field. The model is Mandatory integrity control.

ConstantRIDName
INTEGRITY_LEVEL_UNTRUSTED0Untrusted
INTEGRITY_LEVEL_LOW4096Low
INTEGRITY_LEVEL_MEDIUM8192Medium
INTEGRITY_LEVEL_HIGH12288High
INTEGRITY_LEVEL_SYSTEM16384System

Spaced by 4096, so future levels can be inserted between existing ones.

These are named levels, not a closed enum. The integrity level is the S-1-16 SID's single sub-authority as an unsigned integer, compared numerically. Any such value is valid, and non-standard ones appear in Windows-interop descriptors — medium-plus at 8448, protected at 20480. Code that switches on the five names will mishandle those.

Mandatory policy flags #

A token's mandatory_policy field. Both are immutable after token creation.

FlagValueMeaning
NO_WRITE_UP0x01MIC blocks write-category access from lower integrity.
NEW_PROCESS_MIN0x02At exec, lower the token's integrity to match the binary if the binary is lower.

Logon types #

A session's logon_type field. The model is Logon types.

ConstantValueMeaning
LOGON_TYPE_INTERACTIVE2Console, SSH, terminal services.
LOGON_TYPE_NETWORK3Network resource access — SMB, RPC, federated.
LOGON_TYPE_BATCH4Scheduled job.
LOGON_TYPE_SERVICE5Service running under a specific principal.
LOGON_TYPE_NETWORK_CLEARTEXT8Network logon with a cleartext credential.
LOGON_TYPE_NEW_CREDENTIALS9Keep the local identity; use alternative credentials outbound.

Values 1, 6, 7 and 10 upward are reserved.

Elevation types #

A token's elevation_type field.

ConstantValueMeaning
KACS_ELEVATION_DEFAULT1Not part of a linked pair.
KACS_ELEVATION_FULL2The elevated half of a linked pair.
KACS_ELEVATION_LIMITED3The non-elevated half.

PIP tiers #

A process's PSB pip_type field.

ValueMeaning
0None. Unprotected, the default for unsigned binaries.
512Protected. Standard PIP protection.
1024Isolated. Reserved; no signing key targets it.

There are no public constants for these. Nothing in uapi/pkm/ names the tiers, and PIP_TYPE_NONE / _PROTECTED / _ISOLATED — which older documents use — exist nowhere in the tree. Protected survives only as the kernel-private PKM_KACS_PIP_TYPE_PROTECTED.

A program reasoning about tiers compares the numbers. The Peios Kernel TRM §3.7 says the same.

Token audit policy flags #

A token's audit_policy field. These are what force the audit events in the Events Index.

FlagValueMeaning
OBJECT_ACCESS_SUCCESS0x01Force an audit event on every successful access.
OBJECT_ACCESS_FAILURE0x02Force an audit event on every failed access.
PRIVILEGE_USE_SUCCESS0x04Emit a privilege-use event when a privilege's bits survive.
PRIVILEGE_USE_FAILURE0x08Emit a privilege-use event when its bits are stripped.

Create dispositions #

For kacs_open.

ConstantValueBehaviour
KACS_DISPOSITION_SUPERSEDE0If it exists, delete and recreate; otherwise create.
KACS_DISPOSITION_OPEN1If it exists, open; otherwise fail with ENOENT.
KACS_DISPOSITION_CREATE2If it exists, fail with EEXIST; otherwise create.
KACS_DISPOSITION_OPEN_IF3If it exists, open; otherwise create.
KACS_DISPOSITION_OVERWRITE4If it exists, truncate and open; otherwise fail with ENOENT.
KACS_DISPOSITION_OVERWRITE_IF5If it exists, truncate and open; otherwise create.

Older documents spell these KACS_FILE_SUPERSEDE, KACS_FILE_OPEN and so on. That spelling does not exist in any header.

SECURITY_INFORMATION flags #

For kacs_get_sd and kacs_set_sd. Declared as KACS_SECINFO_*; the names below are the MS-DTYP spellings PCDS uses.

FlagValueRight to readRight to write
OWNER_SECURITY_INFORMATION0x01READ_CONTROLWRITE_OWNER
GROUP_SECURITY_INFORMATION0x02READ_CONTROLWRITE_OWNER
DACL_SECURITY_INFORMATION0x04READ_CONTROLWRITE_DAC
SACL_SECURITY_INFORMATION0x08ACCESS_SYSTEM_SECURITYACCESS_SYSTEM_SECURITY
LABEL_SECURITY_INFORMATION0x10READ_CONTROLWRITE_OWNER, plus the integrity rules

SACL_SECURITY_INFORMATION and LABEL_SECURITY_INFORMATION are mutually exclusive in one call.

Process mitigation flags #

The KACS_MIT_* flags on the PSB. The catalogue of what each one gates is Process mitigations.

Size and count limits #

LimitValueContext
Max SD size65,535 bytesAny SD blob. Normative in PCDS §5.1.
Max ACL size64 KBAny ACL within an SD
Max single ACE size64 KBBounded by the ACL size
Min SID size8 bytesRevision, count and authority, no sub-authorities
Max SID size68 bytes15 sub-authorities
Max token wire spec64 KBkacs_create_token input
Max session wire spec4096 byteskacs_create_session input
Max CAAP wire spec256 KBkacs_set_caap input
Max CAAP rules per policy256
Max applies-to expression64 KBPer CAAP rule
Max conditional stack depth1024Evaluator limit
Max TLP cache entries64Trusted Library Path prefixes
Max TLP path length4096 bytesPer prefix
Max mount template SD64 KBkacs_set_mount_policy template

Edit this page