ii>enviroment:
windows2003sp2;syser debugger;masm32v9.
iii>method:
1.asm code:
Code: Select all
sgdt gdtr ;this ins can be run in ring3
lea eax,gdtr
mov eax,[eax+2] ;eax<--->GDT baseaddress<---->8003f000
add eax,48h ;in my computer 48h is reserved
mov esi,eax
lea edi,bakgdt
movsd
movsd
1>segement protection:
stage1:es=23h;RPL=3;TI=0[GDT];Index=4;
stage2:GDTR=8003f000;PA=3f000;GDT[4](3f020h---3f028h)=00cff3000000ffff;
base=0;G=1&D=1&E=0&ED=0&R/W=1--->code32 readable.
--
DPL=3;NO NEED TO CHANGE.
2>page protection:
LA=8003f048;cr3=39000
stage1:page directory table.peekd 39800--->3b163
U/S=0;---->NEED CHANGE--->poked 39800 3b167.
stage2:page table.peekd 3b0fc--->3f163.
NEED CHANGE--->poked 3b0fc 3f167...
---------------------
iv>question:
All done then why i got a ACESS_VOLIDATION error???
----------
thx in advance...
regs from kybyw