获取内核当前执行模块和当前发生异常地址和线程异常Handler调用步骤

循环每个内核模块 统计模块大小 判断触发异常的地址属于那个模块。来确定模块

获取发生异常地址
nt!_EXCEPTION_RECORD
+0x000 ExceptionCode : -2139160568
+0x004 ExceptionFlags : 0x807fa938
+0x008 ExceptionRecord : 0x00010000 _EXCEPTION_RECORD
+0x00c ExceptionAddress : 0x807fa340
+0x010 NumberParameters : 0
+0x014 ExceptionInformation : [15] 0x807fa8e4
ExceptionFlags 的地址 +4 就是异常发生地址

call nt!RtlIsValidHandler (840c996a) 这里判断handler是否有效
kd> p
nt!RtlDispatchException+0x76:
840c985c 84c0 test al,al
kd> p
nt!RtlDispatchException+0x78:
840c985e 0f84f0000000 je nt!RtlDispatchException+0x16e (840c9954) 无效就会跳转。有效就不会。应该就是这里报出了异常

posted @ 2016-06-10 20:54  狂客  阅读(433)  评论(0编辑  收藏  举报