Skip to content

Add SystemBasicProcessInformation (252) for Win11 26100+#22

Open
0xCZR1 wants to merge 1 commit intoMSxDOS:masterfrom
0xCZR1:add-system-basic-process-information
Open

Add SystemBasicProcessInformation (252) for Win11 26100+#22
0xCZR1 wants to merge 1 commit intoMSxDOS:masterfrom
0xCZR1:add-system-basic-process-information

Conversation

@0xCZR1
Copy link

@0xCZR1 0xCZR1 commented Jan 31, 2026

Adds two new system information classes and related structs.

SystemBasicProcessInformation (252)

Documentation: https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntquerysysteminformation
Minimum version: Windows 11 version 26100.4770+
Tested: Verified struct layout and functionality on Windows 11 26100+

From MSDN:

SYSTEM_BASICPROCESS_INFORMATION is identical to SYSTEM_PROCESS_INFORMATION except for the SequenceNumber member, which is a unique value assigned to each process and used to detect UniqueProcessId reuse (instead of process CreateTime).

SystemShadowStackInformation (221)

Documentation: None (reverse engineered)
Tested: Verified struct layout and functionality on Windows 11 26100+

Returns CET (Control-flow Enforcement Technology) status flags. On a system with full CET enabled, returns value 0x3.

Bit meanings not documented — assumed based on CET architecture:

  • Bit 0: Shadow Stack
  • Bit 1: Indirect Branch Tracking (IBT)

Changes

  • Added SystemShadowStackInformation = 221 to SYSTEM_INFORMATION_CLASS enum
  • Added SystemBasicProcessInformation = 252 to SYSTEM_INFORMATION_CLASS enum
  • Added SYSTEM_SHADOW_STACK_INFORMATION struct and pointer type
  • Added SYSTEM_BASIC_PROCESS_INFORMATION struct and pointer type
  • Added layout tests for x86, x86_64, and aarch64

@0xCZR1 0xCZR1 force-pushed the add-system-basic-process-information branch from 2e7a8cb to 81d9329 Compare February 1, 2026 08:30
src/ntexapi.rs Outdated
@@ -941,6 +941,8 @@ ENUM!{enum SYSTEM_INFORMATION_CLASS {
SystemLeapSecondInformation = 206,
SystemFlags2Information = 207,
MaxSystemInfoClass = 208,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MaxSystemInfoClass = 208,

This should always be the last field of the enum. In fact, you can remove it.

src/ntexapi.rs Outdated
SystemFlags2Information = 207,
MaxSystemInfoClass = 208,
SystemShadowStackInformation = 221,
SystemBasicProcessInformation = 252, // As per MSDN: Available as of Windows 11 version 26100.4770
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SystemBasicProcessInformation = 252, // As per MSDN: Available as of Windows 11 version 26100.4770
SystemBasicProcessInformation = 252,

There's no need for this comment.

src/ntexapi.rs Outdated
}}
pub type PSYSTEM_PROCESS_INFORMATION = *mut SYSTEM_PROCESS_INFORMATION;

STRUCT!{struct SYSTEM_BASIC_PROCESS_INFORMATION {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
STRUCT!{struct SYSTEM_BASIC_PROCESS_INFORMATION {
STRUCT!{struct SYSTEM_BASICPROCESS_INFORMATION {

...and the rest

@0xCZR1 0xCZR1 force-pushed the add-system-basic-process-information branch from 81d9329 to 33f0926 Compare February 7, 2026 21:42
@0xCZR1
Copy link
Author

0xCZR1 commented Feb 7, 2026

Hey @MSxDOS, thanks for the review! I've addressed all the feedback, removed MaxSystemInfoClass, dropped the inline comment, and renamed to SYSTEM_BASICPROCESS_INFORMATION to match the MSDN naming. Also added layout tests for x86 and aarch64 that were missing. Let me know if anything else needs adjusting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants