1. 将msnmsgr.exe复制msnmsgr2.exe
2. 用WinDBG打开msnmsgr.exe。
3. 用bp命令设置如下断点:
bp kernel32!CreateEventA "j (poi(esp+10) != 0) 'da poi(esp+10)';'g'"
4. g命令,开始运行进程。
5. 断点会不断被hit,并打印出CreateEvent创建的Event名字。
6. 继续g,直到找到一个叫“MSNMSGR”的Event:
0:000> g
ModLoad: 75e60000 75e87000 C:\WINDOWS\system32\apphelp.dll
ModLoad: 4dc30000 4dc5e000 C:\WINDOWS\system32\msctfime.ime
ModLoad: 777b0000 77833000 C:\WINDOWS\system32\CLBCatQ.DLL
ModLoad: 77010000 770d6000 C:\WINDOWS\system32\COMRes.dll
ModLoad: 74540000 745d4000 C:\WINDOWS\system32\mlang.dll
ModLoad: 59300000 59499000 C:\Program Files\MSN Messenger\msgslang.dll
ModLoad: 5b200000 5b42c000 C:\Program Files\MSN Messenger\msgsres.dll
*** ERROR: Module load completed but symbols could not be loaded for msnmsgr.exe
004cb7cc "MSNMSGR"
eax=00000001 ebx=00000000 ecx=000015d3 edx=7ffb0000 esi=008ee290 edi=77e67a55
eip=77e58f0b esp=0006fe88 ebp=0006fec4 iopl=0 nv up ei pl zr na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
kernel32!CreateEventA:
77e58f0b 8bff mov edi,edi
7. 用db命令,打出地址附近的字节:
0:000> db 004cb7cc
004cb7cc 4d 53 4e 4d 53 47 52 00-00 00 00 00 2e 00 90 90 MSNMSGR.........
004cb7dc 2e 00 00 00 52 74 6c 4c-6f 67 4f 75 74 70 75 74 ....RtlLogOutput
004cb7ec 00 00 00 00 53 6f 66 74-77 61 72 65 5c 4d 69 63 ....Software\Mic
004cb7fc 72 6f 73 6f 66 74 5c 4d-53 4e 4d 65 73 73 65 6e rosoft\MSNMessen
004cb80c 67 65 72 00 41 70 70 53-65 74 74 69 6e 67 73 00 ger.AppSettings.
004cb81c e2 23 5c 27 47 37 d0 11-9f ea 00 aa 00 3f 86 46 .#\'G7.......?.F
004cb82c 64 c1 cf dc 38 2b d2 11-b7 ec 00 c0 4f 8f 5d 9a d...8+......O.].
004cb83c 64 00 6c 00 6c 00 00 00-00 00 00 00 04 00 00 00 d.l.l...........
8. 用UltraEditor打开msnmsgr2.exe,根据上面的字节找到文件资源中的字符串MSNMSGR。将其改为其它字符串,如MSNNSGR。保存msnmsgr2.exe
9. 运行msnmsgr2.exe打开Windows Live Messenger的第二个实例。
打印 | 张贴于 2006-08-10 18:13:00 | Tag:Misc Debuging
留言反馈
谢谢!