【文章标题】: 一个需用run跟踪的CrackMe的破解
【文章作者】: bxm
【作者邮箱】:
bxm78@163.com
【保护方式】: name,serial
【编写语言】: Borland C++
【使用工具】: peid,od
【操作平台】: winxp
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------
【详细过程】
用peid查壳,无壳,运行,输入name与serial,无任何提示,用OD载入,查找字符串,无有用信息,下getwindowtexta和getdlgitemtexta断不下来,下消息断点好象也不行,只好用RUN跟踪了,最后确定在[0040160A]下普通断点,详细分析如下:
0040160A |. 8D45 D4 lea eax, [ebp-2C]
0040160D |. 8D55 EC lea edx, [ebp-14]
00401610 |. E8 C3E10000 call 0040F7D8 ; 此Call 1功能:检查serial的前3位,若为字符串“CA-”,则置AL为1,否则置0
00401615 |. 50 push eax ; /Arg1
00401616 |. FF4D 9C dec dword ptr [ebp-64] ; |
00401619 |. 8D45 D4 lea eax, [ebp-2C] ; |
0040161C |. BA 02000000 mov edx, 2 ; |
00401621 |. E8 D2E00000 call 0040F6F8 ; Crackme-.0040F6F8
00401626 |. 59 pop ecx
00401627 |. 84C9 test cl, cl ; CL中值,就是上面CALL 1中返回值AL
00401629 0F84 26030000 je 00401955 ; 不相等,完蛋
0040162F |. 66:C745 90 98>mov word ptr [ebp-70], 98
00401635 |. 8D45 D0 lea eax, [ebp-30]
00401638 |. E8 BB030000 call 004019F8
0040163D |. 50 push eax
0040163E |. FF45 9C inc dword ptr [ebp-64]
00401641 |. 8D45 F8 lea eax, [ebp-8]
00401644 |. E8 09E30000 call 0040F952
00401649 |. 8BD0 mov edx, eax ; |
0040164B |. 83C2 FC add edx, -4 ; |
0040164E |. 8D45 F8 lea eax, [ebp-8] ; |
00401651 |. B9 05000000 mov ecx, 5 ; |
00401656 |. E8 18EB0000 call 00410173 ; Crackme-.00410173
0040165B |. 8D45 D0 lea eax, [ebp-30]
0040165E |. 8D55 E8 lea edx, [ebp-18]
00401661 |. E8 72E10000 call 0040F7D8 ; 此Call 2功能:检查serial的后5位,若为字符串“-3914”,则置AL为1,否则置0
00401666 |. 50 push eax ; /Arg1
00401667 |. FF4D 9C dec dword ptr [ebp-64] ; |
0040166A |. 8D45 D0 lea eax, [ebp-30] ; |
0040166D |. BA 02000000 mov edx, 2 ; |
00401672 |. E8 81E00000 call 0040F6F8 ; Crackme-.0040F6F8
00401677 |. 59 pop ecx
00401678 |. 84C9 test cl, cl ; CL中值,就是上面CALL 2中返回值AL
0040167A 0F84 D5020000 je 00401955 ; 不相等,完蛋
00401680 |. 33C0 xor eax, eax
00401682 |. 8985 74FFFFFF mov [ebp-8C], eax
00401688 |. 66:C745 90 14>mov word ptr [ebp-70], 14
0040168E |. 33D2 xor edx, edx
00401690 |. 8995 70FFFFFF mov [ebp-90], edx ; [ebp-90]清0
00401696 |. EB 1E jmp short 004016B6
00401698 |> 8D45 FC /lea eax, [ebp-4]
0040169B |. E8 88030000 |call 00401A28 ; EAX中返回name
004016A0 |. 8B95 70FFFFFF |mov
来源:网络转载 [hr]