-
-
[求助]求助,得到虚拟地址PTE的一个困惑。。
-
发表于:
2010-7-23 15:33
6062
-
我的测试代码如下:
PPTE GetPteAddress( PVOID VirtualAddress )
{
PPTE pPTE = 0;
__asm
{
cli //disable interrupts
pushad
mov esi, PROCESS_PAGE_DIR_BASE
mov edx, VirtualAddress
mov eax, edx
shr eax, 22
lea eax, [esi + eax*4] //pointer to page directory entry (PDE)
test [eax], 0x80
jnz Is_Large_Page //it's a large page
mov esi, PROCESS_PAGE_TABLE_BASE
shr edx, 12
lea eax, [esi + edx*4] //pointer to page table entry (PTE)
mov pPTE, eax
jmp Done
//NOTE: There is not a page table for large pages because the PTE's are contained in the page directory.
Is_Large_Page:
mov pPTE, eax
Done:
popad
sti //reenable interrupts
}//end asm
return pPTE;
}//end GetPteAddress
0x004da000
Pte = GetPteAddress( pPage); //给个硬编码地址:0x004da000
PET得到为0xC0001386
但是dd 0xC0001386
看到该处值为00000000
这难道意味着该地址不在物理内存中?
我之前已经用了这样的代码确保不会被换出了。。。。
__asm {
mov eax, pPage // access page in case it is paged out
mov eax, [eax]
}
我在写shadowWalker
请问有经验的朋友能看出我的问题出在哪了吗??
[培训]科锐逆向工程师培训第53期2025年7月8日开班!