【文章标题】: [破]CrackMe.ArturDents.Delphi.#3
【文章作者】: HappyTown
【作者邮箱】: [email]wxr277@163.com[/email]
【作者主页】: www.pediy.com
【软件名称】: AD_CM#3.exe
【软件大小】: 195KB
【下载地址】: 附件内
【加壳方式】: PEtite 2.x [Level 1/9] -> Ian Luck
【保护方式】: SN
【编写语言】: Delphi
【使用工具】: OD,DeDe,Calc
【破解难度】: 0/10
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------
【详细过程】
一、基本信息
1. PEiD查看为PEtite 2.x [Level 1/9] -> Ian Luck壳,用PEiD自带的Generic Unpacker插件轻松脱壳;
2. 用ResScope查看得知Verify字符串对应的OnClick事件对应的控件为Button1Click;
3. 用DeDe查看得到TForm1的Button1Click地址为00458160;
4. 用DeDe导出map文件。
二、详细分析
1. OD载入程序,Loadmap刚才生成的map文件;
2. 下断点bp 458160;
3. 输入试炼码:
Name:happy
Serial:7654321
00458160 >push ebp ; <-TForm1@Button1Click
00458161 mov ebp, esp
00458163 xor ecx, ecx
00458165 push ecx
00458166 push ecx
00458167 push ecx
00458168 push ecx
00458169 push ecx
0045816A push ecx
0045816B push ecx
0045816C push ebx
0045816D push esi
0045816E push edi
0045816F mov edi, eax
00458171 xor eax, eax
00458173 push ebp
00458174 push <->system.@HandleFinally;>
00458179 push dword ptr fs:[eax]
0045817C mov fs:[eax], esp
0045817F lea edx, [ebp-4]
00458182 mov eax, [edi+2D8]
00458188 >call 0042408C ; ->controls.TControl.GetText(TControl):TCaption;
0045818D lea edx, [ebp-10]
00458190 mov eax, [edi+2D8]
00458196 >call 0042408C ; ->controls.TControl.GetText(TControl):TCaption;
0045819B cmp dword ptr [ebp-10], 0 ; name不能为空
0045819F jnz short 004581AB
004581A1 mov eax, 00458288 ; ASCII "Enter you name, pls."
004581A6 >call 004442E4 ; ->dialogs.ShowMessage(AnsiString);
004581AB lea edx, [ebp-14]
004581AE mov eax, [edi+2DC]
004581B4 >call 0042408C ; ->controls.TControl.GetText(TControl):TCaption;
004581B9 cmp dword ptr [ebp-14], 0 ; sn不能为空
004581BD jnz short 004581C9
004581BF mov eax, 004582A8 ; ASCII "Enter the serial, pls."
004581C4 >call 004442E4 ; ->dialogs.ShowMessage(AnsiString);
004581C9 mov eax, [ebp-4]
004581CC >call 00403B7C ; ->system.@LStrLen:Integer;<+>
004581D1 mov ebx, eax ; nameLen
004581D3 test ebx, ebx
004581D5 jle short 00458204
004581D7 mov esi, 1
004581DC /mov eax, [ebp-4] ; name
004581DF |movzx eax, byte ptr [eax+esi-1] ; name[i]=68(h);61(a)....
004581E4 |mov ecx, 3
004581E9 |xor edx, edx
004581EB |div ecx ; 68/3=22+2;20+1;....
004581ED |lea edx, [ebp-18]
004581F0 >|call 00407B04 ; ->sysutils.IntToStr(Integer):AnsiString;overload;
004581F5 |mov edx, [ebp-18] ; 34(十进制)=22(hex),32=20(hex)....
004581F8 |lea eax, [ebp-8]
004581FB >|call 00403B84 ; ->system.@LStrCat;
00458200 |inc esi
00458201 |dec ebx
00458202 \jnz short 004581DC
00458204 lea eax, [ebp-C]
00458207 mov ecx, [ebp-8] ; 3432373740
0045820A mov edx, 004582C8 ; ASCII "ADCM3-"
0045820F >call 00403BC8 ; ->system.@LStrCat3;
00458214 lea edx, [ebp-1C]
00458217 mov eax, [edi+2DC]
0045821D >call 0042408C ; ->controls.TControl.GetText(TControl):TCaption;
00458222 mov edx, [ebp-1C] ; sn
00458225 mov eax, [ebp-C] ; 真注册码:ADCM3-3432373740
00458228 >call 00403C8C ; ->system.@LStrCmp;
0045822D jnz short 00458239
0045822F mov eax, 004582D8 ; ASCII "Well done Cracker, You did it!"
00458234 >call 004442E4 ; ->dialogs.ShowMessage(AnsiString);
4. 注册算法很简单:
(1)循环取name[i]/3,转换为十进制字符串,级联为sn_2;
(2)sn_1 = "ADCM3-";
(3)Serial = sn_1 + sn_2;
5. 注册机代码(VB):
Private Sub cmdGenKey_Click()
Dim strName As String
Dim iNameLen As Integer
Dim strSerial As String
Dim i As Integer
Dim nTemp As Integer
strName = txtName.Text '取得name
iNameLen = Len(strName)
strSerial = "ADCM3-"
For i = 1 To iNameLen
nTemp = Int(Asc(Mid(strName, i, 1)) / 3)
strSerial = strSerial + CStr(nTemp)
Next i
txtSerial.Text = strSerial
End Sub
给出另一组可用注册码:
Name:happytown
Serial:ADCM3-343237374038373936
--------------------------------------------------------------------------------
【经验总结】
这个CrackMe正如原作者所述"for cracking newbiez",所以比较适合入门者。
还有一点就是,如果你对相关工具的使用方法若不是很熟悉,推荐看看kanxue的《加密与解密II》中的相关部分,保你收获不小。
--------------------------------------------------------------------------------
【版权声明】: 本文原创于看雪技术论坛, 转载请注明作者并保持文章的完整, 谢谢!
2006年11月07日 21:58:19
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
上传的附件: