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

  1. *************************************************************************************************
  2.                     Win32Asm CrackMe 6
  3. *************************************************************************************************
  4.  
  5. Author:        Acid_Cool_178
  6. Protection:    Serial
  7. URL:        http://members.nbci.com/_XMCM/norskehf/crackmes/asm/ac_crackme_06.zip
  8. Tools:        W32Dasm
  9.  
  10.  
  11. --->    Intro...
  12.  
  13. Welcome to my next Tutorial !!!
  14. And just one Serial again (Including a bug ;)
  15.  
  16.  
  17. --->    Let's Begin...
  18.  
  19. Open the CrackMe and you'll see an EditBox and a Button.
  20. Fill in something in the EditBox and press the Button "Check" and you'll see the text:
  21.  
  22. "Keep on trying lamer"
  23.  
  24. hehe :)
  25. Keep that line in mind, now close the CrackMe and disassemble it in W32Dasm.
  26. Then click on "Strn Ref" (String Data References) and you'll see the line:
  27.  
  28. "Keep on trying lamer"
  29.  
  30. Double click on it and you'll see this:
  31.  
  32. -------------------------------------------------------------------------------------------------
  33.  
  34. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  35. |:004012AE(C)
  36. |
  37.  
  38. * Possible StringData Ref from Data Obj ->"Keep on trying lamer"
  39.                                   |
  40. :004012C2 68A2304000              push 004030A2
  41. :004012C7 FF35DC304000            push dword ptr [004030DC]
  42.  
  43. * Reference To: USER32.SetWindowTextA, Ord:0259h
  44.                                   |
  45. :004012CD E820010000              Call 004013F2
  46.  
  47. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  48. |:00401274(C), :0040127C(C), :004012C0(U)
  49. |
  50. :004012D2 E9AE000000              jmp 00401385
  51.  
  52. -------------------------------------------------------------------------------------------------
  53.  
  54. Ok, this text (Keep on trying lamer) will be displayed with the API SetWindowTextA.
  55. Notice the (C)onditional jump from Offset 004012AE, hmm... what's there? ;)
  56. Scroll a bit up till that Address and you'll see this:
  57.  
  58. -------------------------------------------------------------------------------------------------
  59.  
  60. :0040129D 68E0304000              push 004030E0            <--- Fake Serial
  61.  
  62. * Possible StringData Ref from Data Obj ->"Hellforge"
  63.                                   |
  64. :004012A2 68B7304000              push 004030B7            <--- Real Serial
  65.  
  66. * Reference To: KERNEL32.lstrcmpA, Ord:02D6h
  67.                                   |
  68. :004012A7 E870010000              Call 0040141C            <--- Compare those 2
  69. :004012AC 0BC0                    or eax, eax            <--- Check if EAX is 0
  70. :004012AE 7512                    jne 004012C2            <--- If so continue and we get the Good Guy Message, else continue to the Bad Guy Message
  71.  
  72. * Possible StringData Ref from Data Obj ->"You have cracked me"
  73.                                   |
  74. :004012B0 688E304000              push 0040308E
  75. :004012B5 FF35DC304000            push dword ptr [004030DC]
  76.  
  77. * Reference To: USER32.SetWindowTextA, Ord:0259h
  78.                                   |
  79. :004012BB E832010000              Call 004013F2
  80. :004012C0 EB10                    jmp 004012D2
  81.  
  82. -------------------------------------------------------------------------------------------------
  83.  
  84. See it Compares the Fake Serial with the Real Serial (Hellforge), now you probably immediately
  85. open the CrackMe and trying to enter "Hellforge" :)
  86. But it doesn't work, let's take a look what's more a bit up of this Code you'll see this:
  87.  
  88. -------------------------------------------------------------------------------------------------
  89.  
  90. :0040127E 6800020000              push 00000200
  91. :00401283 68E0304000              push 004030E0            <--- This is the place where our Fake Serial will be stored
  92. :00401288 FF35DC304000            push dword ptr [004030DC]
  93.  
  94. * Reference To: USER32.GetWindowTextA, Ord:015Bh
  95.                                   |
  96. :0040128E E829010000              Call 004013BC            <--- Call GetWindowTextA
  97. :00401293 68E0304000              push 004030E0            <--- Push the Address to our Fake Serial
  98.  
  99. * Reference To: USER32.CharLowerA, Ord:0020h
  100.                                   |
  101. :00401298 E8F5000000              Call 00401392            <--- Call CharLowerA
  102.  
  103. -------------------------------------------------------------------------------------------------
  104.  
  105. Hmm... you see that?
  106. It takes the Text from the EditBox with the API "GetWindowTextA" and then it makes all the Chars
  107. Lowercase, so if i entered:        CoDe_InSiDe
  108. then the result after this would be:     code_inside
  109. And then it Compares the Lowercased Serial with the Real Serial (Hellforge) ;)
  110. Now comes the bug to it's place you've probably allready seen it? ;)
  111.  
  112. When we arrive at the API "lstrcmpA" our Fake serial has only Lowercase Chars.
  113. But the Real Serial has 1 Uppercase Char the "H" from Hellforge :)
  114. So this CrackMe can't be cracked ;)
  115. Well, now you can Patch it in the way you want, i'm not going to explain what to Patch read my other Tutorials for that ;)
  116. It's very easy, you can Patch for instance the "jne 004012C2" or the "or eax, eax" :)
  117. That's All.
  118.  
  119.  
  120. --->    Greetings...
  121.  
  122. To be honest i'm getting a bit sick of these greetings everytime ;P
  123. So i'll just say:
  124.  
  125. Greetings to everyone i know, and to everyone who knows me, and You... ;P
  126.  
  127.  
  128.             Don't trust the Outside, trust the InSiDe !!!
  129.  
  130.                       Cya...
  131.  
  132.                     CoDe_InSiDe
  133.  
  134.  
  135. Email:    code.inside@home.nl
  136. Homepage: http://codeinside.cjb.net