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

Memory write watch anti-debug #101

Merged
merged 2 commits into from
Jan 26, 2018
Merged

Conversation

gsuberland
Copy link
Collaborator

Using VirtualAlloc's MEM_WRITE_WATCH and associated APIs to look for hooks and debuggers.

Writeup here:

https://codeinsecurity.wordpress.com/2018/01/24/anti-debug-with-virtualallocs-write-watch/

Detects external memory accesses by debuggers and hooks using the
MEM_WRITE_WATCH feature of VirtualAlloc, using 4 different approaches.
@gsuberland
Copy link
Collaborator Author

I'm aware that this isn't the best right now. I need to improve this at a later date, checking against better APIs and more of them, and using ResetWriteWatch instead of page access count deltas. For now this will suffice as a baseline.

@ayoubfaouzi ayoubfaouzi merged commit 859651e into ayoubfaouzi:master Jan 26, 2018
@ayoubfaouzi
Copy link
Owner

I'm aware that this isn't the best right now. I need to improve this at a later date, checking against better APIs and more of them, and using ResetWriteWatch instead of page access count deltas. For now this will suffice as a baseline.

Make sense to me as well.

A new trick! thanks a lot again for your contribution, I never seen this one before, thank you so much for your blog article.

@gsuberland
Copy link
Collaborator Author

No probs. Yeah, I thought of this in the shower haha!

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.

2 participants