home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / E_bliss / eb_tut25.txt < prev    next >
Text File  |  2000-05-25  |  7KB  |  187 lines

  1.             Tutorial Number 25
  2.  
  3. Written by Etenal Bliss
  4. Email: Eternal_Bliss@hotmail.com
  5. Website: http://crackmes.cjb.net
  6.          http://surf.to/crackmes
  7. Date written: 11th Jun 1999
  8.  
  9. Program Details:
  10. Name: Cyber-Info WebMail Notify version 2.6
  11. URL: http://www.cyber-info.com
  12.  
  13. Tools Used:
  14. SoftIce
  15. Hexeditor
  16.  
  17. Cracking Method:
  18. Serial Sniffing
  19. Code analysis
  20.  
  21. Viewing Method:
  22. Use Notepad with Word Wrap switched on
  23. Screen Area set to 800 X 600 pixels (Optional)
  24.  
  25. __________________________________________________________________________
  26.  
  27.  
  28.                         About this protection system
  29.  
  30. This program requires a Name/Serial to register. Before registration, the
  31. number of times you use is written to hotreg2.set in windows system
  32. directory. Upon successful registration, the Name and Serial is also written
  33. to the same file.
  34.  
  35. _________________________________________________________________________
  36.  
  37.  
  38.                         About this tutorial
  39.  
  40. Since this is my 25th tutorial, I will presume that you have read the 
  41. previous ones. So, my description on how to use the tools will be reduced
  42. unless there are new methods.
  43.  
  44. _________________________________________________________________________
  45.  
  46.  
  47.                 Softice
  48.  
  49. First, run the program. Get to the registration box. Type in any Name you
  50. want and any serial.
  51.  
  52. Set the hmemcpy breakpoint in Softice by typing "bpx hmemcpy". Exit Softice.
  53.  
  54. Click on the OK button to register. Softice will pop. Disable the bp by
  55. typing "bd *".
  56.  
  57. Now, keep pressing F12 until you get to the program's code and not windows'.
  58.  
  59. Once you are at the program's code, just trace using F10 to avoid going into
  60. any calls. Whenever you see a mov or lea code, type "d" and the register
  61. which is involved. 
  62.  
  63. Eg. mov eax, dword ptr [0052AAC8]
  64. You will type "d eax" after stepping pass the line using F10.
  65.  
  66. At a certain point, you will come to this piece of code...
  67.  
  68. NOTE: Location shown here might not be the same as yours...
  69.  
  70. :004D7118 E817730000              call 004DE434            << to calculate the serial
  71. :004D711D 8B55F4                  mov edx, [ebp-0C]        << edx = serial
  72. :004D7120 58                      pop eax            << eax = what you entered
  73. :004D7121 E87EC9F2FF              call 00403AA4            << comparing
  74. :004D7126 0F94C0                  sete al
  75. :004D7129 84C0                    test al, al
  76. :004D712B 0F84A5000000            je 004D71D6            << jump to wrong message
  77.  
  78. I've commented on the above piece of code... If your aim is to leech
  79. and not to learn reversing, this is where you stop. Just type "d edx" after
  80. :004D711D and you will see the correct codes.
  81.  
  82. If you want to learn something more, carry on...
  83.  
  84.  
  85. Glad you are still here. 8)
  86.  
  87. Well, let's take a look at the "wrong message"
  88. This is where you will go if you enter the wrong serial:
  89.  
  90. NOTE: Location shown here might not be the same as yours...
  91.  
  92. :004D71D6 833DC8AA520003          cmp dword ptr [0052AAC8], 00000003
  93. :004D71DD 7521                    jne 004D7200
  94. :004D71DF 6A00                    push 00000000
  95. :004D71E1 668B0D5C724D00          mov cx, word ptr [004D725C]
  96. :004D71E8 B201                    mov dl, 01
  97.  
  98. * Possible StringData Ref from Code Obj ->"Registration failed"
  99.                                   |
  100. :004D71EA B814734D00              mov eax, 004D7314
  101. :004D71EF E86CDCF5FF              call 00434E60
  102. :004D71F4 C7832801000002000000    mov dword ptr [ebx+00000128], 00000002
  103. :004D71FE EB20                    jmp 004D7220
  104.  
  105. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  106. |:004D71DD(C)
  107. |
  108. :004D7200 6A00                    push 00000000
  109. :004D7202 668B0D5C724D00          mov cx, word ptr [004D725C]
  110. :004D7209 B201                    mov dl, 01
  111.  
  112. * Possible StringData Ref from Code Obj ->"Invalid name and/or password"
  113.                                   |
  114. :004D720B B830734D00              mov eax, 004D7330
  115. :004D7210 E84BDCF5FF              call 00434E60
  116. :004D7215 8B83B8010000            mov eax, dword ptr [ebx+000001B8]
  117. :004D721B 8B10                    mov edx, dword ptr [eax]
  118. :004D721D FF5278                  call [edx+78]
  119.  
  120. If you trace this piece in Softice, you will see that at :004D71EA,
  121. eax contains the location 004D7314 which points to "Registration failed"
  122. words that you will see in a messagebox.
  123.  
  124. The line :004D71D6 compares the number of tries you make during registration.
  125. If it is your 3rd error, the program will open up a browser and takes you to
  126. register online. If you look at :004D720B, it looks similar to :004D71EA
  127. and you will get a messagebox saying "Invalid name and/or password"
  128.  
  129. Fine... why am I going through all that?? What is there to learn?
  130.  
  131. Well, let's say if we can "make" the program tell us the correct serial
  132. for a Name in the messagebox instead of that stupid message, wouldn't it
  133. be nice? 8)
  134.  
  135. If you look back at the previous piece of code, you will see that
  136. mov edx, [ebp-0C]
  137. will "move" the correct serial into edx.
  138.  
  139. Suppose we "move" the same info into eax at :004D71EA and :004D720B,
  140. will we get the correct serial shown to us? Let's try.
  141.  
  142. In Softice, when you are the program's code, type this:
  143. "a 004D71EA"
  144. This will make softice allow us to change the codes in realtime...
  145. **Before doing this, make sure you know how many bytes are required.
  146.  
  147. type in mov eax, [ebp-0C] and press Enter
  148. This will convert it to 8B45F4. But we need to replace 5 bytes and we have
  149. only 3 bytes now... So, type in NOP and Enter and do it again. Then press "Esc"
  150. to return to the instructions. You will notice that the codes are now changed.
  151. ** NOP is 1 byte (90) therefore, you must have 2 NOP
  152.  
  153. Do the same for :004D720B
  154.  
  155. Summary:
  156. "a 004D71EA" or "a 4D720B"    << allows you to change the codes in the data window
  157. "mov eax, [ebp-0C]"        << move the correct serial into eax
  158. "nop"                << to fill up remaining byte
  159. "nop"                << to fill up remaining byte
  160. Press "Esc"
  161.  
  162. To permanently replace the bytes mentioned, search for the required bytes:
  163. 1) B814734D00
  164. 2) B830734D00
  165.  
  166. For the above two byte combination, there is only one for each... So,
  167. just use a hexeditor, search for it and replace it with the bytes you got
  168. in Softice when you did the "a" thing.
  169.  
  170. Program cracked!! And you have "made" yourself a keygen... 8P
  171.  
  172. __________________________________________________________________________
  173.  
  174.  
  175.                              Final Notes
  176.  
  177. This tutorial is dedicated to all the newbies like me.
  178.  
  179. And because I'm a newbie myself, I may have explained certain things wrongly
  180. So, if that is the case, please forgive me. Email me if there is anything 
  181. you are not clear about.
  182.  
  183.  
  184. My thanks and gratitude goes to:-
  185.  
  186. All the writers of Cracks tutorials and CrackMes
  187. and also to all the crackers that have been supporting my site and project forum.