I understand that the VirtualProtect
function changes the permissions on a page in memory without question. Surely this ends up with no immediate purpose when any running process is able to use it?
For example, someone could easily write a piece of malware which uses the VirtualProtectEx
function in order to detour instructions and cause havoc. On the other hand, a user may have a legitimate reason for allowing a process to modify memory (ie. game cheats).
VirtualProtect
tries to stop. – Shavon