Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why doesn't WriteProcessMemory change the memory permissions for us #3

Open
herrcore opened this issue Feb 10, 2022 · 1 comment
Open

Comments

@herrcore
Copy link
Member

def write(hProcess, lpAddress, lpBuffer):

According to the oldnewthing blog WriteProcessMemory should automatically change the memory permissions so we can write to it without us having to manually change them.

This fails when we test it so we have to wrap write memory ourselves ... why??

@herrcore
Copy link
Member Author

Possible explanation is that the permissions are only changed if the page doesn't have WRITE access already ... this could lead to situations where the page has write but is unwritable for other reasons so the call will still fail unless the permissions are adjusted manually.

https://www.unknowncheats.me/forum/c-and-c-/194439-writeprocessmemory.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant