【下載】OllyDbg



贊助商連結


FYI
2007-04-15, 10:43 AM
OllyDbg (http://www.ollydbg.de/)

OllyDbg is a 32-bit assembler level analysing debugger for Microsoft® Windows®. Emphasis on binary code analysis makes it particularly useful in cases where source is unavailable. OllyDbg is a shareware, but you can download (http://www.ollydbg.de/download.htm) and use it for free.
OllyDbg 是一套功能強大的反組譯除錯工具, OllyDbg 雖然是共享軟件, 不過作者並未在功能上做任何限制, 小弟通常以OllyDbg 修改一些小程式, 簡單使用方法如下, 小弟謹以修改 "com2tcp.exe (http://sourceforge.net/project/showfiles.php?group_id=129551)" 為例, "com2tcp.exe" v1.2.0.0 會將序列埠的速率(BAUD)固定為19200, 修改的目的在於解除此限制

com2tcp - baud rate (http://sourceforge.net/forum/forum.php?thread_id=1571345&forum_id=440108)

Comment in com2tcp.cpp lines 544-547:

dcb.BaudRate = CBR_19200;
dcb.ByteSize = 8;
dcb.Parity = NOPARITY;
dcb.StopBits = ONESTOPBIT;
1. 執行OllyDbg
2. 點選View -> Text file, 開啟 "com2tcp.cpp", 找到第544 行, 再往回找可供參考的字串, 例如TraceLastError("OpenC0C(): CreateFile(\"%s\")", pPath);
3. 點選File -> Open, 開啟 "com2tcp.exe"
4. 於CPU 視窗, 右鍵 -> Search for -> All referenced text strings
5. 此時會開啟Text strings 視窗, 接著找到ASCII "OpenC0C(): CreateFile("%s")", 雙擊之
6. 此時會跳回CPU 主視窗, 再往下找到 "4B00(=19200)", 這就是要修改的地方, 記下程式碼
7. 點選View -> File, 開啟 "com2tcp.exe"
8. 於File 視窗, 右鍵 -> Search for -> Binary string
9. 於Hex 輸入十六進位程式碼 "C7 44 24 2C 00 4B 00 00", 按OK
10. 右鍵 -> Binary -> Edit, 輸入8 個 "90(=nop)", 按OK
11. 關閉File 以外的視窗以避免修改偵錯中的 "com2tcp.exe"
12. 於File 視窗, 右鍵 -> Save file