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

  1.  
  2.     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  3.     ▓▓    ____                     __       __           ▓▓▀█
  4.     ▓▓   /  _/_ _  __ _  ___  ____/ /____ _/ /           ▓▓ █▀█
  5.     ▓▓  _/ //  ' \/  ' \/ _ \/ __/ __/ _ `/ /            ▓▓ █ █
  6.     ▓▓ /___/_/_/_/_/_/_/\___/_/  \__/\_,_/_/             ▓▓ █ █
  7.     ▓▓   ____                          __          __    ▓▓ █ █     
  8.     ▓▓  / __ \___ ___ _______ ___  ___/ /__ ____  / /____▓▓ █ █ 
  9.     ▓▓ / /_/ / -_|_-</ __/ -_) _ \/ _  / _ `/ _ \/ __(_-<▓▓ █ █
  10.     ▓▓/_____/\__/___/\__/\__/_//_/\_,_/\_,_/_//_/\__/___/▓▓ █ █
  11.     ▓▓                                                   ▓▓ █ █
  12.     ▓▓      Web: http://www.ImmortalDescendants.com      ▓▓ █ █
  13.     ▓▓                Author: Volatility                 ▓▓ █ █
  14.     ▓▓                  Date: 04/29/99                   ▓▓ █ █
  15.     ▓▓  Topic: Nag/Time Limit Removal/Disabled Functions ▓▓ █ █
  16.     ▓▓            Level: Begginer/Intermediate           ▓▓ █ █
  17.     ▓▓                                                   ▓▓ █ █
  18.     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ █ █
  19.       █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄███████████ █
  20.         █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄███████████
  21.  
  22. INTRODUCTION:
  23.  
  24. This is going to be a rather "ugly" crack, and is not for COMPLETE newbies.
  25. The purpose of this essay is to approach as many different methods and
  26. techniques as I found in this program.  The end result, will be a completely
  27. functional program, which never expires... but there are much easier ways to
  28. reverse this target, in fact, I think there are many other possibilities.
  29. If you want a clean, efficient crack, this essay won't help you much.  But 
  30. if you're interested in really getting into the code, and maybe learning a
  31. few things, then read on!
  32.  
  33. TARGET INFORMATION:
  34.  
  35. Target: CGI*Star Pro v3.6 (csp32.exe) 1,249,280 bytes
  36. Location: http://ftpsearch.lycos.com/cgi-bin/search?form=lycosnet&query=csp32&
  37.           doit=Go+Get+It%21&filetype=All+files
  38. Tools: W32dasm, HIEW (or other hex editor), Filemon
  39.  
  40. PREPARE TO CRACK:
  41.  
  42. Let's run the program to see what kind of protection(s) it has.  First, we're
  43. confronted with a nag screen, that tells us "Note: This is an unregistered
  44. evaluation copy.  30 days remaining...."  Just from this, we know we'll have 
  45. to remove a nag screen, and a time limit.  Make a note of this string.
  46.  
  47. Click "Ok" on the nag, and the program will load.  We can see a message
  48. "CGI*StarPro - 30 days remaining" in the titlebar, another instance of the
  49. time limit check.  Make a note of this string too.
  50.  
  51. We won't worry about the "Register" button in this essay, although the program
  52. is much easier to crack using just this screen.  Click on each of the four
  53. buttons in the left-hand toolbar to see if we have any limitations, or disabled
  54. functions.  For each of the first three buttons, we're greeted with a message
  55. box, stating "Unregistered evaluation version. The SAVE buttons do not work !"
  56. Make a note of this string, and continue.  By clicking on any "save" buttons,
  57. we get the same message.  Now we should have enough info to get started.
  58.  
  59. MAKING THE CRACK:
  60.  
  61. Disassemble the program in Wdasm.  Once disassembled, Check The String Data
  62. Refereneces.  Let's look for the string from the initial nag screen "Note: This 
  63. is an unregistered evaluation copy.  30 days remaining....".  Double click on 
  64. it, and you should land here:
  65.  
  66. -------------------------------------------------------------------------------
  67. :00405067 833DA09A440000          cmp dword ptr [00449AA0], 00000000
  68. :0040506E 7534                    jne 004050A4
  69. :00405070 FF358C9A4400            push dword ptr [00449A8C]
  70.  
  71. * Possible StringData Ref from Data Obj ->"Note: This is an unregistered "
  72.                                         ->"evaluation copy. %d days remaining. "
  73.                                   |
  74. :00405076 6852A74400              push 0044A752
  75. :0040507B 68882B4800              push 00482B88
  76. :00405080 E837800100              call 0041D0BC
  77. :00405085 83C40C                  add esp, 0000000C
  78. :00405088 8B06                    mov eax, dword ptr [esi]
  79. :0040508A 6A40                    push 00000040
  80. -------------------------------------------------------------------------------
  81.  
  82. If we follow this routine further down, we can see references to other strings,
  83. such as "CGI*Star Pro has expired".  This is a good thing, because it means the
  84. entire routine is all in one place.
  85.  
  86. Let's change that conditional jump above, from jne to je.  Restart the program,
  87. and we have no nag!  Since we know the program has a 30-day time limit, let's
  88. set our system clock to at least 30 days ahead, and restart the program.
  89.  
  90. Now we get a message box stating "PROGRAM HAS EXPIRED. The SAVE buttons do not
  91. work anymore !".  So, let's look for this string now.  Double click on it, and
  92. you should land here:
  93.  
  94. -------------------------------------------------------------------------------
  95. :004050A4 833D9C9A440000          cmp dword ptr [00449A9C], 00000000
  96. :004050AB 7430                    je 004050DD
  97. :004050AD 8B06                    mov eax, dword ptr [esi]
  98. :004050AF 6A40                    push 00000040
  99.  
  100. * Possible StringData Ref from Data Obj ->"CGI*StarPro has expired."
  101.                                   |
  102. :004050B1 6825A94400              push 0044A925
  103.  
  104. * Possible StringData Ref from Data Obj ->"PROGRAM HAS EXPIRED. The SAVE "
  105.                                         ->"buttons do not work anymore !"
  106.                                   |
  107. :004050B6 68E8A84400              push 0044A8E8
  108. :004050BB FF700C                  push [eax+0C]
  109. :004050BE FF7068                  push [eax+68]
  110. :004050C1 E8C62D0300              call 00437E8C
  111. :004050C6 83C414                  add esp, 00000014
  112. -------------------------------------------------------------------------------
  113.  
  114. We can also see further down, a string that says "The program has expired! Will
  115. not write anything to files"  This is another good thing, because we know the
  116. entire routine is in one place.  So, as before, let's change the above 
  117. conditional jump from je to jne.  Restart the program, and we have no nag! But,
  118. we forgot to set our system time back, so do that, then restart again.  The nag
  119. is back!!!  We just changed the conditional jump to it's reverse... so let's 
  120. make the jump unconditional.
  121.  
  122. Change the jne, to a jmp.  Restart the program, and the nag is gone.  We've
  123. successfully removed the nags and time limit.  Now we want to remove the string
  124. that says "CGI*StarPro - 30 days remaining" in the titlebar, so search for this
  125. string.  Double click on it, and you should land here:
  126.  
  127. -------------------------------------------------------------------------------
  128. :00404CC5 8D5DF8                  lea ebx, dword ptr [ebp-08]
  129. :00404CC8 B802A34400              mov eax, 0044A302
  130. :00404CCD E80E6C0100              call 0041B8E0
  131. :00404CD2 833DA09A440000          cmp dword ptr [00449AA0], 00000000
  132. :00404CD9 753E                    jne 00404D19
  133. :00404CDB 833D9C9A440000          cmp dword ptr [00449A9C], 00000000
  134. :00404CE2 7518                    jne 00404CFC
  135. :00404CE4 FF358C9A4400            push dword ptr [00449A8C]
  136.  
  137. * Possible StringData Ref from Data Obj ->"CGI*StarPro - %d days remaining"
  138.                                   |
  139. :00404CEA 681DA54400              push 0044A51D
  140. :00404CEF 68F41B4600              push 00461BF4
  141. :00404CF4 E8C3830100              call 0041D0BC
  142. :00404CF9 83C40C                  add esp, 0000000C
  143.  
  144. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  145. |:00404CE2(C)
  146. |
  147. :00404CFC 833D9C9A440000          cmp dword ptr [00449A9C], 00000000
  148. :00404D03 7426                    je 00404D2B
  149.  
  150. * Possible StringData Ref from Data Obj ->"CGI*StarPro - Program Expired"
  151.                                   |
  152. :00404D05 683DA54400              push 0044A53D
  153. :00404D0A 68F41B4600              push 00461BF4
  154. :00404D0F E8A8830100              call 0041D0BC
  155. :00404D14 83C408                  add esp, 00000008
  156. :00404D17 EB12                    jmp 00404D2B
  157.  
  158. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  159. |:00404CD9(C)
  160. |
  161.  
  162. * Possible StringData Ref from Data Obj ->"CGI*StarPro"
  163.                                   |
  164. :00404D19 685BA54400              push 0044A55B
  165. -------------------------------------------------------------------------------
  166.  
  167. Again, we see more strings below.  This is a good thing.  We want the title bar
  168. to display ONLY "CGI*StarPro", and we can see that by changing the FIRST 
  169. conditional jump above, we can jump directly to this string.  So, change the
  170. first conditional jump from jne to je (it's always best to try and change the 
  171. least amount of bytes possible), and restart the program.  Now the title bar
  172. always displays only "CGI*StarPro".
  173.  
  174. Now all we have left are the disabled "Save" nags.  Let's search for the string
  175. "Unregistered evaluation version. The SAVE buttons do not work !".  Double click
  176. on it, and you should land here:
  177.  
  178. -------------------------------------------------------------------------------
  179. :0040EACE FF7508                  push [ebp+08]
  180. :0040EAD1 E876580000              call 0041434C
  181. :0040EAD6 59                      pop ecx
  182. :0040EAD7 833DA09A440000          cmp dword ptr [00449AA0], 00000000
  183. :0040EADE 7536                    jne 0040EB16
  184. :0040EAE0 8B5508                  mov edx, dword ptr [ebp+08]
  185. :0040EAE3 8B02                    mov eax, dword ptr [edx]
  186. :0040EAE5 6A40                    push 00000040
  187.  
  188. * Possible StringData Ref from Data Obj ->"CGI*StarPro Unregistered."
  189.                                   |
  190. :0040EAE7 68E74E4500              push 00454EE7
  191.  
  192. * Possible StringData Ref from Data Obj ->"Unregistered evaluation version. "
  193.                                         ->"The SAVE buttons do not work !"
  194.                                   |
  195. :0040EAEC 685C4E4500              push 00454E5C
  196. -------------------------------------------------------------------------------
  197.  
  198. I forgot to mention earlier, that it is always a good idea to check for more 
  199. than one instance of this string.  In the previous cases, we were ok, as there
  200. was only one instance, but in this case, there are FOUR routines.  The first
  201. three routines look similar to the above one, but the final instance has the
  202. conditional jump AFTER the string... not before.  In any case, let's change
  203. all the conditional jumps from jne to je, and vise versa.
  204.  
  205. NOTE: Up until this point, the author has kept the routines all in one place.
  206.       Now the routine is in four places, which indicates that the check is
  207.       performed for each of the four buttons on the toolbar.  This is most
  208.       likely inefficient programming, as he could have just referenced one
  209.       routine for each of the checks.  Or, he just decided to make it 
  210.       tougher for us :)
  211.  
  212. After changing all the conditional jumps, test all the buttons and functions.
  213. Looks like everything works!
  214.  
  215. We could quit here, but I decided I wanted to see if I could get rid of that
  216. ugly background bitmap that advertises other programs and such.  So, let's
  217. move the bitmap (CSPROBG.BMP) from the program directory, to a different one.
  218.  
  219. Restart the program, and we get a message box stating "Unable to load 
  220. background bitmap from resources".  After searching the String Refs of the
  221. program, we know that this comes from somewhere else.  So, run Filemon, and
  222. see which files the program accesses.
  223.  
  224. We can see that the program accesses a .dll file called "pvplus32.dll".  It
  225. looks like this is the right file, because the message box said "ProtoView"
  226. in the title bar, and if you view the properties of the .dll, it says
  227. "ProtoView Screen Management" under the Version tab.
  228.  
  229. Make a copy of the dll, and disassemble it.  The string is there, so double
  230. click it, and you should land here:
  231.  
  232. -------------------------------------------------------------------------------
  233. :10021857 833D8086021000          cmp dword ptr [10028680], 00000000
  234. :1002185E 0F8536000000            jne 1002189A
  235. :10021864 6808750210              push 10027508
  236.  
  237. * Possible StringData Ref from Data Obj ->"Unable to load background bitmap "
  238.                                         ->"from resources."
  239.                                   |
  240. :10021869 681CE00210              push 1002E01C
  241. :1002186E 68A08C0210              push 10028CA0
  242.  
  243. * Reference To: USER32.wsprintfA, Ord:0249h
  244.                                   |
  245. :10021873 FF154CF80210            Call dword ptr [1002F84C]
  246. -------------------------------------------------------------------------------
  247.  
  248. Change the above conditional jump from jne to je, and restart the program.  No
  249. annoying background!!!  You can now safely delete the bitmap, and either move
  250. the .dll back to c:\windows, or directly into the program directory.
  251.  
  252. NOTE: The LoadBitmapA function in Soft-Ice would have worked equally as well
  253.       in removing the bitmap function.
  254.  
  255. If you have any questions, feel free to e-mail me at
  256. Volatility@ImmortalDescendants.com or Volatility@prodigy.net.
  257. -------------------------------------------------------------------------------
  258. Copyright (c) 1999 Volatility And The Immortal Descendants
  259. All Rights Reserved
  260.