Add export for mitigation options
@@ -883,6 +883,7 @@ BOOLEAN PhInitializeMitigationPolicy(
{
#if (PHNT_VERSION >= PHNT_WIN7)
#ifndef DEBUG
+ BOOLEAN PhpIsExploitProtectionEnabled(VOID); // Forwarded from options.c (dmex)
#define DEFAULT_MITIGATION_POLICY_FLAGS \
(PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_ON | \
PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_ON | \
@@ -912,6 +913,8 @@ BOOLEAN PhInitializeMitigationPolicy(
if (WindowsVersion < WINDOWS_10_RS3)
return TRUE;
+ if (!PhpIsExploitProtectionEnabled())
+ return TRUE;
PhUnicodeStringToStringRef(&NtCurrentPeb()->ProcessParameters->CommandLine, &commandlineSr);
//if (!NT_SUCCESS(PhGetProcessCommandLine(NtCurrentProcess(), &commandline)))
