diff options
| author | Adam Shapiro <[email protected]> | 2016-02-29 14:11:37 -0800 |
|---|---|---|
| committer | Adam Shapiro <[email protected]> | 2016-02-29 14:11:37 -0800 |
| commit | 6e1115d6af3c22b693eccc472ebb0d53a1905cd9 (patch) | |
| tree | 2cea756b80b4696c298feb70f36235d95fc4cce6 /network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp | |
| parent | 3c8ac8624f815e66b370ef412bbf13cbd2c732e2 (diff) | |
Revised Version of WFP Sampler
Revised WFP Sampler
Diffstat (limited to 'network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp')
| -rw-r--r-- | network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp index 3a2a7785..f2782ce7 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp @@ -118,10 +118,17 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer, if(MmGetMdlByteCount(pMDL) >= mdlOffset + bytesToCopy) { - BYTE* pSystemAddress = 0; + BYTE* pSystemAddress = 0; + UINT32 noExecute = 0; + +#if(NTDDI_VERSION >= NTDDI_WIN8) + + noExecute = MdlMappingNoExecute; + +#endif /// (NTDDI_VERSION >= NTDDI_WIN8) pSystemAddress = (BYTE*)MmGetSystemAddressForMdlSafe(pMDL, - LowPagePriority); + LowPagePriority | noExecute); if(pSystemAddress) { RtlCopyMemory(pSystemAddress + mdlOffset, |
