首页
社区
课程
招聘
[讨论]说说pc hunter等ARK扫描到的KiFastCallEntry 1字节hook
发表于: 2013-10-12 21:33 6393

[讨论]说说pc hunter等ARK扫描到的KiFastCallEntry 1字节hook

2013-10-12 21:33
6393
众所周知,系统调用的入口可能有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返回。

[培训]传播安全知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 0
支持
分享
最新回复 (3)
雪    币: 155
活跃值: (20)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
KiEnableFastSyscallReturn

KiDisableFastSyscallReturn

KiRestoreFastSyscallReturnState
2013-10-13 10:49
0
雪    币: 53
活跃值: (12)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
学习楼主的精神.
2013-10-18 10:54
0
雪    币: 36
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
本文该顶。
不过似乎似乎恢复了这个所谓的inline hook对系统也没什么影响。
2013-10-20 18:41
0
游客
登录 | 注册 方可回帖
返回