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

a question please #27

Closed
matrixhax opened this issue Aug 1, 2022 · 3 comments
Closed

a question please #27

matrixhax opened this issue Aug 1, 2022 · 3 comments
Labels
not an issue question Further information is requested

Comments

@matrixhax
Copy link

hello friends
and thank you for your hard works

i have a questions please
i compiled a driver using examples from this repo
i want to use ZwProtectVirtualMemory
but as described only ntoskrnl symbols was resolved

so i tried to find its address and direct use it
using MmGetSystemRoutineAddress
but i will get BSOD KMOD_UNHANDLED_ECECPTION
isnt this code should work ? as i only used ntoskrnl symbols to locate function in kernel and use it

and if not
is there any better way to solve ?
i want to change protection of user mod process
and __try __except those are not usefull in maped driver ?

@hfiref0x
Copy link
Owner

hfiref0x commented Aug 1, 2022

ZwProtectVirtualMemory is in an exports on ntoskrnl win10.

@hfiref0x
Copy link
Owner

hfiref0x commented Aug 1, 2022

For ancient system locate pointer to NtProtectVirtualMemory from SSDT and then call it, don't forget to patch previous mode to be KernelMode. MmGetSystemRoutineAddress will not find it as it is not exported by ntoskrnl on older Windows versions.

I'm closing this issue as it has nothing to do with this project.

@hfiref0x hfiref0x closed this as completed Aug 1, 2022
@matrixhax
Copy link
Author

thank you for your reply
but didnt answer my other question
can i use __try __except ?
and why ZwProtectVirtualMemory give BSOD ?
i thogut it from ntdll

@hfiref0x hfiref0x added question Further information is requested not an issue labels Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not an issue question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants