Oops! The lab …

» Currently browsing: Debug and Anti-Debug


Bloody BSOD & How to get information from dump file?

April 15th, 2007 at 2:29 am » Comments (26)

BSOD …
BSOD again …
My poor filter driver! 
 I don’t know why it fails because it is almost the same as the sample from MS . (I comment all of my own code)
I have to debug it. Fortunately, I have VM …
1. Right click “My computer”, Properties->Advanced->”Startup and Recovery”->”Settings”, set the dump type and path.
2. Load my driver […]



How to debug code under VM using SoftIce

March 27th, 2007 at 5:10 pm » Comments (60)

Softice is one of the best debugging tools. But unfortunately, skype is not compatible with it.
(Damned Skype!!!) So the best way to use softice is in the VM.
Usage:
1. Modify VMWare’s configuration file. ( *.vxm ) Add two lines:
vmmouse.present = “FALSE”
svga.maxFullscreenRefreshTick = “5″
2. Create a same directory like your host machine where is your source code in, and place your […]



FW: API-HOOK and ANTI-API-HOOK For Ring3

March 22nd, 2007 at 2:57 am » Comments (35)

<<API-HOOK and ANTI-API-HOOK For Ring3>>
转载请保留版权.谢谢
Anskya@Gmail.com
今天突然看到”堕落天才”仁兄的两篇文章
感谢他的的文章和共享精神.谢谢…突然手痒..有感而发
API-HOOK和ANTI-API-HOOK已经不算什么新鲜的技术了
一般大概用的技术都差不多
[1]简要介绍API-HOOK
1.IAT补丁
介绍:
一般调用函数都是call [MessageBoxA]这样的格式
很明显[MessageBoxA]下的地址就是函数的真正的地址 代码:——————————————————————————–
Delphi:
push 0
push 0
push 0
push 0
call -$000467cd(这里是MessageBox在导入表的偏移)
——————————————————————————– -$000467cd下的代码就是:
jmp dword ptr [$004514b0]
004514b0下的地址是—77D504EA(刚好就是MessageBoxA的地址)
IAT补丁的意思就是修改jmp dword ptr [$004514b0]这句为自己的钩子地址
然后钩子返回的时候返回77D504EA地址
(这里用Delphi的Debug是因为顺手.还有一点就是..VC看不到栈值) 优点:简单…
缺点:如果是动态调用的函数导入表中是不会出现这种函数的
所以就出现了下面的技术2.内存补丁:
介绍:
由于IAT的缺点于是牛们就想到了动态修改DLL函数的内存
还是以MessageBoxA为例子: