【破文标题】crackme
【破文作者】tianxj
【作者邮箱】tianxj_2007@126.com
【作者主页】www.chinapyg.com
【破解工具】PEiD,OD
【破解平台】Windows XP
【软件名称】crackme
【原版下载】自己搜索一下
【保护方式】注册码
【软件简介】中国共享天空破解教程,一个简单的没有提示的crackme,由wynney大侠爆破的
【破解声明】我是一只小菜鸟,偶得一点心得,愿与大家分享:)
初学Crack,只是感兴趣,没有其它目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------
【破解内容】
--------------------------------------------------------------
**************************************************************
一、运行程序,进行注册,输入错误的注册信息进行检测,无提示信息
**************************************************************
二、用PEiD对这个软件查壳,为 Microsoft Visual C++ 6.0
**************************************************************
三、运行OD,打开crackme,右键—超级字串参考—查找ASCII.
发现"good job! - cracked!"
00401232 . 50 PUSH EAX ; |hWnd => 0008067E ('[v0!d] Crackme - v0.01',class='#32770')
00401233 . FFD6 CALL ESI ; \GetDlgItemTextA
00401235 . 8B0D 28694000 MOV ECX,DWORD PTR DS:[406928]
0040123B . 68 FF000000 PUSH 0FF ; /Count = FF (255.)
00401240 . 68 306A4000 PUSH crackme.00406A30 ; |Buffer = crackme.00406A30
00401245 . 68 EA030000 PUSH 3EA ; |ControlID = 3EA (1002.)
0040124A . 51 PUSH ECX ; |hWnd => 0008067E ('[v0!d] Crackme - v0.01',class='#32770')
0040124B . FFD6 CALL ESI ; \GetDlgItemTextA
0040124D . 68 306A4000 PUSH crackme.00406A30 ; //注册码
00401252 . 68 30694000 PUSH crackme.00406930 ; //用户名
00401257 . E8 A4FDFFFF CALL crackme.00401000 ; //关键CALL
0040125C . 83C4 08 ADD ESP,8
0040125F . 83F8 01 CMP EAX,1
00401262 . A3 646C4000 MOV DWORD PTR DS:[406C64],EAX
00401267 . 75 65 JNZ SHORT crackme.004012CE ; //关键跳转
00401269 . 8B15 28694000 MOV EDX,DWORD PTR DS:[406928]
0040126F . 6A 40 PUSH 40 ; /Style = MB_OK|MB_ICONASTERISK|MB_APPLMODAL
00401271 . 68 80604000 PUSH crackme.00406080 ; |good job! - cracked!
00401276 . 68 50604000 PUSH crackme.00406050 ; |send your solution to : v0id2k1@hotmail.com
0040127B . 52 PUSH EDX ; |hOwner => 0008067E ('[v0!d] Crackme - v0.01',class='#32770')
0040127C . FF15 C4504000 CALL DWORD PTR DS:[<&USER32.MessageBoxA>>; \MessageBoxA
00401282 . B8 01000000 MOV EAX,1
00401287 . 5E POP ESI
00401288 . C2 1000 RETN 10
0040128B > 68 38604000 PUSH crackme.00406038 ; /enter registration info; Case 3E8 of switch 00401208
00401290 . 6A 00 PUSH 0 ; |Class = 0
00401292 . FF15 BC504000 CALL DWORD PTR DS:[<&USER32.FindWindowA>>; \FindWindowA
00401298 . 85C0 TEST EAX,EAX
0040129A . A3 2C694000 MOV DWORD PTR DS:[40692C],EAX
0040129F . 74 2D JE SHORT crackme.004012CE
004012A1 . 8B35 CC504000 MOV ESI,DWORD PTR DS:[<&USER32.SendDlgIt>; USER32.SendDlgItemMessageA
004012A7 . 68 30694000 PUSH crackme.00406930 ; /lParam = 406930
004012AC . 6A 00 PUSH 0 ; |wParam = 0
004012AE . 6A 0C PUSH 0C ; |Message = WM_SETTEXT
004012B0 . 68 8B040000 PUSH 48B ; |ControlID = 48B (1163.)
004012B5 . 50 PUSH EAX ; |hWnd
004012B6 . FFD6 CALL ESI ; \SendDlgItemMessageA
004012B8 . A1 2C694000 MOV EAX,DWORD PTR DS:[40692C]
004012BD . 68 306B4000 PUSH crackme.00406B30 ; /lParam = 406B30
004012C2 . 6A 00 PUSH 0 ; |wParam = 0
004012C4 . 6A 0C PUSH 0C ; |Message = WM_SETTEXT
004012C6 . 68 8C040000 PUSH 48C ; |ControlID = 48C (1164.)
004012CB . 50 PUSH EAX ; |hWnd => NULL
004012CC . FFD6 CALL ESI ; \SendDlgItemMessageA
004012CE > B8 01000000 MOV EAX,1 ; Default case of switch 00401208
004012D3 . 5E POP ESI
004012D4 . C2 1000 RETN 10
==============================================================
00401000 /$ 53 PUSH EBX
00401001 |. 8B5C24 0C MOV EBX,DWORD PTR SS:[ESP+C] ; //EBX=[ESP+C]=注册码
00401005 |. 55 PUSH EBP
00401006 |. 56 PUSH ESI
00401007 |. 8B7424 10 MOV ESI,DWORD PTR SS:[ESP+10] ; //ESI=[ESP+10]=用户名
0040100B |. 8A0B MOV CL,BYTE PTR DS:[EBX]
0040100D |. 33ED XOR EBP,EBP
0040100F |. 57 PUSH EDI
00401010 |. 8A06 MOV AL,BYTE PTR DS:[ESI]
00401012 |. 3AC1 CMP AL,CL ; //比较用户名第1个字符与注册码第1个字符ASC值
00401014 |. 0F85 69010000 JNZ crackme.00401183 ; //不相等则跳,跳则失败
0040101A |. 8BFE MOV EDI,ESI
0040101C |. 83C9 FF OR ECX,FFFFFFFF
0040101F |. 33C0 XOR EAX,EAX
00401021 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00401023 |. F7D1 NOT ECX
00401025 |. 49 DEC ECX
00401026 |. 83F9 05 CMP ECX,5
00401029 |. 0F82 54010000 JB crackme.00401183 ; //用户名长度小于5h则跳,跳则失败
0040102F |. 807B 01 2D CMP BYTE PTR DS:[EBX+1],2D ; //用户名第2个字符与2Dh,即"-"比较
00401033 |. 0F85 4A010000 JNZ crackme.00401183 ; //不相等则跳,跳则失败
00401039 |. 8BFE MOV EDI,ESI
0040103B |. 83C9 FF OR ECX,FFFFFFFF
0040103E |. 33C0 XOR EAX,EAX
00401040 |. 33D2 XOR EDX,EDX
00401042 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00401044 |. F7D1 NOT ECX
00401046 |. 49 DEC ECX
00401047 |. 74 17 JE SHORT crackme.00401060
00401049 |> 0FBE0C32 /MOVSX ECX,BYTE PTR DS:[EDX+ESI]
0040104D |. 03E9 |ADD EBP,ECX
0040104F |. 8BFE |MOV EDI,ESI
00401051 |. 83C9 FF |OR ECX,FFFFFFFF
00401054 |. 33C0 |XOR EAX,EAX
00401056 |. 42 |INC EDX
00401057 |. F2:AE |REPNE SCAS BYTE PTR ES:[EDI]
00401059 |. F7D1 |NOT ECX
0040105B |. 49 |DEC ECX
0040105C |. 3BD1 |CMP EDX,ECX
0040105E |.^ 72 E9 \JB SHORT crackme.00401049 ; //循环取用户名ASC值相加,存入EBP
00401060 |> 81C5 64600000 ADD EBP,6064 ; //EBP=EBP+6064h
00401066 |. 55 PUSH EBP
00401067 |. 68 34604000 PUSH crackme.00406034 ; %lu
0040106C |. 68 306B4000 PUSH crackme.00406B30
00401071 |. E8 B6030000 CALL crackme.0040142C ; //将EBP转为10进制字符形式
00401076 |. 8A16 MOV DL,BYTE PTR DS:[ESI]
00401078 |. 8BFE MOV EDI,ESI
0040107A |. 83C9 FF OR ECX,FFFFFFFF
0040107D |. 33C0 XOR EAX,EAX
0040107F |. 8815 446B4000 MOV BYTE PTR DS:[406B44],DL ; //用户名第一个字符
00401085 |. C605 456B4000>MOV BYTE PTR DS:[406B45],2D ; //连接符"-"
0040108C |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
0040108E |. F7D1 NOT ECX
00401090 |. 49 DEC ECX
00401091 |. 0FBE4431 FF MOVSX EAX,BYTE PTR DS:[ECX+ESI-1]
00401096 |. 50 PUSH EAX
00401097 |. E8 C4020000 CALL crackme.00401360 ; //若用户名最后一个字符为小写则转大写
0040109C |. A2 466B4000 MOV BYTE PTR DS:[406B46],AL ; //转换后的用户名最后一个字符
004010A1 |. BF 306B4000 MOV EDI,crackme.00406B30
004010A6 |. 83C9 FF OR ECX,FFFFFFFF
004010A9 |. 33C0 XOR EAX,EAX
004010AB |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
004010AD |. F7D1 NOT ECX
004010AF |. 2BF9 SUB EDI,ECX
004010B1 |. 81C5 64600000 ADD EBP,6064 ; //EBP=EBP+6064h
004010B7 |. 8BF7 MOV ESI,EDI
004010B9 |. 8BD1 MOV EDX,ECX
004010BB |. BF 446B4000 MOV EDI,crackme.00406B44
004010C0 |. 83C9 FF OR ECX,FFFFFFFF
004010C3 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
004010C5 |. 8BCA MOV ECX,EDX
004010C7 |. 4F DEC EDI
004010C8 |. C1E9 02 SHR ECX,2
004010CB |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI]
004010CD |. 8BCA MOV ECX,EDX
004010CF |. 55 PUSH EBP
004010D0 |. 83E1 03 AND ECX,3
004010D3 |. 68 34604000 PUSH crackme.00406034 ; %lu
004010D8 |. F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[ESI]
004010DA |. BF 30604000 MOV EDI,crackme.00406030 ; -
004010DF |. 83C9 FF OR ECX,FFFFFFFF
004010E2 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
004010E4 |. F7D1 NOT ECX
004010E6 |. 2BF9 SUB EDI,ECX
004010E8 |. 68 306B4000 PUSH crackme.00406B30
004010ED |. 8BF7 MOV ESI,EDI
004010EF |. 8BD1 MOV EDX,ECX
004010F1 |. BF 446B4000 MOV EDI,crackme.00406B44
004010F6 |. 83C9 FF OR ECX,FFFFFFFF
004010F9 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
004010FB |. 8BCA MOV ECX,EDX
004010FD |. 4F DEC EDI
004010FE |. C1E9 02 SHR ECX,2
00401101 |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI]
00401103 |. 8BCA MOV ECX,EDX
00401105 |. 83E1 03 AND ECX,3
00401108 |. F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[ESI]
0040110A |. E8 1D030000 CALL crackme.0040142C ; //将EBP转为10进制字符形式
0040110F |. BF 306B4000 MOV EDI,crackme.00406B30
00401114 |. 83C9 FF OR ECX,FFFFFFFF
00401117 |. 33C0 XOR EAX,EAX
00401119 |. 83C4 1C ADD ESP,1C
0040111C |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
0040111E |. F7D1 NOT ECX
00401120 |. 2BF9 SUB EDI,ECX
00401122 |. 8BF7 MOV ESI,EDI
00401124 |. 8BD1 MOV EDX,ECX
00401126 |. BF 446B4000 MOV EDI,crackme.00406B44
0040112B |. 83C9 FF OR ECX,FFFFFFFF
0040112E |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00401130 |. 8BCA MOV ECX,EDX
00401132 |. 4F DEC EDI
00401133 |. C1E9 02 SHR ECX,2
00401136 |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI]
00401138 |. 8BCA MOV ECX,EDX
0040113A |. 8BC3 MOV EAX,EBX
0040113C |. 83E1 03 AND ECX,3
0040113F |. F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[ESI]
00401141 |. BE 446B4000 MOV ESI,crackme.00406B44 ; //真码
00401146 |> 8A10 /MOV DL,BYTE PTR DS:[EAX]
00401148 |. 8A1E |MOV BL,BYTE PTR DS:[ESI]
0040114A |. 8ACA |MOV CL,DL
0040114C |. 3AD3 |CMP DL,BL
0040114E |. 75 25 |JNZ SHORT crackme.00401175
00401150 |. 84C9 |TEST CL,CL
00401152 |. 74 16 |JE SHORT crackme.0040116A
00401154 |. 8A50 01 |MOV DL,BYTE PTR DS:[EAX+1]
00401157 |. 8A5E 01 |MOV BL,BYTE PTR DS:[ESI+1]
0040115A |. 8ACA |MOV CL,DL
0040115C |. 3AD3 |CMP DL,BL
0040115E |. 75 15 |JNZ SHORT crackme.00401175
00401160 |. 83C0 02 |ADD EAX,2
00401163 |. 83C6 02 |ADD ESI,2
00401166 |. 84C9 |TEST CL,CL
00401168 |.^ 75 DC \JNZ SHORT crackme.00401146 ; //循环比较真假注册码
0040116A |> 33C0 XOR EAX,EAX
0040116C |. 33D2 XOR EDX,EDX
0040116E |. 85C0 TEST EAX,EAX
00401170 |. 0F94C2 SETE DL
00401173 |. EB 12 JMP SHORT crackme.00401187
00401175 |> 1BC0 SBB EAX,EAX
00401177 |. 83D8 FF SBB EAX,-1
0040117A |. 33D2 XOR EDX,EDX
0040117C |. 85C0 TEST EAX,EAX
0040117E |. 0F94C2 SETE DL
00401181 |. EB 04 JMP SHORT crackme.00401187
00401183 |> 8B5424 14 MOV EDX,DWORD PTR SS:[ESP+14]
00401187 |> B9 40000000 MOV ECX,40
0040118C |. 33C0 XOR EAX,EAX
0040118E |. BF 446B4000 MOV EDI,crackme.00406B44 ; //真码
00401193 |. F3:AB REP STOS DWORD PTR ES:[EDI]
00401195 |. 5F POP EDI
00401196 |. 5E POP ESI
00401197 |. 5D POP EBP
00401198 |. 8BC2 MOV EAX,EDX
0040119A |. 5B POP EBX
0040119B \. C3 RETN
**************************************************************
【破解总结】
原教程是由wynney大侠用W32无极版爆破的,好奇而已,做了下追码和算法分析
--------------------------------------------------------------
【算法总结】
1、用户名不小于5
2、注册码形式为A-BC-D
(1)A=用户名左边第1个字母
(2)B=用户名左边第1个字母的大写形式
(3)C=用户名ASC值+6064h
(4)D=C+6064h
--------------------------------------------------------------
【算法注册机】
VB代码
Private Sub Command1_Click()
If Len(Text1.Text) < 5 Then
Text2.Text = "输入有误,请重新输入!"
Else
For i = 1 To Len(Text1.Text)
a = a + Asc(Mid(Text1.Text, i, 1))
Next i
a = a + 24676
b = UCase(Right(Text1.Text, 1))
c = a + 24676
Text2.Text = Left(Text1.Text, 1) & "-" & b & a & "-" & c
End If
End Sub
--------------------------------------------------------------
【内存注册机】
中断地址 401146
中断次数 1
第一字节 8A
指令长度 2
内存方式-寄存器-ESI
--------------------------------------------------------------
【爆破地址】
00401267 . 75 65 JNZ SHORT crackme.004012CE
将JNZ改为JE
--------------------------------------------------------------
【注册信息】
用户名:abcdef
注册码:a-F25273-49949
--------------------------------------------------------------
希望以后可以在猫老大和PYG 5.4Cracker学习小组的帮助下进一步提高自己。
感谢飘云老大、猫老大、Nisy老大以及很多前辈们的学习教程以及所有帮助过我的论坛兄弟姐妹们!谢谢
--------------------------------------------------------------
【版权声明】破文是学习的手记,兴趣是成功的源泉;本破文纯属技术交流, 转载请注明作者并保持文章的完整, 谢谢!
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课