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

  1. Tutorial for Crackme Stx_cm3 (tC...)
  2. by Sanhedrin
  3.  
  4. Tools
  5. Wdasm
  6. Softice
  7. HIEW
  8.  
  9.  
  10. --INTRODUCTION--
  11.  
  12. This crackme requires that you kill the nag screen without changing more than 2 bytes.  So let's 
  13. start the program.  The first thing that happens is an annoying nag screen asking for $500.  
  14. Sounds about right.  In the program itself there doesn't appear to be anything disabled, 
  15. but when we exit the program, the nag screen appears again.
  16.  
  17. --TRACING THE CODE--
  18.  
  19. Disassemble this crackme, then startup softice with the breakpoint:
  20.  
  21. bpx messageboxa
  22.  
  23. Start the program and immediately we are back into softice.  Press F11 to see the nag, then 
  24. press OK on the nag to break back into softice.  You should be here:
  25.  
  26. * Reference To: user32.MessageBoxA, Ord:0000h
  27.                                   |
  28. :0043EFDE E87572FCFF              Call 00406258
  29. :0043EFE3 33D2                    xor edx, edx<---you will land here
  30. :0043EFE5 8B83C8020000            mov eax, dword ptr [ebx+000002C8]
  31. :0043EFEB E8A82EFEFF              call 00421E98
  32. :0043EFF0 5B                      pop ebx
  33. :0043EFF1 C3                      ret
  34.  
  35.  
  36. Press F10 to see where this was called from, and stop at 0043973F.
  37.  
  38.  
  39. :00439721 8D4000                  lea eax, dword ptr [eax+00]
  40. :00439724 53                      push ebx
  41. :00439725 6683B86602000000        cmp word ptr [eax+00000266], 0000
  42. :0043972D 7410                    je 0043973F
  43. :0043972F 8BD8                    mov ebx, eax
  44. :00439731 8BD0                    mov edx, eax
  45. :00439733 8B8368020000            mov eax, dword ptr [ebx+00000268]
  46. :00439739 FF9364020000            call dword ptr [ebx+00000264]
  47.  
  48. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  49. |:0043972D(C)
  50. |
  51. :0043973F 5B                      pop ebx<---you will land here
  52. :00439740 C3                      ret
  53.  
  54. Notice the jump reference at 0043972D.  Write this down and we will search for it in Wdasm.  
  55. Let's continue gathering data for our crack first.  Press F5 to exit softice, then cloes the
  56. crackme )make sure that you have not disabled the breakpoint first).  Once again you will 
  57. break into softice, press F11 to see the nag screen, and click on OK to break back into 
  58. softice.  You should be at the same spot as the first nag: 0043EFE3 (see above).  Press 
  59. F10 and stop right after the return call:
  60.  
  61.  
  62. :0043709B 8945FC                  mov dword ptr [ebp-04], eax
  63. :0043709E 8B45FC                  mov eax, dword ptr [ebp-04]
  64. :004370A1 6683B8B602000000        cmp word ptr [eax+000002B6], 0000
  65. :004370A9 7441                    je 004370EC
  66. :004370AB 33C0                    xor eax, eax
  67. :004370AD 55                      push ebp
  68. :004370AE 68D5704300              push 004370D5
  69. :004370B3 64FF30                  push dword ptr fs:[eax]
  70. :004370B6 648920                  mov dword ptr fs:[eax], esp
  71. :004370B9 8B5DFC                  mov ebx, dword ptr [ebp-04]
  72. :004370BC 8B55FC                  mov edx, dword ptr [ebp-04]
  73. :004370BF 8B83B8020000            mov eax, dword ptr [ebx+000002B8]
  74. :004370C5 FF93B4020000            call dword ptr [ebx+000002B4]
  75. :004370CB 33C0                    xor eax, eax<---you will land here
  76. :004370CD 5A                      pop edx
  77. :004370CE 59                      pop ecx
  78. :004370CF 59                      pop ecx
  79.  
  80. Once again, notice the jump reference at 004370A9.  Write this down, disable the breakpoints in 
  81. softice, and go into you disassembler.  Search for the first location:
  82.  
  83. 0043972D
  84.  
  85. and write down the offset.  Do the same for the second location:
  86.  
  87. 004370A9
  88.  
  89. Go into Hacker's View and change both je to jne (74 to 75) and the nag screens are gone.
  90.  
  91. I have a patcher (C++), and will email the source code to anyone wishing to learn more 
  92. about patching.
  93.  
  94.  
  95. Greets to tC...
  96.  
  97. Thanks to all of those coders that make these crackmes, to Pepper for sending me on the 
  98. right path so long ago and of course to Eternal Bliss.
  99.  
  100.  
  101. Sanhedrin
  102. stachi@geocities.com