home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / CrackMesCbjNet / lsdv1point0_patch_tut.txt < prev    next >
Encoding:
Text File  |  2001-09-21  |  8.0 KB  |  268 lines

  1. How to patch LSDv1point0 Crackme by WebMasta(webmasta@pgc-force.com)
  2. --------------------------------------------------------------------
  3.  
  4. Tutorial by CraXor
  5. ------------------
  6.  
  7. Tools needed:
  8. -------------
  9.  
  10. SoftIce 4.05 ( or anything from 3.24 )
  11. Hiew6 ( for patching the damn thing )
  12. Win32Dasm8 + vb patch (for dissassembly)
  13. RTD WinPatch ( for creating an exe -> my asm is not so good)
  14.  
  15. Brain and Zen :)
  16.  
  17.  
  18. Start:
  19. ------
  20.  
  21. Ok Let's begin I was sent this Crackme via Irc by another online cracker :)
  22.  
  23. So first things first :
  24.  
  25. Dissassemble lsdv1point0.exe ( very fast)
  26.  
  27. ok so the very first thing we see is this :
  28.  
  29.    Import Module 001: MSVBVM60.DLL
  30.  
  31. This means it is a Visual Basic App and thus very crappy to crack :)
  32.  
  33. so now minimize the dissassembly window and run the program ...
  34.  
  35. Type in your name and key :
  36.  
  37. User Name : Cracked by CraXor
  38.  
  39. Registration Code : 123456789
  40.  
  41. ok click 'Register'
  42.  
  43. OOps ! Invalid registr..... blah blah ( Note the caption of the msgbox 'Error')
  44.  
  45. ok back in W32dasm look for the string ref 'Error' , once found double click it 
  46.  
  47. and lets see where we are now :
  48.  
  49.  
  50. * Reference To: MSVBVM60.__vbaVarTstNe, Ord:0000h
  51.                                   |
  52. :00402B6F E816E7FFFF              Call 0040128A                       ; Serial test maybe ? 
  53. :00402B74 66898520FFFFFF          mov word ptr [ebp+FFFFFF20], ax
  54. :00402B7B 8D4DBC                  lea ecx, dword ptr [ebp-44]
  55.  
  56. * Reference To: MSVBVM60.__vbaFreeObj, Ord:0000h
  57.                                   |
  58. :00402B7E E8F5E6FFFF              Call 00401278                       ; Free str ?
  59. :00402B83 8D4DAC                  lea ecx, dword ptr [ebp-54]
  60.  
  61. * Reference To: MSVBVM60.__vbaFreeVar, Ord:0000h
  62.                                   |
  63. :00402B86 E8E7E6FFFF              Call 00401272                       ; Free variable ?
  64. :00402B8B 0FBF8520FFFFFF          movsx eax, word ptr [ebp+FFFFFF20]
  65. :00402B92 85C0                    test eax, eax ; MMmm test 
  66. :00402B94 0F84BD000000            je 00402C57                         ; Bad Boy / Good Boy
  67. :00402B9A C7458404000280          mov [ebp-7C], 80020004
  68. :00402BA1 C7857CFFFFFF0A000000    mov dword ptr [ebp+FFFFFF7C], 0000000A
  69. :00402BAB C7459404000280          mov [ebp-6C], 80020004
  70. :00402BB2 C7458C0A000000          mov [ebp-74], 0000000A
  71.  
  72. * Possible StringData Ref from Code Obj ->"Error"
  73.                                   |
  74. :00402BB9 C78564FFFFFFBC234000    mov dword ptr [ebp+FFFFFF64], 004023BC ; We end up here !
  75. :00402BC3 C7855CFFFFFF08000000    mov dword ptr [ebp+FFFFFF5C], 00000008
  76. :00402BCD 8D955CFFFFFF            lea edx, dword ptr [ebp+FFFFFF5C]
  77. :00402BD3 8D4D9C                  lea ecx, dword ptr [ebp-64]
  78.  
  79. * Reference To: MSVBVM60.__vbaVarDup, Ord:0000h
  80.                                   |
  81. :00402BD6 E88BE6FFFF              Call 00401266
  82.  
  83. * Possible StringData Ref from Code Obj ->"User Name or Registration Code "
  84.                                         ->"is Incorrect, please Call Technical "
  85.                                         ->"Support if you have purchased "
  86.                                         ->"a LSD v1.0 key!"
  87.                                   |
  88. :00402BDB C78574FFFFFFD4224000    mov dword ptr [ebp+FFFFFF74], 004022D4
  89.  
  90.  
  91.  
  92. Ok so after that code listing has confused the hell out of you ;) hehe
  93.  
  94. If we scroll up a bit we see :
  95.  
  96. :00402B92 85C0                    test eax, eax                       ; MMmm test 
  97. :00402B94 0F84BD000000            je 00402C57                         ; Bad Boy / Good Boy
  98.  
  99. mmm note this address's Offset : '2b94' 
  100. ( look at the bottom of the windasm screen when you put the blue bar over the above code )
  101.  
  102. ok double click the 'Error' string ref again ...
  103.  
  104. we end up here :
  105.  
  106. * Reference To: MSVBVM60.__vbaVarTstNe, Ord:0000h
  107.                                   |
  108. :00403018 E86DE2FFFF              Call 0040128A                          ; Test serial
  109. :0040301D 0FBFC0                  movsx eax, ax
  110. :00403020 85C0                    test eax, eax
  111. :00403022 0F84E1000000            je 00403109                            ; Good boy / Bad Boy
  112. :00403028 C785A8FEFFFF04000280    mov dword ptr [ebp+FFFFFEA8], 80020004
  113. :00403032 C785A0FEFFFF0A000000    mov dword ptr [ebp+FFFFFEA0], 0000000A
  114. :0040303C C785B8FEFFFF04000280    mov dword ptr [ebp+FFFFFEB8], 80020004
  115. :00403046 C785B0FEFFFF0A000000    mov dword ptr [ebp+FFFFFEB0], 0000000A
  116.  
  117. * Possible StringData Ref from Code Obj ->"Error"
  118.                                   |
  119. :00403050 C78588FEFFFFBC234000    mov dword ptr [ebp+FFFFFE88], 004023BC ; We end up here
  120. :0040305A C78580FEFFFF08000000    mov dword ptr [ebp+FFFFFE80], 00000008
  121. :00403064 8D9580FEFFFF            lea edx, dword ptr [ebp+FFFFFE80]
  122. :0040306A 8D8DC0FEFFFF            lea ecx, dword ptr [ebp+FFFFFEC0]
  123.  
  124. so as you can see if we scroll up a bit we see :
  125.  
  126. :00403020 85C0                    test eax, eax
  127. :00403022 0F84E1000000            je 00403109                            ; Good boy / Bad Boy
  128.  
  129. so note this address's Offset '3022'
  130.  
  131.  
  132. Ok now you have two places to patch ....
  133.  
  134. but !!! if you patch them it still says " User name invalid ..." !!! BLAH
  135.  
  136. Ok Now to take some TOUGH action !
  137.  
  138. Load Symbol loader ... Load the Export MSVbVM60.dll in your windows/system directory
  139.  
  140. now load the file 'lsdv1point0.exe'
  141.  
  142. to make things easy:
  143.  
  144. So in Windasm we noticed three main vb calls everytime :
  145.  
  146. __vbaVarTstne ; This one we'll use
  147. __vbafreeObj
  148. __vbafreevar
  149.  
  150.  
  151. so we're gonna break on __vbaVarTstNe
  152.  
  153. run the proggie through Symbol loader :
  154.  
  155.  
  156. when softice breaks at the EP ( entry point) :
  157.  
  158. type : 'bpx msvbvm60!__vbavarTstNe' 
  159.  
  160. NB!
  161. ---
  162.  
  163. Note the usage of 'msvbvm60! this is very important in any vb program you are trying to crack 
  164. !!!!
  165.  
  166. k lets continue :
  167. -----------------
  168.  
  169. and then press CTRL+D to return to the proggie ...
  170.  
  171. Type in your name and reg key :
  172.  
  173. User Name : Cracked by CraXor
  174. Registration Code : 123456789
  175.  
  176. ok Click 'Register'
  177.  
  178. bOOM! SoftIce breaks ... type " P RET" to return to the calling function :
  179.  
  180.  
  181. * Reference To: MSVBVM60.__vbaVarTstNe, Ord:0000h
  182.                                   |
  183. :00403018 E86DE2FFFF              Call 0040128A
  184. :0040301D 0FBFC0                  movsx eax, ax
  185. :00403020 85C0                    test eax, eax
  186. :00403022 0F84E1000000            je 00403109 ; Change this !!!!
  187.  
  188. so we see our old friend .... in SoftIce type : 'R FL Z' 
  189.  
  190. it changes the Zero Register Flag
  191.  
  192. ok then trace with F10 .... 
  193.  
  194. till you get here :
  195.  
  196. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  197. |:0040322D(U)
  198. |
  199. :004037AA 83BDFCFDFFFF00          cmp dword ptr [ebp+FFFFFDFC], 00000000
  200. :004037B1 0F857BFAFFFF            jne 00403232          ; OOOOO NASTY BOY !
  201.  
  202. if you have traced through a couple of times you'll see that the above line :
  203.  
  204. :004037B1 0F857BFAFFFF            jne 00403232          ; OOOOO NASTY BOY !
  205.  
  206. Needs to be changed to je 403232
  207.  
  208. So note the addy ! '4037b1'
  209.  
  210. Fire up Windasm and click on 'Goto' then type in the addy 
  211.  
  212. You'll end up here :
  213.  
  214. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  215. |:0040322D(U)
  216. |
  217. :004037AA 83BDFCFDFFFF00          cmp dword ptr [ebp+FFFFFDFC], 00000000
  218. :004037B1 0F857BFAFFFF            jne 00403232          ; Change me plz :)
  219.  
  220. ok note the offset '37b1'
  221.  
  222.  
  223. Ok close windasm and fire up Hiew !
  224.  
  225. ok start hiew eg. 'Hiew lsdv1point0.exe'
  226.  
  227. ok press the enter-key three times to get to the asm code ;)
  228.  
  229. now press F5 and type in your first offset '3022'
  230.  
  231. ok now press F3 and change the 0F84E1000000 to 0F85E1000000
  232.  
  233. ok now repeat for the other two ... You basicly change the current to its opposite 
  234. eg.
  235.  
  236. 0F85 ==> 0F84
  237. 0F84 ==> 0F85
  238.  
  239.  
  240. Ok Press F9 ( to save the file )
  241.  
  242. and Wolla you have a cracked CrackMe ! :) 
  243.  
  244. type in any name and serial ( Note please enter at least one char for the Name input box or 
  245. else the proggie will blow up in yer face ;))
  246.  
  247. and wolla ! you are registered ...
  248.  
  249. Finale
  250. ------
  251.  
  252. This took me about half an hour and next I'm gonna try to find the right serial ... so maybe 
  253. you'll see another tut from me ( This was my first )
  254.  
  255. Any Feedback can be sent to koos1@ign.com
  256.  
  257. Cheers !
  258.  
  259. Greets
  260. ------
  261. Webmasta for his crackme's ( Xtreme2 hints plz ! ;))
  262.  
  263. All the ppl on #cracking4newbies,tKc,Arthaxerxes,R!Sc,Anynomous lurker and all those ppl who 
  264. write Tutors and help us Newbies ! 
  265.  
  266. Knowledge is Power !
  267.  
  268. CraXor