home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Code Inside / Tut20.txt < prev    next >
Encoding:
Text File  |  2001-09-21  |  4.0 KB  |  108 lines

  1. ************************************************************************************************************************
  2.                     CrackMe #2a 1
  3. ************************************************************************************************************************
  4.  
  5. Author:        n0p3x
  6. Protection:    NAG
  7. URL:        http://www.phrozencrew.co.uk/crackme2a1.zip
  8. Tools:        W32Dasm V8.93
  9.         Hex-Editor
  10.  
  11.  
  12. --->    Intro...
  13.  
  14. Welcome to my next Tutorial !!!
  15. A simple NAG with a nifty little trick (CRC) ;)
  16.  
  17.  
  18. --->    Let's Begin...
  19.  
  20. Ok, well open the CrackMe and you'll see a NAG.
  21. This time it's not in a form of MessageBoxA.
  22. Why?
  23. You can see that because of the buttons, a Message Box can't display other buttons then "Ok, Cancel...".
  24. So the NAG is probably made by "DialogBoxParamA" or "CreateWindowExA".
  25. Let's disassemble the CrackMe in W32Dasm.
  26. Then click on "Imp Fn" (Imports) to see what kind of API's the CrackMe uses.
  27. You'll see these:
  28.  
  29. KERNEL32.ExitProcess
  30. KERNEL32.GetModuleHandleA
  31. USER32.DialogBoxParamA
  32. USER32.EndDialog
  33. USER32.MessageBoxA
  34.  
  35. Ok, so it doesn't use "CreateWindowExA" :)
  36. Now double click on "DialogBoxParamA" and you'll notice there are 2 (the NAG and the main window).
  37. The first one you'll get is the NAG, how do i know that ???
  38. Simple, because you'll see just above "Program Entry Point" and the NAG has been called sooner then
  39. the main window :)
  40. The NAG window starts at Offset "0040100C" so we just simply gonna replace the "6A00" with "EB67".
  41. This means that it'll Jump to the main window and skips the NAG :)
  42. To know how much you need to fill behind the "EB" , just count ;)
  43. So change that in your Hex-Editor (I assume you know how to do that) and save the file and start the CrackMe.
  44. Oh no.... !!! A Message Box pops up saying:
  45.  
  46. "ERROR: Program has detected tampering. Execution terminated"
  47.  
  48. Hmmm... what's that ?
  49. Probably the CRC ;)
  50. So how are we going to solve this ???
  51. Simple, just find the text in W32Dasm and see where it's called :)
  52. So open the CrackMe again in W32Dasm and now click on "Strn Ref" (String Data References).
  53. Then double click on "ERROR: Program has detected tampering.".
  54. And you'll see this:
  55.  
  56. ------------------------------------------------------------------------------------------------------------------------
  57.  
  58. :004010DE 813D04204000697A0000    cmp dword ptr [00402004], 00007A69    <--- Weird Compare ;)
  59. :004010E8 7504                    jne 004010EE                <--- If not equal we Jump to the CRC Message Box
  60. :004010EA C9                      leave
  61. :004010EB C21000                  ret 0010
  62.  
  63.  
  64.  
  65. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  66. |:004010E8(C)
  67. |
  68. :004010EE 6840100000              push 00001040
  69.  
  70. * Possible StringData Ref from Data Obj ->"ERROR"
  71.                                   |
  72. :004010F3 68BD204000              push 004020BD
  73.  
  74. * Possible StringData Ref from Data Obj ->"ERROR: Program has detected tampering. "
  75.                                         ->"Execution terminated"
  76.                                   |
  77. :004010F8 6881204000              push 00402081
  78. :004010FD FF3500204000            push dword ptr [00402000]
  79.  
  80. * Reference To: USER32.MessageBoxA, Ord:0000h
  81.                                   |
  82. :00401103 E84B000000              Call 00401153
  83.  
  84. ------------------------------------------------------------------------------------------------------------------------
  85.  
  86. Notice the 2 instructions above, weird... ;)
  87. That "jne 004010EE" Jumps to the CRC Message Box.
  88. So what are we going to do ???
  89. Very simple, because the value at Offset "00402004" needs to be "00007A69" but it isn't that value.
  90. So we're going to change the value "00007A69" into "00000000" and the program won't jump :)
  91. I assume you know how to change that in your Hex-Editor :)
  92. That's all.
  93.  
  94.  
  95. --->    Greetings...
  96.  
  97. Everyone from TrickSoft            (www.TrickSoft.net)
  98. Everyone from Cracking4Newbies        (www.Cracking4Newbies.com)
  99. Everyone from Keygenning4Newbies    (Keygenning4Newbies.cjb.net)
  100. And You...
  101.  
  102.             Don't trust the Outside, trust the InSiDe !!!
  103.  
  104.                       Cya...
  105.  
  106.                     CoDe_InSiDe
  107.  
  108. Email:    code.inside@home.nl