[下载地址]:http://www.crackmes.de/users/boonz/keygenme_1_by_boonz/download
[软件名]: KeygenMe_1_by_boonz
[使用工具]:ollydbg
[作者];ainafeng
[声明]:我是初学者,报着请教的心愿,希望各位前辈不吝赐教!!!
1.下断点bpx getdlgitemtexta,输入实验码wenfeng,注册码:11111111断在以下;注册名必须在4到50之间
004010F8 |. E8 B3020000 call <jmp.&user32.GetDlgItemTextA> ; \GetDlgItemTextA
004010FD |. 6A 28 push 28 ; /Count = 28 (40.)
004010FF |. 68 F8DE4000 push 0040DEF8 ; |Buffer = keygenme.0040DEF8
00401104 |. 68 EF030000 push 3EF ; |ControlID = 3EF (1007.)
00401109 |. FF75 08 push dword ptr [ebp+8] ; |hWnd
0040110C |. E8 9F020000 call <jmp.&user32.GetDlgItemTextA> ; \GetDlgItemTextA
00401111 |. E8 F2000000 call 00401208 ;关键调用
00401116 |. 68 F8DF4000 push 0040DFF8 ; /Text = ""
0040111B |. 68 EF030000 push 3EF ; |ControlID = 3EF (1007.)
00401120 |. FF75 08 push dword ptr [ebp+8] ; |hWnd
00401123 |. E8 A6020000 call <jmp.&user32.SetDlgItemTextA> ; \SetDlgItemTextA
00401128 |. EB 57 jmp short 00401181
0040112A |> 3D F0030000 cmp eax, 3F0
0040112F |. 75 16 jnz short 00401147
00401131 |. 6A 00 push 0 ; /Style = MB_OK|MB_APPLMODAL; Case 3F0 of switch 004010E2
00401133 |. 68 61DC4000 push 0040DC61 ; |nfoname must be 4 - 50 chars long!\n
00401138 |. 68 2ADC4000 push 0040DC2A ; |keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
0040113D |. FF75 08 push dword ptr [ebp+8] ; |hOwner
00401140 |. E8 7D020000 call <jmp.&user32.MessageBoxA> ; \MessageBoxA
----------------------------------------------------------------
调用的关键算法call 00401208:
00401208 /$ 68 F8DC4000 push 0040DCF8 ; /String = "wenfeng"
0040120D |. E8 80010000 call <jmp.&kernel32.lstrlenA> ; \lstrlenA
00401212 |. A3 86DC4000 mov [40DC86], eax
00401217 |. 833D 86DC4000>cmp dword ptr [40DC86], 4 ;比较注册名位数
0040121E |. 0F8C 29010000 jl 0040134D
00401224 |. 833D 86DC4000>cmp dword ptr [40DC86], 32 ;比较注册名位数
0040122B |. 0F8F 1C010000 jg 0040134D
00401231 |. 33C0 xor eax, eax ;寄存器清零
00401233 |. 33DB xor ebx, ebx
00401235 |. 33C9 xor ecx, ecx
00401237 |. BF F8DC4000 mov edi, 0040DCF8 ; ASCII "wenfeng"
0040123C |. 8B15 86DC4000 mov edx, [40DC86] ;注册名位数-->edx
00401242 |> 0FB60439 /movzx eax, byte ptr [ecx+edi]
00401246 |. 83E8 19 |sub eax, 19 ;Xn=Xn-(Sn-19)
00401249 |. 2BD8 |sub ebx, eax
0040124B |. 41 |inc ecx ;计数器
0040124C |. 3BCA |cmp ecx, edx
0040124E |.^ 75 F2 \jnz short 00401242 ;循环判断
00401250 |. 53 push ebx ; /<%lX> 注册码第一部分M1
00401251 |. 68 F8DB4000 push 0040DBF8 ; |%lxbon--hello, mr. goodboy!hello, mr. badboy!keygenme
00401256 |. 68 F8E04000 push 0040E0F8 ; |s = keygenme.0040E0F8
0040125B |. E8 38010000 call <jmp.&user32.wsprintfA> ; \wsprintfA
00401260 |. 83C4 0C add esp, 0C
00401263 |. 33C0 xor eax, eax
00401265 |. 33D2 xor edx, edx
00401267 |. 33C9 xor ecx, ecx
00401269 |. 03C3 add eax, ebx
0040126B |. 0FAFC3 imul eax, ebx
0040126E |. 03C8 add ecx, eax
00401270 |. 2BD3 sub edx, ebx
00401272 |. 33D0 xor edx, eax
00401274 |. 0FAFD8 imul ebx, eax ;ebx=M1的立方
00401277 |. 53 push ebx ; /<%lX>注册码的第二部分M2
00401278 |. 68 F8DB4000 push 0040DBF8 ; |%lxbon--hello, mr. goodboy!hello, mr. badboy!keygenme
0040127D |. 68 F8E14000 push 0040E1F8 ; |s = keygenme.0040E1F8
00401282 |. E8 11010000 call <jmp.&user32.wsprintfA> ; \wsprintfA
00401287 |. 83C4 0C add esp, 0C
0040128A |. 33C0 xor eax, eax
0040128C |. 33DB xor ebx, ebx
0040128E |. 33D2 xor edx, edx
00401290 |. 33C9 xor ecx, ecx
00401292 |. B8 F8E04000 mov eax, 0040E0F8
00401297 |. 03D8 add ebx, eax
00401299 |. 33CB xor ecx, ebx
0040129B |. 0FAFCB imul ecx, ebx
0040129E |. 2BC8 sub ecx, eax ;ecx=40E0F8*40E0F8-40E0F8
004012A0 |. 51 push ecx ; /<%lX>注册码的第三部分M3
004012A1 |. 68 F8DB4000 push 0040DBF8 ; |%lxbon--hello, mr. goodboy!hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
004012A6 |. 68 F8E24000 push 0040E2F8 ; |s = keygenme.0040E2F8
004012AB |. E8 E8000000 call <jmp.&user32.wsprintfA> ; \wsprintfA
004012B0 |. 83C4 0C add esp, 0C
004012B3 |. 68 FCDB4000 push 0040DBFC ; /bon--hello, mr. goodboy!hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
004012B8 |. 68 F8DD4000 push 0040DDF8 ; |s = keygenme.0040DDF8
004012BD |. E8 D6000000 call <jmp.&user32.wsprintfA> ; \wsprintfA
004012C2 |. 83C4 08 add esp, 8
004012C5 |. 68 F8E04000 push 0040E0F8 ; /StringToAdd = ""
004012CA |. 68 F8DD4000 push 0040DDF8 ; |ConcatString = ""
004012CF |. E8 B2000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
004012D4 |. 68 01DC4000 push 0040DC01 ; /-hello, mr. goodboy!hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
004012D9 |. 68 F8DD4000 push 0040DDF8 ; |ConcatString = ""
004012DE |. E8 A3000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
004012E3 |. 68 F8E14000 push 0040E1F8 ; /StringToAdd = ""
004012E8 |. 68 F8DD4000 push 0040DDF8 ; |ConcatString = ""
004012ED |. E8 94000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
004012F2 |. 68 01DC4000 push 0040DC01 ; /-hello, mr. goodboy!hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
004012F7 |. 68 F8DD4000 push 0040DDF8 ; |ConcatString = ""
004012FC |. E8 85000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
00401301 |. 68 F8E24000 push 0040E2F8 ; /StringToAdd = ""
00401306 |. 68 F8DD4000 push 0040DDF8 ; |ConcatString = ""
0040130B |. E8 76000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
00401310 |. B8 F8DD4000 mov eax, 0040DDF8
00401315 |. BB F8DE4000 mov ebx, 0040DEF8 ; ASCII "111111111"
0040131A |. 53 push ebx ; /String2 => "111111111"
0040131B |. 50 push eax ; |String1 => ""
0040131C |. E8 6B000000 call <jmp.&kernel32.lstrcmpA> ; \lstrcmpA
00401321 |. 74 15 je short 00401338
00401323 |. 68 17DC4000 push 0040DC17 ; /hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
00401328 |. 68 F8DF4000 push 0040DFF8 ; |s = keygenme.0040DFF8
0040132D |. E8 66000000 call <jmp.&user32.wsprintfA> ; \wsprintfA
00401332 |. 83C4 08 add esp, 8
00401335 |. 33C0 xor eax, eax
00401337 |. C3 retn
00401338 |> 68 03DC4000 push 0040DC03 ; /hello, mr. goodboy!hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
0040133D |. 68 F8DF4000 push 0040DFF8 ; |s = keygenme.0040DFF8
00401342 |. E8 51000000 call <jmp.&user32.wsprintfA> ; \wsprintfA
00401347 |. 83C4 08 add esp, 8
0040134A |. 33C0 xor eax, eax
0040134C |. C3 retn
0040134D |> 6A 28 push 28 ; /Length = 28 (40.)
0040134F |. 68 F8DD4000 push 0040DDF8 ; |Destination = keygenme.0040DDF8
00401354 |. E8 21000000 call <jmp.&kernel32.RtlZeroMemory> ; \RtlZeroMemory
00401359 |. 68 65DC4000 push 0040DC65 ; /name must be 4 - 50 chars long!\n
0040135E |. 68 F8DF4000 push 0040DFF8 ; |s = keygenme.0040DFF8
00401363 |. E8 30000000 call <jmp.&user32.wsprintfA> ; \wsprintfA
00401368 |. 83C4 08 add esp, 8
0040136B |. 33C0 xor eax, eax
------------------------------------------------
3.使他自显示注册码;
; |ConcatString = ""
004012ED |. E8 94000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
004012F2 |. 68 01DC4000 push 0040DC01 ; /-hello, mr. goodboy!hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n
004012F7 |. 68 F8DD4000 push 0040DDF8 ; |ConcatString = "" ;显示的是完整的注册码
004012FC |. E8 85000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
00401301 |. 68 F8E24000 push 0040E2F8 ; /StringToAdd = ""
00401306 |. 68 F8DD4000 push 0040DDF8 ; |ConcatString = ""
0040130B |. E8 76000000 call <jmp.&kernel32.lstrcatA> ; \lstrcatA
00401310 |. B8 F8DD4000 mov eax, 0040DDF8
00401315 |. BB F8DE4000 mov ebx, 0040DEF8 ; ASCII "111111111"
0040131A |. 53 push ebx ; /String2 => "111111111"
0040131B |. 50 push eax ; |String1 => ""
0040131C |. E8 6B000000 call <jmp.&kernel32.lstrcmpA> ; \lstrcmpA
00401321 |. 74 15 je short 00401338
00401323 |. 68 17DC4000 push 0040DC17 ; /hello, mr. badboy!keygenme #1\n\n~ coded by boonz ~\n\nrelease date 26/07/06nfoname must be 4 - 50 chars long!\n ;将这个修改为 push 40DDF8
00401328 |. 68 F8DF4000 push 0040DFF8 ; |s = keygenme.0040DFF8
0040132D |. E8 66000000 call <jmp.&user32.wsprintfA> ; \wsprintfA
00401332 |. 83C4 08 add esp, 8
00401335 |. 33C0 xor eax, eax
00401337 |. C3 retn
-----------------------------------
4.总结
1.注册名大于4小于50
2.M1=Xn-(Sn-19);
M2=M1的立方;
M3=40E0F8*40E0F8-40E0F8=41720F48;不随注册名而变更;
3.注册名格式=bon-M1-M2-M3
4.一组可用的注册号
ainafeng
Bon-FFFFFD8F-F172B5AF-41720F48
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)