-
-
求助]此代码如何更改GDT和IDT的?
-
发表于: 2009-10-1 15:48 3682
-
只知道修改了其中的项,但是不知道具体修改的项有什么用。反正INT 3的功能是不正常了。
请高手指点下
请高手指点下
.text:00401000 90 nop .text:00401001 90 nop .text:00401002 90 nop .text:00401003 90 nop .text:00401004 9C pushf .text:00401005 60 pusha .text:00401006 52 push edx ; 此代码通过NtSetSystemInformation(0x38)加载, ..text:00401007 0F 01 44 24 FE sgdt fword ptr [esp-2] .text:0040100C 5A pop edx .text:0040100D 8B C2 mov eax, edx .text:0040100F B9 E8 03 00 00 mov ecx, 3E8h ; gdt中第125个项 .text:00401014 81 7C 01 04 00 9A CF 00 cmp dword ptr [ecx+eax+4], 0CF9A00h ; 是否已经修改过 .text:0040101C 74 12 jz short loc_401030 .text:0040101E C6 00 C3 mov byte ptr [eax], 0C3h .text:00401021 C7 04 01 FF FF 00 00 mov dword ptr [ecx+eax], 0FFFFh ; 更改第125项中的内容 .text:00401028 C7 44 01 04 00 9A CF 00 mov dword ptr [ecx+eax+4], 0CF9A00h .text:00401030 .text:00401030 loc_401030: ; CODE XREF: start+1Cj .text:00401030 52 push edx .text:00401031 0F 01 4C 24 FE sidt fword ptr [esp-2] .text:00401036 5A pop edx .text:00401037 83 C2 18 add edx, 18h .text:0040103A 81 7A 02 E8 03 00 EE cmp dword ptr [edx+2], 0EE0003E8h .text:00401041 74 11 jz short loc_401054 .text:00401043 C7 42 02 E8 03 00 EE mov dword ptr [edx+2], 0EE0003E8h .text:0040104A 66 89 02 mov [edx], ax .text:0040104D C1 E8 10 shr eax, 10h .text:00401050 66 89 42 06 mov [edx+6], ax .text:00401054 .text:00401054 loc_401054: ; CODE XREF: start+41j .text:00401054 61 popa .text:00401055 9D popf .text:00401056 33 C0 xor eax, eax .text:00401058 C2 08 00 retn 8
赞赏
看原图
赞赏
雪币:
留言: