I recently asked a question about privileges required in Windows to read any user-mode program's memory contents. I learned from documentation linked in some of the comments:
Apparently PROCESS_VM_READ
is required but documentation doesn't seem to explain under which conditions such a trait is attributed to a process. Apparently, ACLs are involved:
When you call the OpenProcess function, the system checks the requested access rights against the DACL in the process's security descriptor. When you call the GetCurrentProcess function, the system returns a pseudohandle with the maximum access that the DACL allows to the caller
But another user asks about "C++: reading memory of another process" and receives an answer linking this github repo:
https://github.com/T-vK/Memory-Hacking-Class
Now I am just learning C++ as a beginner now, so I can look through this code but I can't say I understand it, so I apologize if the answer is obvious.
I'm guessing from what I've learned so far this code only works against processes which allow PROCESS_VM_READ
access. But if that's true, I don't understand why every game executable wouldn't just stop cheats by denying that access. There must be something to this picture that I'm missing.