Posted: Fri Apr 09, 2010 10:34 pm Post subject: XxProtectVirtualMemory from kernel driver to user aplication
Hi !
how are you?
I've tried calling Nt and Zw ProtectVirtualMemory from a kernel mode driver to change the protection of a page of a user mode application
I've got the Nt version by KeServiceDescriptorTable.ServiceTableBase[0x89] and the Zw version by searching for the instruction mov eax, 0x00000089; I've tried using parameters defined at driver source code and also tried mapping mdl's as userland memory; though my page protection won't change
(I don't get any blue screen but my page protection doesn't change anyway)
I've only been able to change the protection of a page by hooking the std, that way I can use it fine and set the parameters I want and then protect any page; though I wanted to "call" XxProtectVirtualMemory without any hook so later I could make a trampoline
Thanks for your time reading _________________
Love is the Way
Jesus:"Love each other as I have loved you"
finally problems solved
I was using ZwOpenProcess incorrectly so I wasn't getting the proper process handle
both methods (mdl mapping into usermode memory, and using ZwAllocateVirtualMemory to allocate near zero) worked fine for NtProtectVirtualMemory and also for ZwProtectVirtualMemory
I'll try to clean the code a bit xD _________________
Love is the Way
Jesus:"Love each other as I have loved you"
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum