【破文标题】第一个密码表算法Crack Me算法分析
【破文作者】小子贼野
【作者主页】http://mayday.unpack.cn
【破解工具】OD
【破解声明】我是一只小菜鸟,偶得一点心得,愿与大家分享:)
------------------------------------------------------------------------
这是我分析的第一个密码表的算法,以前根本不会,昨天努力了下,发现这个并没有我想象中的那么难:)
------------------------------------------------------------------------
00427A20 /$ 55 push ebp
00427A21 |. 8BEC mov ebp,esp
00427A23 |. 83C4 F0 add esp,-10
00427A26 |. 53 push ebx
00427A27 |. 56 push esi
00427A28 |. 33C9 xor ecx,ecx
00427A2A |. 894D F0 mov [local.4],ecx
00427A2D |. 894D F4 mov [local.3],ecx
00427A30 |. 8955 F8 mov [local.2],edx
00427A33 |. 8945 FC mov [local.1],eax
00427A36 |. 8B45 FC mov eax,[local.1]
00427A39 |. E8 26BFFDFF call eKHcrack.00403964
00427A3E |. 8B45 F8 mov eax,[local.2]
00427A41 |. E8 1EBFFDFF call eKHcrack.00403964
00427A46 |. 33C0 xor eax,eax
00427A48 |. 55 push ebp
00427A49 |. 68 2A7B4200 push eKHcrack.00427B2A
00427A4E |. 64:FF30 push dword ptr fs:[eax]
00427A51 |. 64:8920 mov dword ptr fs:[eax],esp
00427A54 |. 33DB xor ebx,ebx
00427A56 |. 8B45 FC mov eax,[local.1]
00427A59 |. E8 52BDFDFF call eKHcrack.004037B0
00427A5E |. 8BF0 mov esi,eax
00427A60 |. 85F6 test esi,esi
00427A62 |. 7E 3C jle short eKHcrack.00427AA0
00427A64 |. B8 01000000 mov eax,1
00427A69 |> 8BD0 /mov edx,eax
00427A6B |. 8B4D FC |mov ecx,[local.1]
00427A6E |. 0FB64C11 FF |movzx ecx,byte ptr ds:[ecx+edx->; 取用户名的Ascii
00427A73 |. 03D9 |add ebx,ecx ; 累加到ebx
00427A75 |. 71 05 |jno short eKHcrack.00427A7C
00427A77 |. E8 B4AFFDFF |call eKHcrack.00402A30
00427A7C |> C1E3 08 |shl ebx,8 ; 左移8位
00427A7F |. 8B0D 80884200 |mov ecx,dword ptr ds:[428880] ; 固定字符串
00427A85 |. 0FB65411 FF |movzx edx,byte ptr ds:[ecx+edx->; 取第N位的值
00427A8A |. 0BDA |or ebx,edx ; 做or运算
00427A8C |. 85DB |test ebx,ebx
00427A8E |. 7D 0C |jge short eKHcrack.00427A9C
00427A90 |. 6BD3 FF |imul edx,ebx,-1
00427A93 |. 71 05 |jno short eKHcrack.00427A9A
00427A95 |. E8 96AFFDFF |call eKHcrack.00402A30
00427A9A |> 8BDA |mov ebx,edx
00427A9C |> 40 |inc eax
00427A9D |. 4E |dec esi
00427A9E |.^ 75 C9 \jnz short eKHcrack.00427A69 ; 没计算完成就跳上去
00427AA0 |> 81F3 78563412 xor ebx,12345678 ; 和$12345678做异或运算
00427AA6 |. 8D55 F0 lea edx,[local.4]
00427AA9 |. 8BC3 mov eax,ebx
00427AAB |. E8 44E9FDFF call eKHcrack.004063F4
00427AB0 |. 8B45 F0 mov eax,[local.4]
00427AB3 |. E8 F8BCFDFF call eKHcrack.004037B0
00427AB8 |. 8BF0 mov esi,eax ; esi=eax=刚才计算过的值的位数
00427ABA |. 85F6 test esi,esi
00427ABC |. 7E 38 jle short eKHcrack.00427AF6
00427ABE |> 8BC3 /mov eax,ebx
00427AC0 |. B9 0A000000 |mov ecx,0A
00427AC5 |. 99 |cdq
00427AC6 |. F7F9 |idiv ecx ; 上面的值除10,然后取余
00427AC8 |. 6215 3C7B4200 |bound edx,qword ptr ds:[427B3C]
00427ACE |. 8A92 84884200 |mov dl,byte ptr ds:[edx+428884] ; 这里跟随到数据窗口会看到密码表
00427AD4 |. 8D45 F0 |lea eax,[local.4]
00427AD7 |. E8 FCBBFDFF |call eKHcrack.004036D8
00427ADC |. 8B55 F0 |mov edx,[local.4]
00427ADF |. 8D45 F4 |lea eax,[local.3]
00427AE2 |. E8 D1BCFDFF |call eKHcrack.004037B8
00427AE7 |. 8BC3 |mov eax,ebx ; eax=上面计算后的值
00427AE9 |. B9 0A000000 |mov ecx,0A
00427AEE |. 99 |cdq
00427AEF |. F7F9 |idiv ecx ; 除10
00427AF1 |. 8BD8 |mov ebx,eax
00427AF3 |. 4E |dec esi
00427AF4 |.^ 75 C8 \jnz short eKHcrack.00427ABE ; 没算完就跳上去
00427AF6 |> 8B45 F4 mov eax,[local.3]
00427AF9 |. 8B55 F8 mov edx,[local.2]
00427AFC |. E8 BFBDFDFF call eKHcrack.004038C0
00427B01 |. 75 07 jnz short eKHcrack.00427B0A
00427B03 |. BB 4E61BC00 mov ebx,0BC614E
00427B08 |. EB 05 jmp short eKHcrack.00427B0F
00427B0A |> BB 91D61200 mov ebx,12D691
00427B0F |> 33C0 xor eax,eax
00427B11 |. 5A pop edx
00427B12 |. 59 pop ecx
00427B13 |. 59 pop ecx
00427B14 |. 64:8910 mov dword ptr fs:[eax],edx
00427B17 |. 68 317B4200 push eKHcrack.00427B31
00427B1C |> 8D45 F0 lea eax,[local.4]
00427B1F |. BA 04000000 mov edx,4
00427B24 |. E8 2FBAFDFF call eKHcrack.00403558
00427B29 \. C3 retn
------------------------------------------------------------------------
算法总结:
第一个循环:取用户名的Ascii,左移8位后和固定字符串的第N(N表示为对应的位数)位的Ascii做or运算
,循环计算完成以后,和$12345678做xor运算。
第二个循环:然后又以结果的位数做循环,第一个循环计算后的值除以10取余,然后取表中对应位置的字符
串作为真正的注册码,然后再整除以10,循环计算。
------------------------------------------------------------------------
密码表:LANNY5646521 固定字符串:LANNYDIBANDINGINANAKEKHYANGNGENTOT
------------------------------------------------------------------------
Delphi算法注册机源码:
------------------------------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var
i,a,b:integer;
c,d:string;
const
z:array [0..11] of string=('L','A','N','N','Y','5','6','4','6','5','2','1');
begin
a:=0;
c:='LANNYDIBANDINGINANAKEKHYANGNGENTOT';
for i:=1 to length(edit1.Text) do
begin
a:=(a+ord(edit1.text[i])) shl 8;
a:=abs(a or ord(c[i]));
end;
a:=a xor $12345678;
for i:=1 to length(inttostr(a)) do
begin
b:=a mod 10;
d:=d+z;
a:=a div 10;
end;
edit2.Text:=d;
end;
end.
郁闷,不能传附件
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!