> Windows Syscalls
ntoskrnl.exeT1106

NtCreatePartition

Creates a memory partition object that isolates the physical-page working set of a group of processes.

Prototype

NTSTATUS NtCreatePartition(
  PHANDLE            PartitionHandle,
  HANDLE             ParentPartitionHandle,
  ACCESS_MASK        DesiredAccess,
  POBJECT_ATTRIBUTES ObjectAttributes,
  ULONG              PreferredNode
);

Arguments

NameTypeDirDescription
PartitionHandlePHANDLEoutReceives the handle to the newly created partition object.
ParentPartitionHandleHANDLEinOptional parent partition; NULL inherits from the system partition. Used to build hierarchies.
DesiredAccessACCESS_MASKinAccess mask; commonly MEMORY_PARTITION_ALL_ACCESS (0x000F0003).
ObjectAttributesPOBJECT_ATTRIBUTESinObject name (e.g. \KernelObjects\MyPartition) and security descriptor.
PreferredNodeULONGinNUMA node hint for backing memory; 0xFFFFFFFF for no preference.

Syscall IDs by Windows version

Windows versionSyscall IDBuild
Win10 15070xAAwin10-1507
Win10 16070xACwin10-1607
Win10 17030xAFwin10-1703
Win10 17090xB0win10-1709
Win10 18030xB1win10-1803
Win10 18090xB1win10-1809
Win10 19030xB2win10-1903
Win10 19090xB2win10-1909
Win10 20040xB6win10-2004
Win10 20H20xB6win10-20h2
Win10 21H10xB6win10-21h1
Win10 21H20xB7win10-21h2
Win10 22H20xB7win10-22h2
Win11 21H20xBAwin11-21h2
Win11 22H20xBBwin11-22h2
Win11 23H20xBBwin11-23h2
Win11 24H20xBDwin11-24h2
Server 20160xACwinserver-2016
Server 20190xB1winserver-2019
Server 20220xB9winserver-2022
Server 20250xBDwinserver-2025

Kernel module

ntoskrnl.exeNtCreatePartition

Related APIs

NtOpenPartitionNtManagePartitionNtSetInformationProcess (ProcessAttachToMemoryPartition)

Syscall stub

4C 8B D1                  mov r10, rcx
B8 BD 00 00 00            mov eax, 0xBD
F6 04 25 08 03 FE 7F 01   test byte ptr [0x7FFE0308], 1
75 03                     jne short +3
0F 05                     syscall
C3                        ret
CD 2E                     int 2Eh
C3                        ret

Undocumented notes

Introduced in Windows 10 Redstone 2 (1703) as part of the memory-partition subsystem originally built for game-mode and Hyper-V container memory isolation. A partition owns its own page lists, available pages, modified-page-writer thread, and standby cache; processes associated with the partition (`ProcessInformationClass = ProcessAttachToMemoryPartition`) draw their physical memory exclusively from it. The standard wrapper `CreatePartition` lives in `api-ms-win-core-memorypartition-l1` (kernel32-side stub), but most use is internal — Hyper-V, the Windows container runtime, and `SystemSettings` for the Game Mode reservation all consume it. Requires `SeLockMemoryPrivilege` plus the `MEMORY_PARTITION_ALL_ACCESS` SD on the parent.

Common malware usage

Very low offensive signal. The privilege requirement (`SeLockMemoryPrivilege`) gates almost every interesting use, and the operational complexity of moving processes between partitions doesn't buy malware much that simpler section-mapping doesn't. The only genuine research-level use is **side-channel isolation in red-team telemetry sandboxes** — partitioning a sensor's working set so that pagefile-pressure timing leaks from the victim no longer correlate with the sensor's measurements. No public commodity-malware family is documented as using it.

Detection opportunities

`NtCreatePartition` calls from anything outside `lsass.exe` (briefly during boot), `vmcompute.exe`, `vmwp.exe`, `SystemSettings.exe`, and a few dedicated game-mode services are inherently suspicious. The provider `Microsoft-Windows-Kernel-Memory` emits event 8 (`PartitionCreated`) with the calling image path. Auditing `SeLockMemoryPrivilege` adjustments on non-service tokens is the cheapest upstream signal — the privilege is required and rarely held legitimately by user-mode code.

Direct syscall examples

cCreate a named child partition under the system partition

// Requires SeLockMemoryPrivilege and a writable SD on the parent.
#include <windows.h>
#include <winternl.h>

#define MEMORY_PARTITION_ALL_ACCESS 0x000F0003

typedef NTSTATUS (NTAPI* pNtCreatePartition)(
    PHANDLE, HANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, ULONG);

void make_partition(void) {
    UNICODE_STRING name;
    RtlInitUnicodeString(&name, L"\\KernelObjects\\Sandbox1");
    OBJECT_ATTRIBUTES oa;
    InitializeObjectAttributes(&oa, &name, OBJ_CASE_INSENSITIVE, NULL, NULL);

    pNtCreatePartition f = (pNtCreatePartition)GetProcAddress(
        GetModuleHandleA("ntdll.dll"), "NtCreatePartition");

    HANDLE h = NULL;
    NTSTATUS st = f(&h, NULL /* parent = system */,
                    MEMORY_PARTITION_ALL_ACCESS, &oa,
                    0xFFFFFFFF /* any NUMA node */);
}

asmx64 direct stub (Win11 24H2 / Server 2025, SSN 0xBD)

NtCreatePartition PROC
    mov  r10, rcx
    mov  eax, 0BDh
    syscall
    ret
NtCreatePartition ENDP

MITRE ATT&CK mappings

Last verified: 2026-05-20