Another POC

After you map with kdmapper just free all mapped memory.
use (MmFreePagesFromMdl and FreePool) 
and you will only have one page allocated

in this method i am using .data ptr to communicate (NtUserGetObjectInformation) (
but you can use any kind of communication

Visual studio project

Properties-> C/C++ -> Optimization

Full program optimization (Yes (/GL))

Properties-> C/C++ -> Code generation:

Security Check (Disable Security Check (/GS-))
Control flow protection (No)


View Github