Vrtule wrote:In case that the target region inside ntdll.dll is under copy-on-write, you change the region in all processes sharing the same copy of that region. This behavior is usually not desired. So, are you aware of this? NtProtectVirtualMemory should do the job.
That is exactly the behavior I desire here. :) I want to change ntdll for all processes, and the strange thing is that the code worked perfectly fine in Windows 8.1. But now in Windows 10, any attempt to write to ntdll memory, even after disabling the WP bit, seems to make my code crash. I will try using NtProtectVirtualMemory and see if that does the job.