pub struct MitigationPolicy { /* private fields */ }Expand description
A complete SDK 10.0.22621 process-creation mitigation policy.
Setters replace one field. Reserved values and combined raw policy words cannot be represented.
§Runtime support
This type mirrors the policy fields in Windows SDK 10.0.22621; it is not a claim that every field works on every supported Windows installation. Availability varies by individual policy, Windows release, processor architecture, hardware, and child executable. windows-spawn does not weaken a requested policy. Unsupported policies return the process-creation error.
Implementations§
Source§impl MitigationPolicy
impl MitigationPolicy
Sourcepub const fn dep_atl_thunk(self, enable: bool) -> Self
pub const fn dep_atl_thunk(self, enable: bool) -> Self
Enables or removes the legacy DEP ATL-thunk-emulation bit.
Sourcepub const fn relocate_images(self, value: RelocateImages) -> Self
pub const fn relocate_images(self, value: RelocateImages) -> Self
Sets mandatory image relocation.
Sourcepub const fn heap_terminate(self, value: Mitigation) -> Self
pub const fn heap_terminate(self, value: Mitigation) -> Self
Sets heap termination on corruption.
Sourcepub const fn bottom_up_aslr(self, value: Mitigation) -> Self
pub const fn bottom_up_aslr(self, value: Mitigation) -> Self
Sets bottom-up ASLR.
Sourcepub const fn high_entropy_aslr(self, value: Mitigation) -> Self
pub const fn high_entropy_aslr(self, value: Mitigation) -> Self
Sets high-entropy ASLR.
Sourcepub const fn strict_handle_checks(self, value: Mitigation) -> Self
pub const fn strict_handle_checks(self, value: Mitigation) -> Self
Sets strict invalid-handle checking.
Sourcepub const fn disable_win32k_system_calls(self, value: Mitigation) -> Self
pub const fn disable_win32k_system_calls(self, value: Mitigation) -> Self
Sets the Win32k system-call-disable mitigation.
Sourcepub const fn disable_extension_points(self, value: Mitigation) -> Self
pub const fn disable_extension_points(self, value: Mitigation) -> Self
Sets extension-point disabling.
Sourcepub const fn dynamic_code(self, value: DynamicCode) -> Self
pub const fn dynamic_code(self, value: DynamicCode) -> Self
Sets dynamic-code policy.
Sourcepub const fn control_flow_guard(self, value: ControlFlowGuard) -> Self
pub const fn control_flow_guard(self, value: ControlFlowGuard) -> Self
Sets Control Flow Guard policy.
Sourcepub const fn signed_binaries(self, value: SignedBinaries) -> Self
pub const fn signed_binaries(self, value: SignedBinaries) -> Self
Sets signed-binary loading policy.
Sourcepub const fn font_disable(self, value: FontDisable) -> Self
pub const fn font_disable(self, value: FontDisable) -> Self
Sets non-system-font policy.
Sourcepub const fn block_remote_images(self, value: Mitigation) -> Self
pub const fn block_remote_images(self, value: Mitigation) -> Self
Sets remote-image blocking.
Sourcepub const fn block_low_label_images(self, value: Mitigation) -> Self
pub const fn block_low_label_images(self, value: Mitigation) -> Self
Sets low-integrity-label image blocking.
Sourcepub const fn prefer_system32_images(self, value: Mitigation) -> Self
pub const fn prefer_system32_images(self, value: Mitigation) -> Self
Sets System32 image preference.
Sourcepub const fn loader_integrity(self, value: LoaderIntegrity) -> Self
pub const fn loader_integrity(self, value: LoaderIntegrity) -> Self
Sets loader integrity continuity.
Sourcepub const fn strict_control_flow_guard(self, value: Mitigation) -> Self
pub const fn strict_control_flow_guard(self, value: Mitigation) -> Self
Sets strict Control Flow Guard.
Sourcepub const fn module_tampering(self, value: ModuleTampering) -> Self
pub const fn module_tampering(self, value: ModuleTampering) -> Self
Sets module-tampering protection.
Sourcepub const fn restrict_indirect_branch_prediction(
self,
value: Mitigation,
) -> Self
pub const fn restrict_indirect_branch_prediction( self, value: Mitigation, ) -> Self
Sets restricted indirect branch prediction.
Sourcepub const fn allow_downgrade_dynamic_code(self, value: Mitigation) -> Self
pub const fn allow_downgrade_dynamic_code(self, value: Mitigation) -> Self
Sets permission for a broker to downgrade dynamic-code policy.
Sourcepub const fn disable_speculative_store_bypass(self, value: Mitigation) -> Self
pub const fn disable_speculative_store_bypass(self, value: Mitigation) -> Self
Sets speculative-store-bypass disabling.
Sourcepub const fn cet_user_shadow_stacks(self, value: CetShadowStacks) -> Self
pub const fn cet_user_shadow_stacks(self, value: CetShadowStacks) -> Self
Sets CET user shadow stacks.
Sourcepub const fn user_cet_context_ip_validation(
self,
value: UserCetContextIpValidation,
) -> Self
pub const fn user_cet_context_ip_validation( self, value: UserCetContextIpValidation, ) -> Self
Sets CET set-context instruction-pointer validation.
Sourcepub const fn block_non_cet_binaries(self, value: BlockNonCetBinaries) -> Self
pub const fn block_non_cet_binaries(self, value: BlockNonCetBinaries) -> Self
Sets blocking of binaries without CET metadata.
Sourcepub const fn extended_control_flow_guard(self, value: Mitigation) -> Self
pub const fn extended_control_flow_guard(self, value: Mitigation) -> Self
Sets extended Control Flow Guard.
Sourcepub const fn pointer_authentication(self, value: Mitigation) -> Self
pub const fn pointer_authentication(self, value: Mitigation) -> Self
Sets ARM64 user-mode instruction-pointer authentication.
Sourcepub const fn cet_dynamic_apis_out_of_process(self, value: Mitigation) -> Self
pub const fn cet_dynamic_apis_out_of_process(self, value: Mitigation) -> Self
Sets CET dynamic APIs to out-of-process-only mode.
Sourcepub const fn restrict_core_sharing(self, value: Mitigation) -> Self
pub const fn restrict_core_sharing(self, value: Mitigation) -> Self
Sets restricted CPU-core sharing.
Sourcepub const fn disable_fsctl_system_calls(self, value: Mitigation) -> Self
pub const fn disable_fsctl_system_calls(self, value: Mitigation) -> Self
Sets FSCTL system-call disabling.
Trait Implementations§
Source§impl Clone for MitigationPolicy
impl Clone for MitigationPolicy
Source§fn clone(&self) -> MitigationPolicy
fn clone(&self) -> MitigationPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more