- UID
- 242
注册时间2005-3-6
阅读权限40
最后登录1970-1-1
独步武林
该用户从未签到
|
简单的分析,附上 C 注册机
【文章标题】: HappyTown的第20个CrackMe 算法分析
【文章作者】: KAN_LI[DCG]
【作者邮箱】: [email protected]
【作者主页】: 我都想有,可惜。。。。
【作者QQ号】: 591258070
【软件名称】: HappyTown的第20个CrackMe
【下载地址】: http://bbs.pediy.com/showthread. ... d=227074#post227074
【使用工具】: OD
【操作平台】: Winxp sp2
【软件介绍】: 看雪版主发布的 Crackme
【作者声明】: 只是感兴趣,为解密而学破解
--------------------------------------------------------------------------------
【详细过程】
0040F12E 66:3BB5 2CFFFFF>CMP SI,WORD PTR SS:[EBP-D4]
0040F135 0F8F A4000000 JG CrackMe_.0040F1DF
0040F13B C745 B8 0100000>MOV DWORD PTR SS:[EBP-48],1
0040F142 C745 B0 0200000>MOV DWORD PTR SS:[EBP-50],2
0040F149 8D4D C8 LEA ECX,DWORD PTR SS:[EBP-38]
0040F14C 898D 78FFFFFF MOV DWORD PTR SS:[EBP-88],ECX
0040F152 C785 70FFFFFF 0>MOV DWORD PTR SS:[EBP-90],4008
0040F15C 8D55 B0 LEA EDX,DWORD PTR SS:[EBP-50] ; 用户名地址
0040F15F 52 PUSH EDX
0040F160 0FBFC6 MOVSX EAX,SI
0040F163 50 PUSH EAX
0040F164 8D8D 70FFFFFF LEA ECX,DWORD PTR SS:[EBP-90]
0040F16A 51 PUSH ECX
0040F16B 8D55 A0 LEA EDX,DWORD PTR SS:[EBP-60]
0040F16E 52 PUSH EDX
0040F16F FF15 44104000 CALL DWORD PTR DS:[<&MSVBVM60.#632>] ; MSVBVM60.rtcMidCharVar
0040F175 8D45 A0 LEA EAX,DWORD PTR SS:[EBP-60]
0040F178 50 PUSH EAX
0040F179 8D4D C4 LEA ECX,DWORD PTR SS:[EBP-3C]
0040F17C 51 PUSH ECX
0040F17D FF15 78104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStr>; MSVBVM60.__vbaStrVarVal
0040F183 50 PUSH EAX
0040F184 FF15 18104000 CALL DWORD PTR DS:[<&MSVBVM60.#516>] ; MSVBVM60.rtcAnsiValueBstr
0040F18A 0FBFD0 MOVSX EDX,AX ; sum=n;
0040F18D 66:8BC6 MOV AX,SI ;
0040F190 66:2D 0100 SUB AX,1 ;
0040F194 0F80 36020000 JO CrackMe_.0040F3D0
0040F19A 0FBFC8 MOVSX ECX,AX ; CX = i
0040F19D 0FAFCF IMUL ECX,EDI ; i × DI 这里相乘有点不同 是第一个 符乘 第二个字符
0040F1A0 0F80 2A020000 JO CrackMe_.0040F3D0
0040F1A6 03D1 ADD EDX,ECX ; 用户字符 + CX 累加
0040F1A8 0F80 22020000 JO CrackMe_.0040F3D0
0040F1AE 8BFA MOV EDI,EDX ; DI = DX DI 在这里生成,下面和常熟运
算就靠它了
0040F1B0 8D4D C4 LEA ECX,DWORD PTR SS:[EBP-3C]
0040F1B3 FF15 B8104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFre>; MSVBVM60.__vbaFreeStr
0040F1B9 8D55 A0 LEA EDX,DWORD PTR SS:[EBP-60]
0040F1BC 52 PUSH EDX
0040F1BD 8D45 B0 LEA EAX,DWORD PTR SS:[EBP-50]
0040F1C0 50 PUSH EAX
0040F1C1 6A 02 PUSH 2
0040F1C3 FF15 0C104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFre>;
0040F1C9 83C4 0C ADD ESP,0C
0040F1CC 66:8BCB MOV CX,BX
0040F1CF 66:03CE ADD CX,SI
0040F1D2 0F80 F8010000 JO CrackMe_.0040F3D0
0040F1D8 8BF1 MOV ESI,ECX
0040F1DA ^ E9 4FFFFFFF JMP CrackMe_.0040F12E ; 这里跳回
0040F1DF 33C0 XOR EAX,EAX
0040F1E1 B8 F71A3201 MOV EAX,1321AF7
0040F1E6 0F80 E4010000 JO CrackMe_.0040F3D0
0040F1EC 05 60C46800 ADD EAX,68C460 ; AX + 68C460
0040F1F1 0F80 D9010000 JO CrackMe_.0040F3D0
0040F1F7 8BF0 MOV ESI,EAX ; SI = AX
0040F1F9 33F7 XOR ESI,EDI ; SI ^ DI SI
0040F1FB 8B5D 08 MOV EBX,DWORD PTR SS:[EBP+8]
0040F1FE 8B13 MOV EDX,DWORD PTR DS:[EBX]
0040F200 53 PUSH EBX
0040F201 FF92 04030000 CALL DWORD PTR DS:[EDX+304]
0040F207 50 PUSH EAX
0040F208 8D45 C0 LEA EAX,DWORD PTR SS:[EBP-40]
0040F20B 50 PUSH EAX
0040F20C FF15 30104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaObj>; MSVBVM60.__vbaObjSet
0040F212 8BF8 MOV EDI,EAX
0040F214 8B0F MOV ECX,DWORD PTR DS:[EDI]
0040F216 8D55 C4 LEA EDX,DWORD PTR SS:[EBP-3C]
0040F219 52 PUSH EDX
0040F21A 57 PUSH EDI
0040F21B FF91 A0000000 CALL DWORD PTR DS:[ECX+A0]
0040F221 DBE2 FCLEX
0040F223 85C0 TEST EAX,EAX
0040F225 7D 12 JGE SHORT CrackMe_.0040F239
0040F227 68 A0000000 PUSH 0A0
0040F22C 68 D4E84000 PUSH CrackMe_.0040E8D4
0040F231 57 PUSH EDI
0040F232 50 PUSH EAX
0040F233 FF15 20104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaHre>; MSVBVM60.__vbaHresultCheckObj
0040F239 8B45 C4 MOV EAX,DWORD PTR SS:[EBP-3C]
0040F23C 50 PUSH EAX
0040F23D 68 E8E84000 PUSH CrackMe_.0040E8E8
0040F242 FF15 50104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStr>; MSVBVM60.__vbaStrCmp
0040F248 8BF8 MOV EDI,EAX
0040F24A F7DF NEG EDI
0040F24C 1BFF SBB EDI,EDI
0040F24E 47 INC EDI
0040F24F F7DF NEG EDI
0040F251 8D4D C4 LEA ECX,DWORD PTR SS:[EBP-3C]
0040F254 FF15 B8104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFre>; MSVBVM60.__vbaFreeStr
0040F25A 8D4D C0 LEA ECX,DWORD PTR SS:[EBP-40]
0040F25D FF15 B4104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFre>; MSVBVM60.__vbaFreeObj
0040F263 66:85FF TEST DI,DI
0040F266 0F85 F9000000 JNZ CrackMe_.0040F365
0040F26C 8B0B MOV ECX,DWORD PTR DS:[EBX]
0040F26E 53 PUSH EBX
0040F26F FF91 04030000 CALL DWORD PTR DS:[ECX+304]
0040F275 50 PUSH EAX
0040F276 8D55 C0 LEA EDX,DWORD PTR SS:[EBP-40]
0040F279 52 PUSH EDX
0040F27A FF15 30104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaObj>; MSVBVM60.__vbaObjSet
0040F280 8BF8 MOV EDI,EAX
0040F282 8B07 MOV EAX,DWORD PTR DS:[EDI]
0040F284 8D4D C4 LEA ECX,DWORD PTR SS:[EBP-3C]
0040F287 51 PUSH ECX
0040F288 57 PUSH EDI
0040F289 FF90 A0000000 CALL DWORD PTR DS:[EAX+A0]
0040F28F DBE2 FCLEX
0040F291 85C0 TEST EAX,EAX
0040F293 7D 12 JGE SHORT CrackMe_.0040F2A7
0040F295 68 A0000000 PUSH 0A0
0040F29A 68 D4E84000 PUSH CrackMe_.0040E8D4
0040F29F 57 PUSH EDI
0040F2A0 50 PUSH EAX
0040F2A1 FF15 20104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaHre>; MSVBVM60.__vbaHresultCheckObj
0040F2A7 8B55 C4 MOV EDX,DWORD PTR SS:[EBP-3C] ; 假码
0040F2AA 52 PUSH EDX
0040F2AB FF15 8C104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaI4S>;
0040F2B1 8BF8 MOV EDI,EAX
0040F2B3 8D4D C4 LEA ECX,DWORD PTR SS:[EBP-3C]
0040F2B6 FF15 B8104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFre>;
0040F2BC 8D4D C0 LEA ECX,DWORD PTR SS:[EBP-40]
0040F2BF FF15 B4104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFre>; MSVBVM60.__vbaFreeObj
0040F2C5 81F7 E0CA3101 XOR EDI,131CAE0 ; DI ^ 131CAE0 这个是用来比较的
;SI ^ 131CAE0 才是真码
0040F2CB 2BF7 SUB ESI,EDI ; if(SI==DI)
0040F2CD 0F80 FD000000 JO CrackMe_.0040F3D0
0040F2D3 85F6 TEST ESI,ESI ; 看看 SI 是否等于0
0040F2D5 0F85 8A000000 JNZ CrackMe_.0040F365 ; 关键跳转
--------------------------------------------------------------------------------
【经验总结】
这个 Crackme 比较简单,我这种菜鸟最喜欢的了,^_^
总结:程序对用户名进行累加后 DI 保存了这个值 记为 A
A 和 常熟 0X1321AF7+0X68C460 相加的和 作异域运算 记为 B
B 再和 0X131CAE0 作异域运算就是接过了
附上 C 语言注册机 ,大家别笑 ^_^
#include<stdio.h>
#include<string.h>
main()
{
int i,len,sum=0,di=0,cx,temp;
char name[10];
printf("Please input your name :");
gets(name);
len=strlen(name);
for(i=0;i<len;i++)
{
sum=name;
cx=i;
cx*=di;
sum+=cx;
di=sum;
}
temp=0X1321AF7+0X68C460;
di^=temp^0X131CAE0;
printf("恭喜你 \t%d\n",di);
}
--------------------------------------------------------------------------------
【版权声明】: 随意转载,收藏 ,请注明出处
2006年09月21日 11:59:50
[ 本帖最后由 lgjxj 于 2006-9-21 12:13 编辑 ] |
|