ProcessChildProcessPolicy is not currently included in the documented set of values accepted by GetProcessMitigationPolicy; therefore, its buffer ABI, supported query versions, and use for pre-resume verification are not part of the published Win32 contract.
1. Query API support
The public PROCESS_MITIGATION_POLICY enumeration in winnt.h includes ProcessChildProcessPolicy ^1^. However, that alone does not establish that every enumeration member is accepted by every API taking the enumeration.
The GetProcessMitigationPolicy documentation says that MitigationPolicy can be one of its listed values and specifies the corresponding output type for each. That list does not include ProcessChildProcessPolicy, even though it includes some later policies such as side-channel isolation and user shadow stacks ^2^.
Consequently:
- There is no documented guarantee that passing
ProcessChildProcessPolicyis supported. - No supported Windows-version range can be assigned to that operation.
- A successful result observed on a particular Windows build would be implementation behavior, not a documented compatibility contract.
- The general Windows 8/Windows Server 2012 minimum shown for
GetProcessMitigationPolicydoes not establish support for this particular policy.
The separate ntddk.h enumeration also includes ProcessChildProcessPolicy, but that is DDI documentation and does not expand the documented Win32 function contract ^3^.
2. Return structure and length
Microsoft documents this DDI structure in ntddk.h:
typedef struct _PROCESS_MITIGATION_CHILD_PROCESS_POLICY {
union {
ULONG Flags;
struct {
ULONG NoChildProcessCreation : 1;
ULONG AuditNoChildProcessCreation : 1;
ULONG AllowSecureProcessCreation : 1;
ULONG ReservedFlags : 29;
};
};
} PROCESS_MITIGATION_CHILD_PROCESS_POLICY;
It is a four-byte ULONG flags layout, and its documented minimum platforms are Windows 10 version 1709 and Windows Server 2016 ^4^.
Nevertheless, the public material supplied here does not document this ntddk.h type—or a winnt.h user-mode counterpart—as the lpBuffer type for GetProcessMitigationPolicy. It therefore does not establish an officially supported dwLength for that policy. sizeof(PROCESS_MITIGATION_CHILD_PROCESS_POLICY) may match an observed implementation, but it is not a documented Win32 query contract.
User-mode applications should not include ntddk.h merely to infer an undocumented Kernel32 ABI.
3. Querying a suspended process
CREATE_SUSPENDED guarantees that the new process’s primary thread does not run until ResumeThread is called ^5^. The process handle returned by process creation can therefore be used for documented process-handle operations before user-mode execution begins.
GetProcessMitigationPolicy requires a process handle with PROCESS_QUERY_INFORMATION ^2^. This supports querying the policies that the function explicitly documents while the target is suspended. It does not make the omitted child-process policy query supported.
4. Relationship to the creation attribute
PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY is a documented process-creation attribute whose value is a DWORD. It supports:
-
PROCESS_CREATION_CHILD_PROCESS_RESTRICTED(0x01) -
PROCESS_CREATION_CHILD_PROCESS_OVERRIDE(0x02)
The restriction becomes a property of the token under which the process runs. Microsoft also warns that it is effective only in sandboxed applications that prevent access to sufficiently privileged process handles; otherwise, access such as PROCESS_CREATE_PROCESS or PROCESS_VM_WRITE may permit bypassing the restriction ^6^.
A typical creation value is:
DWORD childPolicy = PROCESS_CREATION_CHILD_PROCESS_RESTRICTED;
UpdateProcThreadAttribute(
attributes,
0,
PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY,
&childPolicy,
sizeof(childPolicy),
nullptr,
nullptr);
The attribute value must remain valid until the attribute list is deleted ^6^.
There is no documented guarantee that this value can subsequently be read through GetProcessMitigationPolicy before or after resume.
The DDI structure defines separate NoChildProcessCreation and AuditNoChildProcessCreation bits, with enforcement taking precedence when both are set ^4^. However, the documented PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY values shown above do not provide an audit-only creation value. The DDI bit definitions therefore cannot be used to infer a supported user-mode query or audit mapping for that attribute.
5. Supported verification before execution
The available public documentation does not specify a supported API that independently reads back this particular creation attribute from another process before its initial thread runs.
Get-ProcessMitigation -Id can report current mitigation settings for a running process, but its documentation does not establish it as a pre-resume readback contract for PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY ^7^.
NtQueryInformationProcess is not a suitable supported substitute: Microsoft states that its information classes and returned structures are internal and may change, and recommends public alternatives ^8^.
For a supported design, treat successful process creation with the requested attribute as the configuration result, retain the exact attribute value in launcher-side state or logs, and enforce the documented sandbox and handle-access conditions. There is no documented independent readback that provides the stronger pre-execution attestation requested.
References
- PROCESS_MITIGATION_POLICY enumeration (winnt.h)
- GetProcessMitigationPolicy function (processthreadsapi.h)
- PROCESS_MITIGATION_POLICY enumeration (ntddk.h)
- PROCESS_MITIGATION_CHILD_PROCESS_POLICY structure (ntddk.h)
- Process Creation Flags
- UpdateProcThreadAttribute function (processthreadsapi.h)
- Gets all process mitigation policies for all processes set in the registry using the Get-ProcessMitigation PowerShell cmdlet.
- NtQueryInformationProcess function (winternl.h)