Hello. Im tryin to do something which seems very simple from usermode but in kernel something goes wrong. So i read about ZwQueryInformationProcess which would be helpful in that case, prepared parameters and voila. But the problem is that the (im running under usermode debugger so i can confirm the steps live) DbgPrint("Peb adres %X\n", pbi.PebBaseAddress); return 7EFDF000 (which is wrong and desnt fit to the PEB structure), while usermode fs:[30] gives the good result, 7EFDE000 - 0x1000 address more. Why is that?
Hi,
WOW64 processes have 2 PEBs, one is a 64-bit PEB which you're getting the address of and the other is the 32-bit PEB. Since you want the 32-bit PEB you'll want to use ZwQueryInformationProcess(hProcess, ProcessWow64Information, ...);