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

  1.             Tutorial Number 14
  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: 19th Mar 1999
  8.  
  9. Program Details:
  10. Name: cRACKME #2
  11. Author: lEK/tOL
  12.  
  13. Tools Used:
  14. SoftIce
  15. Crackers' Tools written by Borna Janes and I
  16.  
  17. Cracking Method:
  18. Code sniffing
  19.  
  20. Viewing Method:
  21. Use Notepad with Word Wrap switched on
  22. Screen Area set to 800 X 600 pixels (Optional)
  23.  
  24. __________________________________________________________________________
  25.  
  26.  
  27.                         About this protection system
  28.  
  29. No disabled function. Protection is based on a password.
  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. This is a very simple CrackMe, so I won't be
  38. explaining much.
  39.  
  40. __________________________________________________________________________
  41.  
  42.  
  43.                 SoftIce
  44.  
  45. Like I said in my 2 essays on general VB cracking, there are 2 main 
  46. "popular" breakpoints used in VB programs to check serial/password.
  47. They are:
  48. __vbastrcomp
  49. __vbavartsteq
  50.  
  51. Well, since this CrackMe is written in VB, let's try our luck.
  52. Set the two breakpoints by typing "d __vbastrcomp" and "d __vbavartsteq"
  53.  
  54. Run the CrackMe. Type in "12345678" for the password. Click on "cHECK"...
  55.  
  56. Did you break into SoftIce on __vbastrcomp?? Well, I did. 8P
  57.  
  58. Here is a dump from Softice...
  59.  
  60. MSVBVM50!__vbaStrComp
  61. :7B2F3564  8BEC                MOV     EBP,ESP
  62. :7B2F3566  53                  PUSH    EBX
  63. :7B2F3567  56                  PUSH    ESI
  64. :7B2F3568  57                  PUSH    EDI
  65. :7B2F3569  837D1000            CMP     DWORD PTR [EBP+10],00
  66. :7B2F356D  BE00000000          MOV     ESI,00000000
  67. :7B2F3572  7406                JZ      7B2F357A                  (NO JUMP)
  68. :7B2F3574  8B4510              MOV     EAX,[EBP+10]
  69. :7B2F3577  8B70FC              MOV     ESI,[EAX-04]
  70. :7B2F357A  837D0C00            CMP     DWORD PTR [EBP+0C],00
  71. :7B2F357E  BF00000000          MOV     EDI,00000000
  72. :7B2F3583  7406                JZ      7B2F358B                  (NO JUMP)
  73. :7B2F3585  8B4D0C              MOV     ECX,[EBP+0C]
  74. :7B2F3588  8B79FC              MOV     EDI,[ECX-04]
  75. :7B2F358B  3BFE                CMP     EDI,ESI
  76.  
  77. Just these few lines is enough for you to crack the CrackMe.
  78.  
  79.             ------------------------
  80.  
  81. Right after :7B2F3574, if you do a "d eax", you will see this in your
  82. code window...
  83.  
  84. :004118E8 31 00 32 00 33 00 34 00-35 00 36 00 37 00 38 00  1.2.3.4.5.6.7.8.
  85.  
  86. This looks like the password we entered right?? Since it is VB, the password
  87. has been converted to w.i.d.e. .c.h.a.r.a.c.t.e.r
  88.  
  89. And just after :7B2F3577, if you type "? esi" you will see
  90. 00000010  0000000016  ""
  91. in your command window (the place where you do your typing)
  92.  
  93. What does this mean?? Well, your password is 8 char. But because it is 
  94. converted to wide char, it is now double the length, therefore, 16 in Dec
  95. and 10 in Hex.
  96.  
  97. **You can actually see that esi=00000010 in the register window.
  98.  
  99.             ------------------------
  100.  
  101. Right after :7B2F3585, if you do a "d ecx", you will see this in your
  102. code window...
  103.  
  104. :00401E18 57 00 67 00 FF 00 31 00-2E 00 6B 00 36 00 2E 00  W.g...1...k.6...
  105. :00401E28 23 00 FF 00 FF 00 FF 00-FF 00 24 00 20 00 00 00  #.........$. ...
  106.  
  107. And just after :7B2F3588, if you type "? edi" you will see
  108. 0000001E  0000000030  ""
  109. in your command window.
  110.  
  111. **You can actually see that edi=0000001E in the register window.
  112.  
  113. So, following what I said for esi, since edi=0000001E, when converted to Dec,
  114. it is 30. To get the correct length, divide it by 2 and you will get 15.
  115.  
  116.             ------------------------
  117.  
  118. So, our correct password is 15 char. Now, look at the code window after you
  119. typed "d ecx". The Hex values (30 of them) are:
  120.  
  121. 57 00 67 00 FF 00 31 00-2E 00 6B 00 36 00 2E 00  
  122. 23 00 FF 00 FF 00 FF 00-FF 00 24 00 20 00
  123.  
  124. Ignoring the 00s since they are added in VB, you will have
  125. 57 67 FF 31 2E 6B 36 2E 23 FF FF FF FF 24 20
  126.  
  127. **Count the number of Hex values... it will be 15.
  128.  
  129. Use Crackers' Tools (the proggie I coded with Borna Janes) to convert
  130. the Hex values to Ascii. You will get
  131.  
  132. "Wg 1.k6.#    $ "
  133.  
  134. **After the "$", there is a space. Ignore the quotations.
  135. **Also, if you just look at the ascii shown in SoftIce, you will get the
  136.   wrong password. Compare what you converted with what is shown!
  137.  
  138. Now, type in the string you converted from the Hex values. 
  139. You will get a message saying that you have made it!
  140.  
  141. CrackMe Cracked!!
  142.  
  143. __________________________________________________________________________
  144.  
  145.  
  146.                              Final Notes
  147.  
  148. This tutorial is dedicated to all the newbies like me.
  149.  
  150. And because I'm a newbie myself, I may have explained certain things wrongly
  151. So, if that is the case, please forgive me. Email me if there is anything 
  152. you are not clear about.
  153.  
  154.  
  155. My thanks and gratitude goes to:-
  156.  
  157. The Sandman
  158. All the writers of Cracks tutorials and CrackMes