>>106784658
>Calling NtAllocateVirtualMemory with an address between 1 and 4095 will give you allocated memory in the 0 page and allow you to freely dereference null pointers
let mut base = 1_usize;
let mut size = 4096_usize;
let ret = unsafe {
NtAllocateVirtualMemory(
NtCurrentProcess,
&mut base as *mut usize as *mut _,
0,
&mut size as *mut _,
0x00001000, // MEM_COMMIT
0x40, // PAGE_EXECUTE_READWRITE
)
};
Getting 0xC0000018 STATUS_CONFLICTING_ADDRESSES on Windows 11. Maybe it's already allocated with NO_ACCESS and has to be deallocated first?