home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / acid_keygen.txt < prev    next >
Encoding:
Text File  |  2000-01-24  |  8.2 KB  |  165 lines

  1. Writing a keygenerator of ACiD_BuRN Newbie Crackme
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. Note : My english is worse .......  and I have not much time to write more detailed,
  5.           but I think you can follow me.
  6.  
  7. You need: SoftIce and how to use;
  8.       your favourite programmer-language;
  9.       a little brain;
  10.       and cracker asm-knowledge;
  11.  
  12. Start cwcrackme.exe and we push  the  Serial / Name-Button.
  13.  
  14. Type your name (I type "rubor") and a dummy serialnumber.
  15. Set breakpoint at "hmemcpy".
  16. And go and check :)
  17.  
  18. Inside SoftIce delete the breakpoint (bc *)  after pressing 12  times F12,
  19. you land at the right Code to begin.
  20. Trace with F8 till you see this:
  21.  
  22. :0042F9EB 0FB600                  movzx eax, byte ptr [eax]      <------    take first digit and convert it to ASCII value
  23. :0042F9EE 8BF0                    mov esi, eax        <------   move this result (with my name = "r" = 114)
  24. :0042F9F0 C1E603                  shl esi, 03        <------   esi = shift logical left = result *8
  25. :0042F9F3 2BF0                    sub esi, eax        <------   esi = esi - ASCII value
  26. :0042F9F5 8D55EC                  lea edx, dword ptr [ebp-14]
  27. :0042F9F8 8B83DC010000            mov eax, dword ptr [ebx+000001DC]
  28. :0042F9FE E855B0FEFF              call 0041AA58
  29. :0042FA03 8B45EC                  mov eax, dword ptr [ebp-14]
  30. :0042FA06 0FB64001                movzx eax, byte ptr [eax+01]  <----- the same thing as above but with your second digit
  31. :0042FA0A C1E004                  shl eax, 04            <----- eax = ascii value * 16
  32. :0042FA0D 03F0                    add esi, eax            <-----esi =  result of first calculation + eax
  33. :0042FA0F 893554174300            mov dword ptr [00431754], esi  <---- save esi to this index of adress
  34. :0042FA15 8D55F0                  lea edx, dword ptr [ebp-10]
  35. :0042FA18 8B83DC010000            mov eax, dword ptr [ebx+000001DC]
  36. :0042FA1E E835B0FEFF              call 0041AA58
  37. :0042FA23 8B45F0                  mov eax, dword ptr [ebp-10]
  38. :0042FA26 0FB64003                movzx eax, byte ptr [eax+03] <----- take digit 4 of your written name
  39. :0042FA2A 6BF00B                  imul esi, eax, 0000000B       <----- eax= esi * 11
  40. :0042FA2D 8D55EC                  lea edx, dword ptr [ebp-14]
  41. :0042FA30 8B83DC010000            mov eax, dword ptr [ebx+000001DC]
  42. :0042FA36 E81DB0FEFF              call 0041AA58
  43. :0042FA3B 8B45EC                  mov eax, dword ptr [ebp-14]
  44. :0042FA3E 0FB64002                movzx eax, byte ptr [eax+02]  <----  take digit 3 
  45. :0042FA42 6BC00E                  imul eax, 0000000E        <---- eax = ascii value * 14
  46. :0042FA45 03F0                    add esi, eax            <---- just adding
  47. :0042FA47 893558174300            mov dword ptr [00431758], esi  <---  save esi to this index of adress
  48. :0042FA4D A16C174300              mov eax, dword ptr [0043176C]
  49. :0042FA52 E8D96EFDFF              call 00406930        <--- get length of our name
  50. :0042FA57 83F804                  cmp eax, 00000004          <--- compare length of your name with  4
  51. :0042FA5A 7D1D                    jge 0042FA79        <--- jump if length > = 4 else
  52. <------------------------------------------------------------------------------------------------------------------------------------->
  53. :0042FA5C 6A00                    push 00000000
  54.  
  55. * Possible StringData Ref from Code Obj ->"Try Again!"
  56.                                   |
  57. :0042FA5E B974FB4200              mov ecx, 0042FB74
  58.  
  59. * Possible StringData Ref from Code Obj ->"Sorry , The serial is incorect "
  60.                                         ->"!"
  61.                                   |
  62. :0042FA63 BA80FB4200              mov edx, 0042FB80
  63. :0042FA68 A1480A4300              mov eax, dword ptr [00430A48]
  64. :0042FA6D 8B00                    mov eax, dword ptr [eax]
  65. :0042FA6F E8FCA6FFFF              call 0042A170
  66. :0042FA74 E9BE000000              jmp 0042FB37
  67. <-------------------------------------------------------------------------------------------------------------------------------------->
  68.  
  69. Now, use your brain.
  70. ACiD_BuRN calculates something and after all he make a length-compare of our name.
  71. Hmmm, this is a logical fault ... First i compare something and then i calculate, this is the right way.
  72. You thing what I thing ? :)
  73.  
  74. Let's go to the "second part". My name is = > 4, so i see this line's.
  75.  
  76. <-------------------------------------------------------------------------------------------------------------------------------------->
  77. :0042FA79 8D55F0                  lea edx, dword ptr [ebp-10]
  78. :0042FA7C 8B83DC010000            mov eax, dword ptr [ebx+000001DC]
  79. :0042FA82 E8D1AFFEFF              call 0041AA58
  80. :0042FA87 8B45F0                  mov eax, dword ptr [ebp-10]
  81. :0042FA8A 0FB600                  movzx eax, byte ptr [eax]                <--------- take our first digit and convert it to ascii value
  82. :0042FA8D F72D50174300            imul dword ptr [00431750]         <--------- eax= eax * the constant value '41'
  83. :0042FA93 A350174300              mov dword ptr [00431750], eax  <--------- save this result
  84. :0042FA98 A150174300              mov eax, dword ptr [00431750]  <--------- for
  85. :0042FA9D 010550174300            add dword ptr [00431750], eax <--------- adding and to save
  86. :0042FAA3 8D45FC                  lea eax, dword ptr [ebp-04]
  87. :0042FAA6 BAACFB4200              mov edx, 0042FBAC             <--------- a constant string 'CW'
  88. :0042FAAB E8583CFDFF              call 00403708
  89. :0042FAB0 8D45F8                  lea eax, dword ptr [ebp-08]
  90.  
  91. ...... < snip > .............
  92.                                   |
  93. :0042FAB3 BAB8FB4200              mov edx, 0042FBB8            <--------- the constant string "CRACKED"
  94. :0042FAC8 A150174300              mov eax, dword ptr [00431750]    <---- our calculated serial of above
  95. :0042FACD E8466CFDFF              call 00406718
  96. :0042FAD2 FF75E8                  push [ebp-18]
  97. :0042FAD5 68C8FB4200              push 0042FBC8            <---- constant string '-'
  98. :0042FADA FF75F8                  push [ebp-08]
  99. :0042FADD 8D45F4                  lea eax, dword ptr [ebp-0C]
  100. :0042FAE0 BA05000000              mov edx, 00000005
  101. :0042FAE5 E8C23EFDFF              call 004039AC            <----- 'calculate' our valid serial
  102. :0042FAEA 8D55F0                  lea edx, dword ptr [ebp-10]
  103. :0042FAED 8B83E0010000            mov eax, dword ptr [ebx+000001E0]
  104. :0042FAF3 E860AFFEFF              call 0041AA58
  105. :0042FAF8 8B55F0                  mov edx, dword ptr [ebp-10]        <----- our dummy serial
  106. :0042FAFB 8B45F4                  mov eax, dword ptr [ebp-0C]                <----- our valid serial
  107. :0042FAFE E8F93EFDFF              call 004039FC            <----- compare
  108. :0042FB03 751A                    jne 0042FB1F            <----- good / bad boy
  109.  
  110. <-------------------------------------------------------------------------------------------------------------------------------------->
  111.  
  112. You know now what i mean !
  113. ACiD_BuRN do at the "first part" a fake calculation.......
  114. Very tricky :)
  115.  
  116. Our valid serial look like:
  117.  
  118. CW-serial_xyz-CRACKED
  119.  
  120. (for my name /   CW-9348-CRACKED)
  121.  
  122. Now you know too, how to write a keygenerator.
  123. Here the calculation of our serial:
  124.  
  125. 1. Compare if the length of the name is smaller as 4
  126. 2. Take first digit and convert it to ascii value
  127. 3. Multiply the ascii value with 41and multiply this result with 2.
  128.  
  129. <-------------------------------------------------------------------------------------------------------------------------------------->
  130. Code in Pascal, maybe look like this:
  131.  
  132. program ACiD;
  133.  
  134. uses crt;
  135.  
  136. var
  137. name:String;
  138. eax:longint;
  139.  
  140. begin
  141.  
  142. .......................
  143.   readln(name);
  144.       if length(name) < 4 then
  145.      begin
  146.            writeln('Plz type at least 4 digits !!!');
  147.             exit;
  148.      end;
  149.    eax:=(ord(name[1])*41)*2;
  150. ........................
  151.    write(' CW-',eax,'-CRACKED');
  152.  
  153. end.
  154.  
  155. <-------------------------------------------------------------------------------------------------------------------------------------->
  156.  
  157. If you select the only Serial-Button and you can't find the serial, just type "Hello Dude!".
  158.  
  159.  
  160. For any comments go to EFNET and join GWA and talk to me, rubor.
  161.  
  162. greets fly out to (very short):
  163.  all GWA / CUG/ Crackerworld members, prof x and all I forgot :)
  164. <-------------------------------------------------------------------------------------------------------------------------------------->
  165. 09.06.1999                                                rubor