OllyDbg入門
基本操作
配置文件路徑:?Options->Appearance->Directories
調(diào)試設(shè)置,全打開(kāi):?Options->Debugging?options->Exceptions
加載庫(kù)文件:?Debug->Select?import?libraries
關(guān)聯(lián)右鍵菜單:?Options->Add?to?Explorer
step?into:?F7
step?over:?F8,循環(huán)和call會(huì)跳過(guò)
連續(xù)step?into,Esc可暫停:?Ctrl+F7
連續(xù)step?over,Esc可暫停:?Ctrl+F8
加斷點(diǎn):?F2
設(shè)置中斷入口點(diǎn),一般設(shè)置成winmain:?Options->Debugging?options->Event
EIP設(shè)置下一條指令:?某條指令右鍵->new?origin?here
回到上一句單步調(diào)試指令:?-
回到當(dāng)前EIP:?點(diǎn)圖標(biāo)C,或者雙擊EIP
執(zhí)行到ret:?Ctrl+F9
從其他DLL跳回來(lái):?Alt+F9
暫停:?F12
重新載入:?Ctrl+F2
運(yùn)行:?F9
查看斷點(diǎn):?Alt+B
斷點(diǎn)界面,設(shè)置斷點(diǎn)可用:?空格
斷點(diǎn)設(shè)置在程序外,關(guān)閉時(shí)會(huì)警告,關(guān)閉警告:?Options->Debugging?options->security->warn?when?breakpoint?is?outside?the?code?section
調(diào)試方法
定位關(guān)鍵代碼,獲取文本框字符的函數(shù)有
|16位|32位(ANSI)|32位(Unicode)|
|--|--|--|
|GetDlgItemText|GetDlgItemTextA|GetDlgItemTextW|
|GetWindowText|GetWindowTextA|GetWindowTextW|
Ctrl+G打開(kāi)表達(dá)式窗口,跳到對(duì)應(yīng)方法,在函數(shù)入口點(diǎn)加斷點(diǎn)。另一種查詢函數(shù)的方法是使用Ctrl+N,會(huì)打開(kāi)所有調(diào)用的函數(shù),直接輸入搜索的函數(shù)名,找到后回車可以看到在哪里調(diào)用了。
加了斷點(diǎn)后就跟蹤分析每個(gè)指令的含義。