簡略的閱讀了插件頭文件plugin和插件例子Bookmark之後,不支持舊版插件的原因如下:
一.OllyDbg 2.01版僅支持UNICODE編譯的插件.
以vc++ 6.0為例,在工程-設置-C/C++窗口預處理程序定義中刪除_MBCS,並且添加上UNICODE和_UNICODE,否則編譯過程中會出現如下錯誤:
"This version must be compiled with UNICODE on"
二.Plugin輸出接口的改變.
開發過OD插件的朋友都知道,在OD舊版插件中我們必須導出一下幾個函數:
.rdata:10033213 a_odbg_pausedex db '_ODBG_Pausedex',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:10033222 a_odbg_pluginac db '_ODBG_Pluginaction',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:10033235 a_odbg_plugincl db '_ODBG_Pluginclose',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:10033247 a_odbg_plugincm db '_ODBG_Plugincmd',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:10033257 a_odbg_pluginda db '_ODBG_Plugindata',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:10033268 a_odbg_pluginde db '_ODBG_Plugindestroy',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:1003327C a_odbg_pluginin db '_ODBG_Plugininit',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:1003328D a_odbg_pluginma db '_ODBG_Pluginmainloop',0
.rdata:1003328D ; DATA XREF: .rdata:off_1003319Co
.rdata:100332A2 a_odbg_pluginme db '_ODBG_Pluginmenu',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:100332B3 a_odbg_pluginre db '_ODBG_Pluginreset',0 ; DATA XREF: .rdata:off_1003319Co
.rdata:100332C5 a_odbg_pluginsh db '_ODBG_Pluginshortcut',0
直接修改前綴_ODBG到_ODBG2字節數增加,原本空間不夠,不過還是還是有修改的辦法,修改輸出函數名得偏移量,增大空間使得夠字節修改這些函數名.
這兩個原因是新版OD不支持舊版插件的主要原因,當然還有其他,比如插件版本號升級到"2.00.00" 等等,這個還需要你進行發掘.