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

  1. Tutorial for Crackme vW2 [hf]
  2. by Sanhedrin
  3.  
  4. Tools:
  5. W32Dasm
  6.  
  7.  
  8. This crackme requires two serials, and requires that we not use a debugger.  Let's begin.  
  9. Disassemble the file, and look at the String Data References.  The reference to 'Well done'
  10. looks like a ggod place to start.  Just above the reference you will notice that there is a
  11. jz indicator.  Another good indication that something was calculated.  The best way of 
  12. cracking this program is to see exactly what appears just before a 'jump if' line.  
  13. Enough talking, here is the code:
  14.  
  15.  
  16. * Possible StringData Ref from Code Obj ->"Delphi" <---hmmm, the first serial maybe
  17.                                   |
  18. :00421DC1 BA201F4200              mov edx, 00421F20
  19. :00421DC6 E8A916FEFF              call 00403474<---call the compare code of our serial to the real one
  20. :00421DCB 0F8522010000            jne 00421EF3<---jump if not equal
  21. :00421DD1 8D55FC                  lea edx, dword ptr [ebp-04]
  22. :00421DD4 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  23. :00421DDA E879FAFEFF              call 00411858
  24. :00421DDF 8B45FC                  mov eax, dword ptr [ebp-04]
  25. :00421DE2 E84117FEFF              call 00403528
  26. :00421DE7 E89437FEFF              call 00405580
  27. :00421DEC 83F809                  cmp eax, 00000009<---compare second serial to 9 characters
  28. :00421DEF 0F85FE000000            jne 00421EF3<---jump if not the same
  29. :00421DF5 8D55FC                  lea edx, dword ptr [ebp-04]
  30. :00421DF8 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  31. :00421DFE E855FAFEFF              call 00411858
  32. :00421E03 8B45FC                  mov eax, dword ptr [ebp-04]
  33. :00421E06 803848                  cmp byte ptr [eax], 48<---compare 1st character to 048h
  34. :00421E09 0F85E4000000            jne 00421EF3<---jump if not the same
  35. :00421E0F 8D55FC                  lea edx, dword ptr [ebp-04]
  36. :00421E12 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  37. :00421E18 E83BFAFEFF              call 00411858
  38. :00421E1D 8B45FC                  mov eax, dword ptr [ebp-04]
  39. :00421E20 80780165                cmp byte ptr [eax+01], 65<---compare 2nd character to 065h
  40. :00421E24 0F85C9000000            jne 00421EF3<---jump if not the same
  41. :00421E2A 8D55FC                  lea edx, dword ptr [ebp-04]
  42. :00421E2D 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  43. :00421E33 E820FAFEFF              call 00411858
  44. :00421E38 8B45FC                  mov eax, dword ptr [ebp-04]
  45. :00421E3B 8078026C                cmp byte ptr [eax+02], 6C<---compare 3rd character to 06Ch
  46. :00421E3F 0F85AE000000            jne 00421EF3<---jump if not the same
  47. :00421E45 8D55FC                  lea edx, dword ptr [ebp-04]
  48. :00421E48 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  49. :00421E4E E805FAFEFF              call 00411858
  50. :00421E53 8B45FC                  mov eax, dword ptr [ebp-04]
  51. :00421E56 8078036C                cmp byte ptr [eax+03], 6C<---compare 4th character to 06Ch
  52. :00421E5A 0F8593000000            jne 00421EF3<---jump if not the same
  53. :00421E60 8D55FC                  lea edx, dword ptr [ebp-04]
  54. :00421E63 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  55. :00421E69 E8EAF9FEFF              call 00411858
  56. :00421E6E 8B45FC                  mov eax, dword ptr [ebp-04]
  57. :00421E71 80780466                cmp byte ptr [eax+04], 66<---compare 5th character with 066h
  58. :00421E75 757C                    jne 00421EF3<---jump if not the same
  59. :00421E77 8D55FC                  lea edx, dword ptr [ebp-04]
  60. :00421E7A 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  61. :00421E80 E8D3F9FEFF              call 00411858
  62. :00421E85 8B45FC                  mov eax, dword ptr [ebp-04]
  63. :00421E88 8078056F                cmp byte ptr [eax+05], 6F<---compare 6th character with 06Fh
  64. :00421E8C 7565                    jne 00421EF3<---jump if not the same
  65. :00421E8E 8D55FC                  lea edx, dword ptr [ebp-04]
  66. :00421E91 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  67. :00421E97 E8BCF9FEFF              call 00411858
  68. :00421E9C 8B45FC                  mov eax, dword ptr [ebp-04]
  69. :00421E9F 80780672                cmp byte ptr [eax+06], 72<---compare 7th character with 072h
  70. :00421EA3 754E                    jne 00421EF3<---jump if not the same
  71. :00421EA5 8D55FC                  lea edx, dword ptr [ebp-04]
  72. :00421EA8 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  73. :00421EAE E8A5F9FEFF              call 00411858
  74. :00421EB3 8B45FC                  mov eax, dword ptr [ebp-04]
  75. :00421EB6 80780767                cmp byte ptr [eax+07], 67<---compare 8th character with 067h
  76. :00421EBA 7537                    jne 00421EF3<---jump if not the same
  77. :00421EBC 8D55FC                  lea edx, dword ptr [ebp-04]
  78. :00421EBF 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  79. :00421EC5 E88EF9FEFF              call 00411858
  80. :00421ECA 8B45FC                  mov eax, dword ptr [ebp-04]
  81. :00421ECD 80780865                cmp byte ptr [eax+08], 65<---compare 9th character with 065h
  82. :00421ED1 7520                    jne 00421EF3<---jump if not the same
  83.  
  84. * Possible StringData Ref from Code Obj ->"Well done"
  85.                                   |
  86. :00421ED3 BA301F4200              mov edx, 00421F30
  87. :00421ED8 8B83B0010000            mov eax, dword ptr [ebx+000001B0]
  88. :00421EDE E8A5F9FEFF              call 00411888
  89.  
  90. * Possible StringData Ref from Code Obj ->"Now write a tut"
  91.                                   |
  92. :00421EE3 BA441F4200              mov edx, 00421F44
  93. :00421EE8 8B83B4010000            mov eax, dword ptr [ebx+000001B4]
  94. :00421EEE E895F9FEFF              call 00411888
  95.  
  96. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  97. |:00421DCB(C), :00421DEF(C), :00421E09(C), :00421E24(C), :00421E3F(C)<---all jne calls
  98. |:00421E5A(C), :00421E75(C), :00421E8C(C), :00421EA3(C), :00421EBA(C)
  99. |:00421ED1(C)
  100. |
  101. :00421EF3 33C0                    xor eax, eax
  102. :00421EF5 5A                      pop edx
  103. :00421EF6 59                      pop ecx
  104. :00421EF7 59                      pop ecx
  105. :00421EF8 648910                  mov dword ptr fs:[eax], edx
  106.  
  107.  
  108. Put all of that together and you are left with:
  109.  
  110. Delphi
  111. Hellforge
  112.  
  113.  
  114. Thanks to all of those coders that make these crackmes, to Pepper for sending me on the 
  115. right path so long ago and of course to Eternal Bliss.
  116.  
  117.  
  118. Sanhedrin
  119. stachi@geocities.com