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

  1.             Tutorial Number 17
  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: 28th Mar 1999
  8.  
  9. Program Details:
  10. Name: Crackme 1.2
  11. Author: Nitrus
  12.  
  13. Tools Used:
  14. SoftIce
  15.  
  16. Cracking Method:
  17. Code sniffing
  18.  
  19. Viewing Method:
  20. Use Notepad with Word Wrap switched on
  21. Screen Area set to 800 X 600 pixels (Optional)
  22.  
  23. __________________________________________________________________________
  24.  
  25.  
  26.                         About this protection system
  27.  
  28. No disabled function. Protection is based on a serial which is calculated
  29. from the Name you enter.
  30.  
  31. __________________________________________________________________________
  32.  
  33.  
  34.                                  The Essay
  35.  
  36. In this essay, when I write type "d edx" or similar commands in Softice,
  37. I mean it without the quotes. 
  38.  
  39. _________________________________________________________________________
  40.  
  41.  
  42.                 SoftIce
  43.  
  44. Since this is a VB crackme, we might as well try using the few common 
  45. breakpoints:
  46. 1) bpx msvbvm60!__vbavartsteq
  47. 2) bpx msvbvm60!__vbastrcomp
  48.  
  49. **I add in msvbvm60! because it is written in VB6.
  50.  
  51. Run the CrackMe and click on the first icon to get the register screen.
  52.  
  53. Enter Name as "Eternal Bliss" and serial as "12345"
  54.  
  55. Click on the picture of the key.
  56.  
  57. You will break on msvbvm60!__vbastrcomp
  58.  
  59. Break due to BPX MSVBVM60!__vbaStrComp  (ET=2.44 seconds)
  60. MSVBVM60!__vbaStrComp
  61. :66060A85  0F8499F00200        JZ      6608FB24                  (NO JUMP)
  62. :66060A8B  6801000300          PUSH    00030001
  63. :66060A90  FF742408            PUSH    DWORD PTR [ESP+08]
  64. :66060A94  FF742410            PUSH    DWORD PTR [ESP+10]
  65. :66060A98  FF742418            PUSH    DWORD PTR [ESP+18]
  66. :66060A9C  FF1510001166        CALL    [OLEAUT32!VarBstrCmp]
  67. **Go into this call using F8
  68.  
  69. ==========================================================================
  70. OLEAUT32!VarBstrCmp
  71. :653C0227  8BEC                MOV     EBP,ESP
  72. :653C0229  51                  PUSH    ECX
  73. :653C022A  53                  PUSH    EBX
  74. :            __________Snip___________
  75. :
  76. :653C025C  8B7D0C              MOV     EDI,[EBP+0C]
  77. :653C025F  8B7508              MOV     ESI,[EBP+08]
  78. :653C0262  8B4D10              MOV     ECX,[EBP+10]
  79.  
  80. When you go into :653C0227 (OLEAUT32!VarBstrCmp), just keep pressing F10
  81. to trace along the code. Whenever any register changes, type "d register"
  82. to see what is the new value.
  83. **register in "d register" is eax, ebx, ecx, edx, edi, esi
  84.   so don't email me saying that you get an error from Softice when you type
  85.   "d register"
  86.  
  87. I am only showing the interesting codes.
  88.  
  89. After :653C025C, you will see edi having a new value. type "d edi"
  90. You should see
  91. :004271C4 34 00 35 00 37 00 34 00-36 00 35 00 37 00 32 00  4.5.7.4.6.5.7.2.
  92. :004271D4 36 00 45 00 36 00 31 00-36 00 43 00 32 00 30 00  6.E.6.1.6.C.2.0.
  93. :004271E4 34 00 32 00 36 00 43 00-36 00 39 00 37 00 33 00  4.2.6.C.6.9.7.3.
  94. :004271F4 37 00 33 00 34 00 35 00-37 00 34 00 36 00 35 00  7.3.
  95.  
  96. After :653C025F, you will see esi having a new value. type "d esi"
  97. You should see
  98. :00421FA8 31 00 32 00 33 00 34 00-35 00 00 00 6C 00 20 00  1.2.3.4.5...l. .
  99.  
  100.  
  101. Now, 12345 is the serial we entered and is now in w.i.d.e. .c.h.a.r.a.c.t.e.r
  102. format because this is a VB program.
  103.  
  104. It is compared with something in edi later. So, when you type "d edi",
  105. you will see the value of edi in the data window.
  106.  
  107. Lets get the "normal" value of edi.
  108. 457465726E616C20426C697373
  109.  
  110. Disable all your breakpoints and type that as your serial using 
  111. "Eternal Bliss" as the Name.
  112.  
  113. You will be registered. 8)
  114.  
  115. Ok. That's code sniffing for you.
  116.  
  117. Now, take a look at the serial. Do you see "7373" at the end?
  118. "Eternal Bliss" has got "ss" at the end.
  119.  
  120. Now, if you convert "73" (hex value) to ascii, you will get "s"
  121. **Use Crackers' Tool coded by Borna Janes and I. It can be found on my 
  122.   website.
  123.  
  124. So, if you convert every single character of the Name into Hex, you will
  125. get 457465726E616C20426C697373 which is the serial!
  126.  
  127.  
  128. CrackMes Cracked!!
  129.  
  130. __________________________________________________________________________
  131.  
  132.  
  133.                              After-thoughts
  134.  
  135. After cracking this CrackMe, I decided to use SmartCheck. To my surprise,
  136. it is even easier. 8)
  137.  
  138. Try it. Just look for the following lines...
  139.  
  140. Mid(x)
  141. Hex(x)
  142. __vbaStrCopy(x)
  143. and finally,
  144. __vbaStrCmp(x)
  145.  
  146. where x can be any values.
  147.  
  148. You will know what I mean.
  149.  
  150.  
  151. __________________________________________________________________________
  152.  
  153.  
  154.                              Final Notes
  155.  
  156. This tutorial is dedicated to all the newbies like me.
  157.  
  158. And because I'm a newbie myself, I may have explained certain things wrongly
  159. So, if that is the case, please forgive me. Email me if there is anything 
  160. you are not clear about.
  161.  
  162.  
  163. My thanks and gratitude goes to:-
  164.  
  165. The Sandman
  166. All the writers of Cracks tutorials and CrackMes