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

  1.             Tutorial Number 20
  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: 27th May 1999
  8.  
  9. Program Details:
  10. Name: W32Dasm CrackMe I
  11. Author: LaZaRuS
  12. Language: Borland Delphi 2.0
  13.  
  14. Tools Used:
  15. W32Dasm
  16.  
  17. Cracking Method:
  18. Zen
  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. Protection is based on a code which is hardcoded. How I know? Well, look at
  30. what LaZaRuS has to say in his CrackMe.
  31.  
  32. "Actually in my opinion it is damn hard to code a CrackMe for W32Dasm. It
  33. can't have serial calculation or something else you can only follow in SICE.
  34. I tried my best and I believe it is little tricky."
  35.  
  36. From here, I know that I will be able to follow easily, there will be no
  37. serial calculation. So what's left? Hard-coded codes hiding somewhere...
  38.  
  39. _________________________________________________________________________
  40.  
  41.  
  42.                 W32Dasm
  43.  
  44. First, disassemble the CrackMe using W32Dasm. You do this by running W32Dasm,
  45. then choose "Disassembler" -> "Open File To Disassemble".
  46.  
  47. As usual, you should look at the String Data Reference (SDR). That is the
  48. last 2nd icon (just next to the printer icon). What did you see? A lot of
  49. words I don't understand because they are not in English. Don't give up yet.
  50. Scroll through everything and see what you have.
  51.  
  52. Towards the end, you will see "Sometimes, the wrong code can " and "Wrong code".
  53. To go to where the Strings are, double click on the string you want. In
  54. this instant, we would like to see where the string "Wrong code" is used.
  55.  
  56. So, double click on "Wrong code". You will see
  57. =================================================================
  58. :0042689B 8B45FC                  mov eax, dword ptr [ebp-04]
  59.  
  60. * Possible StringData Ref from Code Obj ->"Wrong code"
  61.                                   |
  62. :0042689E BA0C694200              mov edx, 0042690C
  63. :004268A3 E8CCCBFDFF              call 00403474
  64. :004268A8 7518                    jne 004268C2
  65. =================================================================
  66.  
  67. To make sure that this string is only used once, double click it again. You
  68. should see another location where this string is used. 
  69. =================================================================
  70. * Possible StringData Ref from Code Obj ->"Wrong code"
  71.                                   |
  72. :004268C9 BA50694200              mov edx, 00426950
  73. :004268CE A124864200              mov eax, dword ptr [00428624]
  74. :004268D3 E830B3FFFF              call 00421C08
  75. =================================================================
  76.  
  77. You should see that they are very near one another...
  78. I've combined the two references together below.
  79. =================================================================
  80. :0042689B 8B45FC                  mov eax, dword ptr [ebp-04]
  81.  
  82. * Possible StringData Ref from Code Obj ->"Wrong code"    <<-- 1st reference
  83.                                   |
  84. :0042689E BA0C694200              mov edx, 0042690C
  85. :004268A3 E8CCCBFDFF              call 00403474
  86. :004268A8 7518                    jne 004268C2
  87. :004268AA 6A00                    push 00000000
  88.  
  89. * Possible StringData Ref from Code Obj ->";-)"
  90.                                   |
  91. :004268AC B918694200              mov ecx, 00426918
  92.  
  93. * Possible StringData Ref from Code Obj ->"Sometimes, the wrong code can "
  94.                                         ->"be the good code"
  95.                                   |
  96. :004268B1 BA1C694200              mov edx, 0042691C
  97. :004268B6 A124864200              mov eax, dword ptr [00428624]
  98. :004268BB E848B3FFFF              call 00421C08
  99. :004268C0 EB16                    jmp 004268D8
  100.  
  101. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  102. |:004268A8(C)
  103. |
  104. :004268C2 6A00                    push 00000000
  105. :004268C4 B94C694200              mov ecx, 0042694C
  106.  
  107. * Possible StringData Ref from Code Obj ->"Wrong code"    <<-- 2nd reference
  108.                                   |
  109. :004268C9 BA50694200              mov edx, 00426950
  110. :004268CE A124864200              mov eax, dword ptr [00428624]
  111. :004268D3 E830B3FFFF              call 00421C08
  112. =================================================================
  113.  
  114. Notice the "Sometimes, the wrong code can "? Isn't it weird? Instead of saying
  115. "Congrats, you have cracked my CrackMe" or something of that sort, we get this.
  116.  
  117. What is LaZaRuS trying to tell us??? Well, he is giving us a BIG hint. 8)
  118.  
  119. Look at the 2nd reference of "Wrong code". There is a reference of a conditional
  120. jump (at 4268A8) which will bring us to it . This might mean that if we enter
  121. the code wrongly, we will be shown the message saying "Wrong code".
  122.  
  123. Run the CrackMe and type anything and try to register. You will get a message
  124. saying "Wrong code". 8)
  125.  
  126. So, what is the 1st "Wrong code" doing there then? And what does the
  127. "Sometimes, the wrong code can be the good code" mean???
  128.  
  129. Notice the call at (4268A3) and then followed by the conditional jump we 
  130. mentioned? Normally, in a compare routine, there is always a CALL and then
  131. a conditional jump. This might be the case for the CrackMe. In this case,
  132. the 1st "Wrong code" is moved in EDX. A line above it moves something into
  133. EAX. Then the call...
  134.  
  135. With a bit of Zen and frustration, let's try entering "Wrong code" as the
  136. code. 8)
  137.  
  138. Did you see a message showing you "Sometimes, the wrong code can be the 
  139. good code"?
  140.  
  141. Do you know what this means? You have just cracked the CrackMe...
  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. All the writers of Cracks tutorials and CrackMes
  158. and also to all the crackers that have been supporting my site and project forum.