Just type in 123456789 as serial and step through the code. You'll see that
the "4" is compared to 72 (r), the "3" to 77 (w) and the "6" to 70 (p).
Just change the numbers in your original serail to the right letters. (12wr5p789)
Any serial of the form "--wr-p..." will do the trick.
level2:
======
olly -->
00401111 PUSH 1E ; /Count = 1E (30.)
00401113 LEA EDX,DWORD PTR SS:[ESP+14] ; |
00401117 PUSH EDX ; |Buffer
00401118 PUSH 3F4 ; |ControlID = 3F4 (1012.)
0040111D STOS WORD PTR ES:[EDI] ; |
0040111F PUSH EBP ; |hWnd
00401120 XOR EDI,EDI ; |
00401122 MOV ESI,2D <--- OBS ESI=2d
00401127 CALL EBX ; GetDlgItemTextA
00401129 PUSH 1E ; /Count = 1E (30.)
0040112B LEA EAX,DWORD PTR SS:[ESP+EC] ; |
00401132 PUSH EAX ; |Buffer
00401133 PUSH 3F5 ; |ControlID = 3F5 (1013.)
00401138 PUSH EBP ; |hWnd
00401139 CALL EBX ; GetDlgItemTextA
0040113B LEA EAX,DWORD PTR SS:[ESP+10]
0040113F LEA EDX,DWORD PTR DS:[EAX+1]
00401142 MOV CL,BYTE PTR DS:[EAX]
00401144 INC EAX
00401145 TEST CL,CL
00401147 JNZ SHORT KGNME-6.00401142
00401149 SUB EAX,EDX ; eax = length of username
0040114B CMP EAX,3 ; username must be 4 chars or longer
0040114E JLE KGNME-6.004014B5
00401154 XOR ECX,ECX
00401156 TEST EAX,EAX
00401158 JLE SHORT KGNME-6.00401176
0040115A LEA EBX,DWORD PTR DS:[EBX] |
00401160 MOVSX EDX,BYTE PTR SS:[ESP+ECX+10] | this loop takes every letter in the username,
00401165 ADD EDX,ESI | adds esi (2d at first)
00401167 ADD EDI,EDX | adds result to edi (which is 0 at first)
00401169 ADD ESI,ESI | multiplies esi by 2
0040116B ADD EDI,86 | and adds 86 to the value in edi
00401171 INC ECX | (ecx=counter)
00401172 CMP ECX,EAX | (eax=usrname.length)
00401174 JL SHORT KGNME-6.00401160 |
00401176 IMUL EDI,EDI,FFFF2155 / when done it multiplies the result from the
0040117C PUSH EDI loop with FFFF2155 (=-DEAB) to get a hash
0040117D LEA EAX,DWORD PTR SS:[ESP+84]
00401184 PUSH KGNME-6.00407280 ; ASCII "%X"
00401189 PUSH EAX
0040118A CALL KGNME-6.0040151E
0040118F LEA EAX,DWORD PTR SS:[ESP+8C]
00401196 ADD ESP,0C
00401199 MOV EDX,EAX
0040119B JMP SHORT KGNME-6.004011A0
0040119D LEA ECX,DWORD PTR DS:[ECX]
004011A0 MOV CL,BYTE PTR DS:[EAX]
004011A2 INC EAX
004011A3 TEST CL,CL
004011A5 JNZ SHORT KGNME-6.004011A0
004011A7 LEA EDI,DWORD PTR SS:[ESP+44] ;EDI = "KiTo~"
004011AB SUB EAX,EDX
004011AD DEC EDI
004011AE MOV EDI,EDI
004011B0 MOV CL,BYTE PTR DS:[EDI+1]
004011B3 INC EDI
004011B4 TEST CL,CL
004011B6 JNZ SHORT KGNME-6.004011B0
004011B8 MOV ECX,EAX
004011BA SHR ECX,2
004011BD MOV ESI,EDX
004011BF REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS>
004011C1 MOV ECX,EAX
004011C3 AND ECX,3
004011C6 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[>
004011C8 LEA EDI,DWORD PTR SS:[ESP+44]
004011CC DEC EDI
004011CD LEA ECX,DWORD PTR DS:[ECX]
004011D0 MOV AL,BYTE PTR DS:[EDI+1]
004011D3 INC EDI
004011D4 TEST AL,AL
004011D6 JNZ SHORT KGNME-6.004011D0
004011D8 MOV ECX,DWORD PTR DS:[407274]
004011DE MOV EDX,DWORD PTR DS:[407278]
004011E4 MOV AL,BYTE PTR DS:[40727C]
004011E9 MOV DWORD PTR DS:[EDI],ECX ;DS:[EDI] = "~Is"
004011EB MOV DWORD PTR DS:[EDI+4],EDX ;DS:[EDI+4] = "~Leet"
004011EE MOV BYTE PTR DS:[EDI+8],AL
004011F1 LEA ESI,DWORD PTR SS:[ESP+E8]
004011F8 LEA EAX,DWORD PTR SS:[ESP+44] ;EAX=serial ("KiTo~ourhash~Is~Leet") <--Here's the serial....
004011FC LEA ESP,DWORD PTR SS:[ESP]
00401200 MOV DL,BYTE PTR DS:[EAX]
00401202 MOV BL,BYTE PTR DS:[ESI]
00401204 MOV CL,DL
00401206 CMP DL,BL
00401208 JNZ SHORT KGNME-6.00401228
0040120A TEST CL,CL
0040120C JE SHORT KGNME-6.00401224
0040120E MOV DL,BYTE PTR DS:[EAX+1]
00401211 MOV BL,BYTE PTR DS:[ESI+1]
00401214 MOV CL,DL
00401216 CMP DL,BL
00401218 JNZ SHORT KGNME-6.00401228
0040121A ADD EAX,2
0040121D ADD ESI,2
00401220 TEST CL,CL
00401222 JNZ SHORT KGNME-6.00401200
00401224 XOR EAX,EAX
00401226 JMP SHORT KGNME-6.0040122D
00401228 SBB EAX,EAX
0040122A SBB EAX,-1
0040122D TEST EAX,EAX
0040122F JNZ Badboy
00401235 --GoodBoy--
So.. the serial is KiTo~thehash~Is~Leet
for example, username abcd --> hash FA9131EB --> serial KiTo~FA9131EB~Is~Leet
keygen is simple to make, just make a function that calculates the hash like the one above...
level3:
======
Same thing here, playin around some in olly -->
serial: KiTo-hash1-SWEDEN-hash2
just find the hash-calculation function and port it to your favorite language
-> keygen in no time
(and the minlength for name is 4 here as well)
(min for company is 3 or serial gets *censored*ed up)
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Tutorial for KiTo's KeyGenMe 6
Authored by:
TDC on
Sunday, October 23 2005 @ 09:35 PM CEST
hey dude funny tut.. the keygen is working almost 100%
you can't help it, KiTo made a bug at the end of HASH 2 in level 3...
for instance, enter "sdfsdf" as name and "affd" as company name, your serial generation will be the same each time
but KiTo's crackme's serial is different each time...
it happens because (I think) the memory part is shared by windows and the crackme.. and the algorithm loops NAME times and it keeps on trying to get [eax+COMPANY] while eax = the counter...
bit weird, but I had to say this :-)
Greetz, TDC
---
[img]http://www35.tok2.com/home/jellard23/sig-reverse.jpg[/img]
:: The world is yours! ::
you can't help it, KiTo made a bug at the end of HASH 2 in level 3...
for instance, enter "sdfsdf" as name and "affd" as company name, your serial generation will be the same each time
but KiTo's crackme's serial is different each time...
it happens because (I think) the memory part is shared by windows and the crackme.. and the algorithm loops NAME times and it keeps on trying to get [eax+COMPANY] while eax = the counter...
bit weird, but I had to say this :-)
Greetz, TDC
---
[img]http://www35.tok2.com/home/jellard23/sig-reverse.jpg[/img]
:: The world is yours! ::