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

Added module pinning capability #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

estr3llas
Copy link

https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulehandleexw

By using GetModuleHandleExW with GET_MODULE_HANDLE_EX_FLAG_PIN parameter, we prevent any unexpected unload on our module.
This can prevent malware from unloading foreign modules within its own address space.

Also, on estr3llas@b5fdc2a there is a little improvement on the function's implementation, so we do not have to assign c1 and c2 a new value every iteration.

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

Successfully merging this pull request may close these issues.

1 participant