Post · 1 min read· pp. 746–747

SYSTEM_CODEINTEGRITY_INFORMATION

The SYSTEM_CODEINTEGRITY_INFORMATION structure provides input to and receives output from the ZwQuerySystemInformation or NtQuerySystemInformation functions when given the information class SystemCodeIntegrityInformation (0x67).

Documentation Status

The SYSTEM_CODEINTEGRITY_INFORMATION structure used not to be documented. It still has no C-language definition in any header, including WINTERNL.H, from any known development kit. It is however documented with NtQuerySystemInformation as found online today, 28th October 2016. When it was added may be anyone’s guess.

Layout

The SYSTEM_CODEINTEGRITY_INFORMATION is 0x08 bytes in both 32-bit and 64-bit Windows.

OffsetDefinitionRemarks
0x00ULONG Length;input
0x04ULONG CodeIntegrityOptions;output

On input, the Length must hold the size of the structure, else the function fails, returning STATUS_INFO_LENGTH_MISMATCH. On output, the possible bits that CI.DLL can set in the CodeIntegrityOptions are (up to the original release of Windows 10):

MaskSymbolic NameVersions
0x00000001CODEINTEGRITY_OPTION_ENABLED6.0 and higher
0x00000002CODEINTEGRITY_OPTION_TESTSIGN6.0 and higher
0x00000004CODEINTEGRITY_OPTION_UMCI_ENABLED6.2 and higher
0x00000008CODEINTEGRITY_OPTION_UMCI_AUDITMODE_ENABLED6.2 and higher
0x00000010CODEINTEGRITY_OPTION_UMCI_EXCLUSIONPATHS_ENABLED6.2 and higher
0x00000080CODEINTEGRITY_OPTION_DEBUGMODE_ENABLED6.3 and higher
0x00000200CODEINTEGRITY_OPTION_FLIGHTING_ENABLED10.0 and higher
0x00000400CODEINTEGRITY_OPTION_HVCI_KMCI_ENABLED10.0 and higher (x64)
0x00000800CODEINTEGRITY_OPTION_HVCI_KMCI_AUDITMODE_ENABLED10.0 and higher (x64)
0x00001000CODEINTEGRITY_OPTION_HVCI_KMCI_STRICTMODE_ENABLED10.0 and higher (x64)
0x00002000CODEINTEGRITY_OPTION_HVCI_IUM_ENABLED10.0 and higher (x64)

CI version 10.0 allows that the CodeIntegrityOptions can be set first by an extension for Xbox support. Whether this extension can set flags that CI does not is beyond the scope of these notes.