-
-
[讨论]说说pc hunter等ARK扫描到的KiFastCallEntry 1字节hook
-
发表于:
2013-10-12 21:33
6392
-
[讨论]说说pc hunter等ARK扫描到的KiFastCallEntry 1字节hook
众所周知,系统调用的入口可能有int 2e或着KiFastCallEntry,前者几乎已经灭绝了,但是笔者VirtualBox里的XP就用的是int 2e,而且从MSR里读出来的MSR_EIP为零,所以A盾在有的VirtualBox里蓝屏了。
pc hunter等ARK扫描到的KiFastCallEntry 1字节hook,显示由05改为06了,
其实是第一行:
80542779 7506 jne nt!KiSystemCallExit2 (80542781)
8054277b 5a pop edx
8054277c 59 pop ecx
8054277d 9d popfd
8054277e ffe2 jmp edx
nt!KiSystemCallExit:
80542780 cf iretd
nt!KiSystemCallExit2:
80542781 f644240901 test byte ptr [esp+9],1
80542786 75f8 jne nt!KiSystemCallExit (80542780)
80542788 5a pop edx
80542789 83c404 add esp,4
8054278c 80642401fd and byte ptr [esp+1],0FDh
80542791 9d popfd
80542792 59 pop ecx
80542793 fb sti
80542794 0f35 sysexit
80542796 cf iretd
这个是我重载后的映像,看第一行的区别:
845af779 7505 jne 845af780
845af77b 5a pop edx
845af77c 59 pop ecx
845af77d 9d popfd
845af77e ffe2 jmp edx
845af780 cf iretd
845af781 f644240901 test byte ptr [esp+9],1
845af786 75f8 jne 845af780
845af788 5a pop edx
845af789 83c404 add esp,4
也就是说kernel(ntoskrnl.exe等)的映像里默认是int 2e方式,
7505 jne 845af780,用iretd返回;
再检测到CPU支持sysenter后,
会修正为7506 jne nt!KiSystemCallExit2 (80542781),
用sysexit返回。
[培训]科锐软件逆向54期预科班、正式班开始火爆招生报名啦!!!