CRUDD Crackhead
***************
Cracker: figugegl, 20.1.2001
Tools: SI, IDA
Stufe 1-6: 3
Crudd gibt einen Tipp: Die Serial sei auf jedem PC anders. Das lässt sich leicht feststellen, wenn wir einen Blick aufs Listing werfen. Dort fallen uns die API-Funktionen "GetDriveTypeA" und "GetVolumeInformationA" auf.
0040140C 60 pusha
0040140D 6A 00 push 0
0040140F E8 B4 00 00 00 call j_GetDriveTypeA <== Laufwerkstyp ermitteln
00401414 A2 EC 33 40 00 mov byte_4033EC, al <== Ergebnis speichern (a)
00401419 6A 00 push 0
0040141B 6A 00 push 0
0040141D 6A 00 push 0
0040141F 6A 00 push 0
00401421 6A 00 push 0
00401423 6A 0B push 0Bh
00401425 68 9C 33 40 00 push offset dword_40339C
0040142A 6A 00 push 0
0040142C E8 A3 00 00 00 call j_GetVolumeInformationA <== Name des Laufwerks
00401431 8D 35 9C 33 40 00 lea esi, ds:40339Ch <== Name in ESI (b)
00401437 0F B6 0D EC 33 40+movzx ecx, byte_4033EC <== a
0040143E 33 FF xor edi, edi
00401440 loc_401440: ; CODE XREF: sub_40140C+40j
00401440 8B C1 mov eax, ecx
00401442 8B 1E mov ebx, [esi]
00401444 F7 E3 mul ebx <== a * b
00401446 03 F8 add edi, eax <== aufsummieren
00401448 49 dec ecx <== a--
00401449 83 F9 00 cmp ecx, 0 <== a == 0 ?
0040144C 75 F2 jnz short loc_401440 <== nein, nächster Schleifendurchlauf
0040144E 89 3D 9C 33 40 00 mov dword_40339C, edi <== Ergebnis speichern (c)
00401454 61 popa
00401455 C3 retn
Hier wird abhängig von Laufwerkstyp und -name eine Zahl ermittelt. Danach wird die Serial eingelesen im Hauptprogramm:
00401316 6A 28 push 28h
00401318 68 C4 33 40 00 push offset unk_4033C4
0040131D FF 35 90 31 40 00 push dword_403190
00401323 E8 4C 01 00 00 call j_GetWindowTextA <== Serial einlesen
00401328 E8 A5 00 00 00 call sub_4013D2 <== Berechnung
0040132D 3B C6 cmp eax, esi <== Vergleich
0040132F 75 42 jnz short loc_401373
00401331 EB 2C jmp short loc_40135F
00401333 4E 6F 77 20 77 72+aNowWriteAKeyge db 'Now write a keygen and tut and you',27h,'re done.',0
00401333 69 74 65 20 61 20+ ; DATA XREF: .text:00401366o
0040135F loc_40135F: ; CODE XREF: .text:00401331j
0040135F 6A 00 push 0
00401361 68 0F 30 40 00 push offset aCruddSCrackHea ; "Crudd's Crack Head"
00401366 68 33 13 40 00 push offset aNowWriteAKeyge ; "Now write a keygen and tut and you're d"...
Die Berechnung im Call ist einfach:
004013D2 56 push esi
004013D3 33 C0 xor eax, eax
004013D5 8D 35 C4 33 40 00 lea esi, ds:4033C4h
004013DB 33 C9 xor ecx, ecx
004013DD 33 D2 xor edx, edx
004013DF 8A 06 mov al, [esi]
004013E1 46 inc esi
004013E2 3C 2D cmp al, 2Dh
004013E4 75 08 jnz short loc_4013EE
004013E6 BA FF FF FF FF mov edx, 0FFFFFFFFh
004013EB 8A 06 mov al, [esi]
004013ED 46 inc esi
004013EE EB 0B jmp short loc_4013FB
004013F0 2C 30 sub al, 30h <== Umwandlung der Serial in Integer
004013F2 8D 0C 89 lea ecx, [ecx+ecx*4]
004013F5 8D 0C 48 lea ecx, [eax+ecx*2]
004013F8 8A 06 mov al, [esi]
004013FA 46 inc esi
004013FB 0A C0 or al, al
004013FD 75 F1 jnz short loc_4013F0 <== Umwandlung der Serial in Integer
004013FF 8D 04 0A lea eax, [edx+ecx]
00401402 33 C2 xor eax, edx
00401404 5E pop esi
00401405 81 F6 53 75 7A 79 xor esi, 797A7553h <== Ergebnis xor 797A7553h
0040140B C3 retn
a = Laufwerkstyp
b = höherwertigsten 4 Bits des Laufwerknamens
i = Zähler
a
Serial = Summe (i * b) xor 797A7553h
i=1
************************************