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

  1. HOW TO CRACK, by +ORC, A TUTORIAL
  2.  
  3.  
  4.                          Lesson 4 (2):Time protections, part 2
  5.                             A little Micro$oft bashing :=)
  6.  
  7.           [MS-WINPROJECT] [MS PUBLISHER 97] [MS-MONEY 94] [MS MONEY 97]
  8.  
  9.  
  10.   
  11.  
  12.   (Hic sunt tabulae: Best viewed with good old Courier New 8)
  13.  
  14.  
  15.      Well well well, my dear friends, it's April, the "opening"
  16. month, when trees unfold and the womb of nature opens with young life...
  17. about time we start with the REAL work, and what I mean is that we
  18. begin damaging Microsoft interests... the real ones. I will therefore 
  19. teach you here how to crack Microsoft's ubiquitous "trial version 
  20. time protection".
  21.  
  22.      The typical Micro$oft's trial limit (of three months) is a
  23. clever marketing approach per se: I'm speaking of the "trial" version
  24. of their programs that you are supposed to use and enjoy for 90 days,
  25. until a screen reminds you that you WILL not be able to use it any more, 
  26. coz the 90 days are over, please pay. Note the clever touch of  90 (instead 
  27. of 30) days: three months are more than enough to get you real hooked on a
  28. program, especially huge monstrosities of the complexity of MS overbloated
  29. applications... it's a much better period than the usual "30 days" 
  30. flavour that we find around in common shareware.
  31.  
  32.      Since Micro$oft makes the bulk of its money from software
  33. sold to corporate executives, senior sparer and assorted yuppies, it
  34. suits us well to crack as first example of this lesson, Microsoft PROJECT,
  35. one of those ridiculous "yuppie" programs that allow you to "plan"
  36. and "schedule" an activity or a project of your "team"... as if we
  37. were all time-slaves like those idiots... besides I may as well use this
  38. crap to program the nice "activities" of my +HCU's cracking units :=)
  39.  
  40.      I'm therefore cracking here the 90 days trial version of
  41. MSOFFICE WINDOWS PROJECT Version 4.1 of august 1995  which has the
  42. protection hidden inside the monstrous WINPROJ.EXE (4.240.896 bytes of
  43. overbloated bad programming). The error and protection messages dwell inside 
  44. winproj.DLG (overbloated dialogues of 1.179.822 bytes).
  45.  
  46.      We'll begin with this somewhat "older" example of the ubiquitous 
  47. "MS-trial" protection scheme (from 1995), since, as I have already told 
  48. you elsewhere, the *history* and the *evolution* of protection schemes 
  49. are powerful additional WEAPONS, that a cracker can use to defeat
  50. more complex schemes that may not be so evident if you cannot recognise 
  51. their "physiognomy" at the first glance (or if you do not yet "feel" them :=) 
  52.  
  53. We'll crack in this lesson a Microsoft program from 1994, another one from 
  54. 1995 (this first one) and two from 1997. I believe this should give you a 
  55. wide enough palette of MS-protections, and that with this knowledge you 
  56. should be able to crack every single piece of software Microsoft may throw 
  57. at you in the next couple of years (at least :=)
  58.  
  59.      You'll see for instance that the "cmp eax,ecx" instruction
  60. at the heart of some of these MS-schemes is a constant characteristic,
  61. that you'll meet again and again, which differs from the typical "beggar off
  62. on bad flag ax" setting that the shareware authors usually use.
  63.  
  64. A SMALL THEORETHICAL DIGRESSION
  65.  
  66. First of all, before entering the guts of MS-cracking, a small "theoretical" 
  67. digression.
  68.  
  69. From a cracker's point of view, the new "trend" to give away full time 
  70. limited versions of a software packages is extremely interesting:
  71. once you defeat the time checking routines (... plural coz there may
  72. be much more than one inside the same program) your work is done and
  73. you'll immediately enjoy the full application. 
  74.  
  75.      The reason behind this trend (from password to time-trial)
  76. is quite simple: password-serial number protections are useless on a Web
  77. which abounds with free pirated serial number listings (I saw one with 54.000 different serial numbers-registration strings couples!) that anybody with intelligence level "amoeba" can easily find. I do not like serial number collectors: they do not teach anything, in my (admittely biased) opinion they just steal... fact is anyway, that the mere existence of such huge ready-made password listings has nuked any programmer's confidence in the serial/string protection approach (whose cracking techniques I have explained elsewhere in this tutorial), and this is the more true for "commercial" (i.e. "non toy") applications.
  78.  
  79.      You will find therefore, for big commercial application, the
  80. "Cinderella" protections (you may use this app for 30 days) or
  81. the "quiver" protections (you may use this app 30 times), or a combination of these two kinds, or a combination of both kinds PLUS the registration
  82. string/serial number protection method.
  83.  
  84.      One of the (minor) problems for us nice crackers is that
  85. with this kind of protections we may have some surprises later on... i.e. you crack your target and it works fine... well past the date it should have
  86. been crippled upon, WHEN YOU SET this DATE INSIDE YOUR OS but -alas!- it stops miserably working WHEN THE REAL TIME "of the world" has passed that cap... this has to do with OTHER protections, checking randomly, for instance, the date of some UNRELATED FILES on your hard disk.
  87.  
  88.      Obviously this does not concern us much... as soon as this
  89. happen we crack this "second level" protection scheme too, happily drinking
  90. another Martini-Wodka (use only Moskowskaja and add some Indian tonic
  91. Schweppes and a zest of lemon if you want to taste something
  92. that's really good) and forget the whole incident... but I had
  93. to mention it right now because I honestly DO NOT KNOW YET if
  94. some of the programs that I'll crack in these lessons do have or
  95. not such additional protections, nor have I the time to feel if
  96. there are other protections inside overbloated 5 million bytes
  97. horrors once I have already found the first (and maybe only) one,
  98. nor have I envy to wait 90 days just to see if something else
  99. snaps... should it happen (which I DO NOT believe, seen how
  100. primitive MS-protections look like) I'll then simply add the new
  101. crack to this section, we'll see.
  102. ---------------------------------------------
  103.  
  104. Some elementary MUST KNOW when you crack time protections:
  105. Date and Time stamps in the root directory (old flavour)
  106.  
  107.      The root directory (in DOS) is a simple table of 32-byte
  108. entries, defining each file on the root directory. Bytes 0-7 have
  109. the file name, 8-10 have the file extension, 11 hydes the
  110. attribute flags, 12-21 are at times used for other protection
  111. tricks, 22-23 have the *TIME* stamp, 24-25 have the *DATE* stamp,
  112. 26-27 the starting cluster number and 28-31 the file size.
  113.  
  114.      The date and time stamps can record any date from January
  115. 1, 1980 through December 31, 2099. The time stamp is accurate to
  116. two seconds. The date and time stamps are each 2 byte values that
  117. are recorded by using the following equations:
  118.  
  119.        DATE = DAY+64*MONTH+512*(YEAR-1980)
  120.  
  121.        TIME = SECONDS/2+32*MINUTES+2048*HOURS
  122.  
  123.      In the time entry, the hour occupies the first 5 bits, the
  124. minutes the next 6, and the second the last 5. The seconds are
  125. actually stored as the number of seconds divided by 2, so the
  126. clock is accurate to 2 seconds. In the date entry, the year
  127. (subtracted from 1980... that is 0x7bc) is stored in the first
  128. 7 bits, the month in the next 4 and the day in the last 5 bits.
  129.  
  130. How do we recover these values? Here the commonest tricks:
  131.  
  132. seconds   AND byte 22 with 11111; then multiply by 2
  133. Minutes   AND byte 23 with 111; then shift left 3 and
  134.           add byte 23 shifted right 5
  135. Hours          Shift byte 23 right 3
  136. Day       AND byte 24 with 11111
  137. Month          AND byte 25 with 1, Multiply by 8 and 
  138.           add byte 24 shifted right 5
  139. Year      Add byte 25 to 1980 (0x7cb) and shift right 1
  140.  
  141.      I hope you have the intelligence to understand by yourself
  142. why these methods work... the point is that as soon as you see
  143. something like that going on in the code you are examining, you
  144. will know that they are fiddling with date or time stamps (may
  145. be necessary, for instance, in order to reset the date and time
  146. stamps of an opened file without leaving any trace behind).
  147.  
  148. How does a programmer fetch the date? He uses the _dos_getdate
  149. function.
  150.  
  151. The _dos_getdate function uses system call 0x2A to get the
  152. current system date.  The date information is returned in a 
  153. dosdate_t structure pointed to by date.
  154. Synopsis:
  155. #include [dos.h]
  156. void _dos_getdate( struct dosdate_t *date );
  157.  
  158. struct dosdate_t {
  159.         unsigned char day;      /* 1-31 */
  160.         unsigned char month;    /* 1-12 */
  161.         unsigned short year;    /* 1980-2099 */
  162.         unsigned char dayofweek;/* 0-6 (0=Sunday) */
  163. };
  164.  
  165. -------------------------------------------------------
  166.  
  167. AND NOW RUB YOUR HANDS: TO WORK!
  168.  
  169.      And now rub your hands: to work!   Fetch your copy of the
  170. time limited version of  Winproj.exe (you'll find it on the
  171. web... many magazines in Europe have published it on their cover
  172. CD at the beginning of this year... The one I use here is taken
  173. from a second-hand French magazine I found in Basel some time
  174. ago: PCMAG n.108)
  175.  
  176. Well how do we proceed?
  177. As usual: Let's dead list everything (but you could get pretty
  178. quickly to the "hollow" point of your target through winice, is
  179. a matter of aesthetic choice, I prefer dead listing because it
  180. is more "relaxed" but you may use a combination of both
  181. approaches or whatever you like most).
  182.  
  183.      First thing you notice is that the dead listing is HUGE:
  184. more than 50 megabytes of text. You'll need a good wordprocessor
  185. to handle that... Microsoft's last one, word version 7.0 does not
  186. even accept such files, but look! Word 2 (the old version of
  187. Word, 1992 vintage) does run them (almost) without problems (you
  188. would not -obviously- have such problems under dos or linux).
  189. It's quite ironic, I believe, that Word 7 cannot open such a
  190. file, but on the contrary Word 2 ('92 version!) is capable of
  191. doing it... this confirms what I always supposed: huge
  192. overbloated programming is getting worse and worse... humanity
  193. has probably already entered one of its many phases of decadence
  194. :=)
  195.  
  196. LET'S SURPRISE THE PROTECTION SCHEME FROM BEHIND
  197. We can get to the protection scheme of this target in many ways
  198. (and there are yet many more... almost as many as you fancy).
  199. Usually, to defeat these protections the traditional approach is
  200. to set the OS date past the trial period, run the target,
  201. individuate the nag screen as soon as it snaps, get the maximuml
  202. information about it (comprised its pixel dimensions) and then
  203. breakpoint it using some of these data) for instance (with
  204. winice) bpx on MessageBox (MessageBoxA to be exact). Remember
  205. that with Godot (Winice 3.0), you can use CONDITIONAL
  206. EXPRESSIONS! Say that the hwnd command gave you 09017E as handle
  207. for the nagscreen (this value will be different EVERY time you
  208. run your target), then you can selective breakpoint on it with:
  209.  
  210.           :bpx MessageBoxA IF ((ESP->4) == 09017E)
  211.  
  212. since all Win32 applications pass parameters on the stack
  213. enetering a function and  the first parameter has a positive
  214. offset of 4 from the ESP register.
  215.  
  216.  Then you track back to the responsible code and so on and so
  217. on... since the protectionists are aware of these obvious "weak"
  218. points in their schemes, their "defences" will be all
  219. concentrated on this "path" (encrypted date compares far away
  220. from the messagebox call, bogus jumps, fake routines etcetera)...
  221. they'll try to defer people reverse backtracing to the protection
  222. scheme from the nag screen. 
  223.  
  224.      We will therefore hack our way to these protections sneaking
  225. in from more hidden, less used and and less obvious doors, like
  226. (in this example) GetLocalTime or (as we'll see later) through
  227. the various "Write and read" file routines (i.e. the _open,
  228. _lseek and _read routines that the protection schemes use to
  229. fetch from the registry (or from somewhere else) the encrypted
  230. date of installation. The point is to take our target's
  231. protection schemes by surprise, from "behind" :=)
  232.  
  233.      OK: First of all... we have to do with a time protection,
  234. duh, therefore GetLocalTime is a first bait we can jolly use,
  235. let's see if we fish anything thattaway:
  236. ------------------------------------------------
  237.  
  238. * Referenced by CALLs at Addresses:
  239. |:05024FBE, :05024FF0, :05035A05, :0506489C, :0511A2A4, 
  240. |:05167F6A, :05167FC1, :051F9E77, :05204C54, :05223F14, 
  241. |:05223F81, :05224013, :05271A72   
  242. |
  243. :05024E77 55              push ebp
  244. :05024E78 8BEC            mov ebp, esp
  245. :05024E7A 83EC10          sub esp, 00000010
  246. :05024E7D 8D45F0          lea eax, [ebp-10]
  247. :05024E80 50              push eax
  248. :05024E81 FF15905E3C05    Call dword ptr [053C5E90]          
  249. *GetLocalTime,(Kernel32-E2h) ;HERE!
  250. ------------------------------------------------
  251.  
  252. PARAMETERS inside Windows' FUNCTIONS
  253.  
  254. After this call the program must save the time parameters: for
  255. those of you that do not know anything, the typedef structure is
  256. the following one... (VERY IMPORTANT FOR TIME PROTECTIONS! Learn
  257. it by heart! It's used in many other various FileTime routines
  258. too):
  259. ------------------------------------------------
  260. WORD wYear
  261. WOED wMonth
  262. WORD wDayOfWeek
  263. WORD wDay
  264. WORD wHour
  265. WORD wMinute
  266. WORD wSecond
  267. WORD wMilliseconds
  268. ------------------------------------------------
  269.  
  270. Why did we seek GetLocalTime? Because  the protectionists have
  271. to know somehow if the program run over the allowed time and,
  272. while there are many other methods to do this, one of the most
  273. simple is a check through good humble GetLocalTime... so we'll
  274. begin from here, ready to check all other possibilities only if
  275. we do not fish anything with this bait.
  276.  
  277. Examining the savings of the return values from this routine, as
  278. with many other time routines, you'll find in your dead listing
  279. something like this:
  280.  
  281. ------------------------------------------------
  282.  
  283. CALL [KERNEL32!GetLocalTime]
  284. mov  dx, [EBP-10] that's the year, will be something like
  285. 7CD=1997
  286. mov  dl, [EBP-0E] the month... lower part of a register is enough
  287. mov  al, [EBP-0C] that's the day of the week, ditto
  288. mov  al, [EBP-0A] that's the day
  289. mov  dl, [EBP-08] that's the hour
  290. mov  al, [EBP-06] that's the minute
  291. mov  dl, [EBP-04] that's the second
  292.  
  293. and if somebody would care, you would have had also
  294. mov  dx, [EBP-02] that's the millisecond, but few time
  295. protections care for that (which is stupid to say the least,
  296. since so many ideas come immediately to the mind :=)
  297. ------------------------------------------------
  298.  
  299.      I said "something like" the above, but things could differ
  300. a little coz the count [EBP-xx] could be flawed by pushes and
  301. then you would have something like -say- the year in [EBP-34]
  302. and, accordingly, the month in [EBP-32] et cetera... anyway the
  303. SERIE will always be respected, therefore you could also crack
  304. these protection in a completely different (and easy) way, that
  305. good old +ORC will now let you glimpse... simply set a breakpoint
  306. on a user routine (study this part of winice documentation
  307. WELL... you'll be able to crack almost ANYTHING with your own
  308. breakpoint routines)... say when the target loads for instance
  309. 7D5h on ax OR on dx (you will not know which of both registers
  310. the protection scheme use).. then simply run the program with the
  311. changed os date 2005 (which is 7D5h) and see what happens...
  312. you'll breakpoint smack in the middle of the protection scheme
  313. :=)... Why use 2005 instead of 1997? Easy: we wont use the
  314. current year (7CD=1997) nor the next couple of years, because the
  315. protectionists oft use other unrelated variables with those same
  316. values (say current year of release and a couple year more) *on
  317. purpose*, to block these very  attempts. But, as I said, we do
  318. not need to use winice to crack this cram... bear with me and
  319. see.
  320.  
  321.      Let's be more technical: you have reached a level where you
  322. have the right to UNDERSTAND exactly how to access parameters
  323. (i.e. the fixed values that MUST be passed to a function) and
  324. local variables (i.e. the values that the protectionists have
  325. decided to use, say in order to compare or manipilate) inside
  326. windows calls:-
  327.  
  328.     If you set a breakpoint at the exact function address, for
  329. example, :BPX GetFileTime, use ESP+(param#*4) to address
  330. parameters, where param# is 1, 2, 3, or whichever parameter that
  331. function calls... Since BOOL GetFileTime(HANDLE hFile, LPFILETIME
  332. lpCreation, LPFILETIME lpLastAccess, LPFILETIME lpLastModified)
  333. you'll easily know what is what.
  334.  
  335.     If you set a breakpoint INSIDE a function body (after the
  336. full prologue PUSH EBP, MOVE EBP,ESP, SUB ESP,size (locals) has
  337. been executed)use EBP+(param#*4)+4 to address parameters.
  338.  
  339.     Once the space for local variables is allocated on the
  340. stack, the local variables can be addressed using a negative
  341. offset from EBP. The first local variable is at EBP-4... with two
  342. pointer local variables (typically dword sized) one will
  343. therefore be at EBP-4 and the other will be at EBP-8.
  344. Comprendes?
  345.  
  346. Enough... back to our calls to GetLocalTime... see how the
  347. "centralised" call approach of windows helps us a lot... all the
  348. calls of the program to this routine are here under our eyes...
  349. look at the 13 CALL references, once more, (THIS IS IMPORTANT)
  350. look at WHERE they come from:
  351.  
  352. * Referenced by CALLs at Addresses:
  353. |:05024FBE, :05024FF0, :05035A05, :0506489C, :0511A2A4, 
  354. |:05167F6A, :05167FC1, :051F9E77, :05204C54, :05223F14, 
  355. |:05223F81, :05224013, :05271A72   
  356. |
  357. :05024E77 55              push ebp
  358. :05024E78 8BEC            mov ebp, esp
  359. :05024E7A 83EC10          sub esp, 00000010
  360. :05024E7D 8D45F0          lea eax, [ebp-10]
  361. :05024E80 50              push eax
  362. :05024E81 FF15905E3C05    Call dword ptr [053C5E90]          
  363. *GetLocalTime,(Kernel32-E2h)
  364.  
  365. A LITTLE ZEN: FEELING THE CALLS OF THE SEA
  366. Ok, let's see which sectors of our target do actually call our
  367. bait GetLocalTime... look at the call references above! Out of
  368. 13 calls, Sectors "024F" and "167F" and "223F" call it twice,
  369. whereby Sectors 035A, 0648, 11A2, 1F9E, 204C, 2240 and 271A call
  370. it only once.
  371.  
  372. This may not mean anything, of course, but hey! on the other hand
  373. it could be very interesting... clearly we'll examine FIRST what
  374. happens in these "time-intensive-calling" parts of the code:
  375. Let's begin.
  376.  
  377. 1)   "Sector 024F" calls GetLocalTime twice, why?
  378.  
  379.   :first_call_snippet_(called_from_:0504A3F7)_calls_at_024FBE
  380. :05024FA4 55                 push ebp
  381. :05024FA5 8BEC               mov ebp, esp
  382. :05024FA7 83EC0C             sub esp, 0000000C
  383. :05024FAA 53                 push ebx
  384. :05024FAB 8D45F4             lea eax, [ebp-0C] 
  385. :05024FAE 8B1D04452C05   *** mov ebx, [052C4504] ;get holyloc
  386. :05024FB4 50                 push eax
  387. :05024FB5 885DFE             mov [ebp-02], bl ;create holylow
  388. :05024FB8 887DFF             mov [ebp-01], bh ;create holyhigh
  389. :05024FBB C1EB10             shr ebx, 10      ;create holyshr10
  390. :05024FBE E8B4FEFFFF     *** call 05024E77 GetLocalTime ;FIRST CALL
  391. :05024FC3 8A45FE             mov al , [ebp-02]
  392. :05024FC6 3845F6         *** cmp [ebp-0A], al  ;month=holylow?
  393. :05024FC9 7512               jne 05024FDD ;flag 1
  394. :05024FCB 8A45FF             mov al , [ebp-01]
  395. :05024FCE 3845F7         *** cmp [ebp-09], al  ;day=holyhigh?
  396. :05024FD1 750A               jne 05024FDD ;flag 1
  397. :05024FD3 66B80000           mov ax, 0000 ;flag 0
  398. :05024FD7 66395DF4       *** cmp [ebp-0C], bx  ;year=holyshr10?
  399. :05024FDB 7404               je 05024FE1  ;keep flag 0
  400.  
  401. :05024FDD 66B80100       *** mov ax, 0001  (flag 1: day or month
  402.                                             or year differ)
  403. :05024FE1 5B                 pop ebx
  404. :05024FE2 8BE5               mov esp, ebp
  405. :05024FE4 5D                 pop ebp
  406. :05024FE5 C3                 ret
  407.  
  408.   :second_call_snippet_calls_at_5024FF0
  409. :05024FE6 55                 push ebp
  410. :05024FE7 8BEC               mov ebp, esp
  411. :05024FE9 83EC08             sub esp, 00000008
  412. :05024FEC 8D45F8             lea eax, [ebp-08]
  413. :05024FEF 50                 push eax
  414. :05024FF0 E882FEFFFF     *** call 05024E77 GetLocalTime ;SECONDCALL
  415. :05024FF5 0FB64DFB       *** movzx byte ptr ecx, [ebp-05] ;savepar
  416. :05024FF9 0FB645FA       *** movzx byte ptr eax, [ebp-06] ;savepar
  417. :05024FFD C1E108             shl ecx, 08
  418. :05025000 0BC8               or ecx, eax
  419. :05025002 0FB745F8       *** movzx word ptr eax, [ebp-08] ;savepar
  420. :05025006 C1E010             shl eax, 10
  421. :05025009 8BE5               mov esp, ebp
  422. :0502500B 0BC8               or ecx, eax
  423. :0502500D 5D                 pop ebp
  424. :0502500E 890D04452C05   *** mov [052C4504], ecx  ;save in holyloc
  425. :05025014 C3                 ret
  426.  
  427.      Quite interesting... a flagging (that could be a green
  428. light) and some parameters saved and compared within a holy
  429. location... why does this "sector 024F" call? Is it just checking
  430. against an holy location IF the time has changed enough to
  431. justify the snapping of other routines? Or is it this the part
  432. of the code that encrypts the date in the holy location
  433. itself?... We could follow this path, and "freeze" the holy
  434. location, or explore who calls this code snippets... this would
  435. bring us to the protection scheme as well of course... but this
  436. kind of work -MADE NOW- would not be methodologically correct... 
  437. YOU SHOULD INDEED NEVER GO ASTRAY... KEEP YOUR CRACKING APPROACH
  438. (as long as you do not get obvious signs that you found what you
  439. were looking for), it's like landing a plane... keep the original
  440. approach and DO NOT delve inside everything you happen to notice
  441. that "might" be a treffer! Here we have something "biting" the
  442. hook (our worm is GetLocalTime), but it's not yet time to pull
  443. out our fishing line yet.. let's continue... We were
  444. investigating all sections of our target's code which effectuate
  445. at least a double call to GetLocalTime... let's continue! Let's
  446. have a quick look to the other two "twin" occurrences of
  447. GetLocalTime (167F and 223F) before delving inside any one of
  448. them... maybe we will not need to delve at all. Remember, always
  449. concentrate on ONE approach at a time: multa agendo nihil agens!
  450.  
  451. Here the second "twin calls" location area:
  452. 2)   "Sector" 167F calls GetLocalTime, why?
  453.  
  454. :05167F6A E808CFEBFF          call 05024E77 ;CALL GetLocalTime 
  455. :05167F6F 66817DF4C007        cmp [ebp-0C], 07C0  ;is 1984?
  456. :05167F75 722F                jb 05167FA6       ;go badflag
  457. :05167F77 66817DF40108        cmp [ebp-0C], 0801  ;is 2049?
  458. :05167F7D 7727                ja 05167FA6         ;go badflag
  459. :05167F7F FF75F4              push [ebp-0C]    ;save validyear
  460. :05167F82 660FB645F7          movzx byte ptr ax, [ebp-09] ;pushday
  461. :05167F87 660FB64DF6          movzx byte ptr cx, [ebp-0A] ;pushmonth
  462. :05167F8C 50                  push eax
  463. :05167F8D 51                  push ecx
  464. :05167F8E E84EC10B00          call 052240E1       ;call here
  465. :05167F93 663B45E4            cmp ax, [ebp-1C]
  466. :05167F97 7D0D                jge 05167FA6        ;go badflag
  467. :05167F99 668B4DE4            mov cx, [ebp-1C]
  468. :05167F9D 662BC8              sub cx, ax
  469. :05167FA0 66894DF2            mov [ebp-0E], cx
  470. :05167FA4 EB06                jmp 05167FAC        ;do not badflag
  471.  
  472. * Referenced by a Jump at Addresses:05167E13(C), :05167ED7(C),
  473.  :05167F1B(C), :05167F64(C), :05167F75(C), :05167F7D(C),
  474.  :05167F97(C); lotta routines badflag
  475.                here... this is BADFLAG INTENSIVE
  476. :05167FA6 66C745FE0100     mov [ebp-02], 0001 ;BAD FLAG !!!***
  477.    :no_bad_flag
  478. :05167FAC FF75DC           push [ebp-24]
  479. :05167FAF FF151C5C3C05     Call dword ptr[053C5C1C];RegCloseKey
  480. :05167FB5 EB25             jmp 05167FDC ;jump 2nd getlocaltime
  481.   :only_5167DE5_calls_this_second_GetLocalTime
  482. :05167FB7 66C745EC0000     mov [ebp-14], 0000
  483. :05167FBD 8D45F4           lea eax, [ebp-0C]
  484. :05167FC0 50               push eax ;SECOND GetLocalTime
  485. :05167FC1 E8B1CEEBFF       call 05024E77 GetLocalTime  ;call it
  486. :05167FC6 66817DF4C007     cmp [ebp-0C], 07C0 ;between 1984...
  487. :05167FCC 7208             jb 05167FD6     ;jump flag_unvalid_year
  488. :05167FCE 66817DF40108     cmp [ebp-0C], 0801 ;...and 2049? 
  489. :05167FD4 7606             jbe 05167FDC    ;jump_to_valid_year
  490.    :flag_unvalid_year
  491. :05167FD6 66C745FE0100     mov [ebp-02], 0001 ;flag "unvalid_year"
  492.    :valid_year_almost_everybody_calls_here
  493. :05167FDC 66837DFE00       cmp [ebp-02], 0000   ;valid_flag?
  494. :05167FE1 755F             jne 05168042  ;beggar off:unvalid something
  495. :05167FE3 66837DF000       cmp [ebp-10], 0000   ;valid ebp-10?
  496. :05167FE8 750E             jne 05167FF8         ;jmp unvalid_e10
  497. :05167FEA 66837DEC00       cmp [ebp-14], 0000   ;valid ebp-14?
  498. :05167FEF 7451             je 05168042          ;beggar off,unvalid 
  499. :05167FF1 66837DF000       cmp [ebp-10], 0000   ;sure thatebp-10=0?
  500. :05167FF6 7407             je 05167FFF          ;continue ifso
  501.   :unvalid_e10
  502. :05167FF8 66837DEC00       cmp [ebp-14], 0000   ;check if e14valid
  503. :05167FFD 7543             jne 05168042         ;no? be damned!
  504.   :valid_e10_and_e14
  505. :05167FFF 0FBF4DF2         movsx word ptr ecx, [ebp-0E] ;e10 and e14 true
  506. :05168003 66833D58192C0501 cmp dword ptr [052C1958], 0001 
  507. :0516800B 1BC0             sbb eax, eax
  508. :0516800D 83E05A           and eax, 0000005A  ;pretty obvious
  509. :05168010 83C05A           add eax, 0000005A  ;isnt it?
  510. :05168013 3BC1             cmp eax, ecx       ;HERE********
  511. :05168015 7C2B             jl 05168042        ;beggar off
  512. :05168017 66837DF21E       cmp [ebp-0E], 001E ;0x1E = 30
  513. :0516801C 7F4A             jg 05168068        ;good guy jump
  514. :0516801E 8D45F4           lea eax, [ebp-0C]
  515.  
  516.      Well, that's was it actually... we notice two consecutive
  517. locations with 5Ah (90 decimal) there... as if they had written
  518. "OUR TIME LIMIT IS HERE, PLEASE REMOVE AND USE FOR EVER AND
  519. EVER". Maybe Micro$oft wants exactly this... I mean, they give
  520. away their (bugged) web browser for free just in order to
  521. bankrupt Netscape, why shouldnt they as well give every software
  522. away for free (bad protecting it on time limits and spreading
  523. everything on all cd-rom covers of the planet) until they have
  524. bankrupted every concurrent and do effectively held every user
  525. on the planet "pillado por los huevos"? 
  526.  
  527.      Maybe in cracking this protection scheme I'm only helping
  528. Gates... the more people use its programs the more they will
  529. spread... the more he will dominate the market... yet I could not
  530. care less about Micro$oft's own stupid plans...  programming the
  531. way they do, they will never be able to dominate a portion of
  532. halfbacked potatoes in my humble opinion... therefore let's crack
  533. this crap black and blue and let's hope Micro$oft loose a lot of
  534. money thank us, yeah, that's life! Let's crack a lot of Micro$oft
  535. software from now on! A white flower in our mouth, a computer not
  536. far away, a cold determination in our fingers. Death to Gates!
  537.  
  538. *** Quick Crack for Micro$oft's Project 95, by +ORC, 04/1997***
  539. search for the string
  540. :05167FA6 66C745FE0100       mov [ebp-02], 0001 ;BAD FLAG****
  541. and change it to:
  542. :05167FA6 66C745FE0000       mov [ebp-02], 0000 ;always good
  543. *** now find some stupid yuppies and give them this app ***
  544.  
  545. JUST A MOMENT (1)
  546. Well, just a moment... go back to the code "snippets" above,
  547. pupils... why did we not search for
  548. :05168015 7C2B         jl 05168042        ;beggar off
  549. in order to noop everything say with an inc/dec:
  550. :05168015 40        inc eax   
  551. :05168016 48        dec eax 
  552.  
  553. Why? Because it would NOT have worked... or, as a matter of fact, it
  554. would have worked only in SOME cases... this is an example of a
  555. "protectionists' bait", please examine the code. 
  556.  
  557. You should -by now- know enough our art to be able to
  558. understand by yourself why the crack at 5167FA6 works and the
  559. crack at 5168015 (which is indeed part of the protection) will
  560. not work... a hint for you: change months and YEARS of your os
  561. as you experiment with this stuff. This answer is part of the
  562. strainer of this lesson, therefore work on it and understand the
  563. problem.
  564.  
  565.      And what about the remaining last "double call" location at
  566. "223"? Did I not say we should keep steady on our approach before
  567. delving inside?
  568.  
  569.      Yes and no: "quod satis est cui contingit, nihil amplius
  570. optet" (Horatius, emailing his friends, as you can see you can
  571. always find a proverb to demonstrate what you are saying, even
  572. if you are contradicting yourself :=)
  573.  
  574.      But as soon as you SEE the protection there is NO POINT
  575. (unless you really have to, in order to understand some weird
  576. scheme thoroughly) to continue... the plane is landed, relax,
  577. drink something.
  578.  
  579.      Anyway for such things there are no fixed rules... do
  580. whatever you like and prefer, I personally think that the best
  581. approach is a mixture of iron will and extreme flexibility.
  582.  
  583. JUST A MOMENT (2)
  584. But wait, since they used the 5Ah byte... could not we have found
  585. the protection just searching for 5Ah? 
  586.  
  587.      Yes, and indeed, we would have found the scheme around it
  588. immediately... but that IS NOT the correct approach, since you
  589. should NOT always presume that the protectionists behave REALLY
  590. always that stupid (even if they almost always do :=)
  591.  
  592. JUST A MOMENT (3)
  593. But wait, could we have not just winiced the working of the
  594. program in order to backtrace as soon as the protection nag
  595. screen snaps?
  596.  
  597.      Yes, and it would have worked... but why ruin your eyes on
  598. screen in a closed and may be dusty room, getting cramps in your
  599. shoulders that not even a good massage will blow away, when you
  600. can crack much more relaxed, sitting quiet in a shadowy garden,
  601. looking lazily (it's April! A beautiful month! Go outside! What
  602. the hell are you doing inside a room?) at a couple of sheets of
  603. paper, feeling the wind among the leaves above you, while a cool
  604. Martini-Wodka fizzles in your hands? If you want to use the
  605. "live" winice approach go ahead... I'll even tell you right now
  606. a couple of things that can be useful in order to crack some
  607. (other) protections: for Cinderellas schemes bpx MessageBox or
  608. bpx GetLocalTime or bpx GetFileTime and look WHO gets the "time"
  609. data a little before the nagscreen snaps... I did not check but
  610. I'm sure that if you do it here, you'll have quite a lot of calls
  611. along the program, whereby the "initializing" calls from our
  612. "sector 24F" will snap at the beginning (and at the end) of the
  613. target life and our protection call (the one we cracked the bad
  614. flag of) i.e.: 
  615.  
  616. :05167F6A E808CFEBFF   call 05024E77 ;CALL GetLocalTime in KERNEL 
  617.  
  618. will happen JUST BEFORE the snap... so you can crack thatta way
  619. too... these patterns are always the same.
  620.  
  621. **************** A little icy digression *****************
  622.  
  623. This is -after all- a tutorial, therefore for those of you that
  624. do not know anything, here are some useful (and well known) older
  625. winice little tricks and memory addresses discussions. Even if
  626. I do prefer to use as much as possible my "dead listing" methods,
  627. I realise that at times the help of winice is indispensable...
  628. the little tricks below refer to Winice for windows 95 older copy
  629. (before Godot, i.e. 3.0) and you may skip this section if you are
  630. using winice 3.0. which has the IF feature for conditional
  631. breakpoints, the WHAT command and much more. I strongly
  632. reccommand using Winice 3.0. In order to learn how to use it
  633. correctly your best approach is to find on the web the GOOD
  634. documentation of Numega (it's in adobe acrobat's PDFformat) here
  635. you have the names you'll need to find it (and NAMES are the MOST
  636. important thing on the web):
  637.  
  638.      Si30cr.pdf     3.205.000 bytes    COMMAND REFERENCE
  639.      Si30ug.pdf     1.038.000 bytes     USING SOFTICE
  640.  
  641. Last time I fetched them they were inside the zipped file Sice3doc.zip,
  642. 3.358.000 bytes read these documents thoroughly.  Once you read them
  643. you (almost)will not need my lessons any more. 
  644.  
  645. But some of the simple tricks below can be useful even with
  646. Winice 3.0., and anyway I want ALL of the readers of this
  647. tutorial to know their tools and to use them in the best way,
  648. even those too lazy or too stupid to fetch the above mentioned
  649. files... therefore, here you are... some (older) winice's MUST
  650. know:
  651.  
  652. BPM DS:xxxxxxxx  W GT 1E
  653. Breakpoint first time that the byte at location DS:xxxxxxxx has
  654. a value written to it that's greater than 1Eh (30)
  655. Useful qualifiers are EQ (equal) NE (not equal) GT (greater than)
  656. LT (less than) and M (mask) this last one is pretty complicated
  657. but allows powerful breakpointing for dongles cracking: after
  658. having given your routine command "tss", begin your dongle
  659. breakpointing using, for instance: 
  660.  
  661. BPIO 3F6 R EQ M 11XX xx00
  662.  
  663. This defines a byte break point on I/O port read, the first time
  664. that I/O port 3F6 is read with ANY value that has the two high
  665. order bits set to 1 and the two lower ones to zero, the other
  666. bits can be any value. The same is valid for BPM (breakpoint on
  667. memory write):
  668.  
  669. BPM CS:802A2D22 W EQ M 0xxx xxxx xxxx xxxx xx11
  670. you dig it? The mask method is even better than the qualifier one
  671. if you are NOT sure about which value the protection will load :=)
  672.  
  673. CSIP NOT &F000:0 &FFFF:0
  674.  
  675. Breakpoint only outside BIOS useful to limit breakpoint snapping
  676. Remember that CSIP and BPM (READ/WRITE) can be very USEFUL to
  677. slow down the execution of a windows program... if you use "heavy
  678. breakpointing" in this way, setting a number of "useless" but
  679. heavy breakpoints that winice will monitor, windows will crawl
  680. (even on a Pentium 200) and you'll be able to breakpoint MANUALLY
  681. exactly at the point where a protection snaps... I still prefer
  682. the "dead listing" method of cracking personally, though.
  683.  
  684. BPINT 21 AH=0F
  685. Breakpoint on openfile (funny how many INT 21 are execited under
  686. windoze)
  687. (old style, with Winice 3 it's BPINT 21 IF EAX=0F)
  688. BPINT 21 AH=2A
  689. Breakpoint on GetDate 
  690. (old style, with Winice 3 it's BPINT 21 IF EAX==2A)
  691.  
  692. When we are still at it, remember that in 32bit mode there are
  693. only TWO selectors (when you search the whole memory for
  694. instance):
  695. 28:0 and 4 virtual gigabytes of CODE
  696. 30:0 and 4 virtual gigabytes of DATA and STACK
  697.  
  698. We saw (cracking DOS) how to get from virtual address to physical
  699. address in 8086 style segment:offset code: multiply the segment
  700. by 16 and then add the offset. In a "protected mode" selector
  701. it's different: linear address is calculated by adding the offset
  702. TO THE BASE ADDRESS FOUND IN THE GDT (or LDT, local descriptor
  703. table is used if bit TWO of the selector is a 1, global DT is
  704. used otherwise... GDT and LDT are "lookup" tables used to
  705. calculate addresses).
  706.  
  707. At times you must understand a little the physical addresses
  708. structure in order to crack effectively:
  709. 00000000 - 000FFFFF Current Virtual Machine (Windows and Windows
  710. Programs)
  711.  
  712. 00400000 - 7FFFFFFF Physical memory (contiguous)
  713. 80000000 - 803FFFFF      Windows' VxDs
  714. 80500000 - 80FFFFFF Windows programs
  715. 81000000 - FFFFFFFF DOS VMs
  716.  
  717. ...use the commands "page" and "addr" and have a look around. The
  718. command addr is also very useful to understand in which context
  719. you are when winice pops up.
  720.  
  721. Remember that each 32 bit task is given the address space from
  722. 400000 to 7FFFFFFF, which is called an "address context". This
  723. virtual address space is reserved for 32 bits applications and
  724. private DLLs
  725.  
  726. And now two MUST KNOW winice commands that will spare you a lot
  727. of wasted time when you delve inside the huge windows codebulks
  728. we have to peruse:
  729.  
  730. P RET (that's F12 most of the time)
  731. steps out of the current procedure, may take ages if it's very
  732. large
  733. that's step until return
  734.  
  735. G @SS:ESP (that's F11 most of the time)
  736. throws you at the caller of the procedure you bpxed on
  737. (bpx GetLocalTime and execute F11 (or write G @SS:ESP) as soon
  738. as winice pops up and you'll see what I mean)
  739.  
  740. A couple of watches like *ds:esi (and ds:esi) and a dex 1 ss:esp
  741. in your ini setting of winice would be a good idea too IMO.
  742.  
  743. This said, Winice 3.0 allows POWERFUL breakpointin, like for instance:
  744. bpx ntoskrnl!ExAllocatePoolWithTag IF (esp->c == 1) DO "data1;dd eax" 
  745.  
  746. (I will explain all this more thoroughly in the lessons about Windows NT)
  747.  
  748. **********************************************
  749.  
  750. Back to our time protections cracking (and Micro$oft bashing :=).
  751.  
  752.      Once more... there are THOUSAND different ways to crack
  753. these applications, and this GetLocalTime "fishing" is only ONE
  754. of them... I will teach you -of course- ALL the methods I believe
  755. are MOST effective... you must be enough crack-able by now to
  756. know when, applying these techniques to OTHER programs (hopefully
  757. Micro$oft ones) you'll have to use slightly or substantially
  758. different approaches... non semper Saturnalia erunt, as you'll
  759. see.
  760.  
  761. Are these protections always so easy to defeat?
  762. No and yes, may be no... yet there are far more complex schemes.
  763. But time checking from a CD-ROM code is the ultimate doom of the
  764. protectionists... you see: the problem for them is the following:
  765. They are protecting using a "write only once" media (a CD-ROM)...
  766. therefore every time you put the cd-rom in your driver you are
  767. re-installing a perfect "virgin" copy of the protected program...
  768. there is no way a recursive message can be placed INSIDE the
  769. code, telling it to never execute again... I remeber older nasty
  770. "quiver" protections in dos... after the 20ntieth installation
  771. the program formatted as bad a sound sector of the diskette...
  772. that was clever! But that's impossible on a read only media,
  773. therefore let's see... where can they keep track of the
  774. eventuality that you used it before?
  775.  
  776. 1)   Inside the intricacies of Windows register, this most
  777. obscure fat abomination (should I write a scary computer fiction
  778. film, I would imagine a windows register growing fatter and
  779. fatter, week after week, and then suddenly grabbing the user
  780. through the a:\ drive in order to eat him :=)
  781.  
  782. 2)   Inside an apparently unrelated file or *.dll that gets
  783. "lost" inside the garbage subdirectories c:\windows or
  784. c:\windows\system (by the way, that's exactly the same technique
  785. you should use in order to protect your files at work from
  786. administrator's prying eyes... throw every application inside
  787. windows subdirs and give them funny names, like a6JJJK.EXE... no
  788. administrator on this earth (and no censorship corporate
  789. patrolling software) will come to the idea that that is your
  790. beloved chess program :=).
  791.  
  792. 3)   Inside small parts of the BOOT sector of your harddisk that
  793. can safely be used for this kind of tricks without altering the
  794. booting (this is a trick the protectionists have learnt from our
  795. fellows viri-writers... see how even the bad ones have a teaching
  796. function in this funny virtual world. Once more virus code
  797. studying is VERY important in order to crack well. 
  798. Alas for the protectionists! All these tricks are pretty easy to
  799. defeat too, and I will show you HOW to do it :=)
  800.  
  801. For a start here is HOW easily you would have checked your boot
  802. sector with an old DOS system...
  803.  
  804. 1)   Run debug (or, better, symdeb)
  805. 2)   -L 100 2 0 1 
  806. (that's Load into memory address Ox100 from drive C (that's
  807. number 2... 0 is A, 1 is B and 2 is C, duh, starting from sector
  808. 0 for 1 sector whatever you find there. Here you have the boot
  809. sector of the PC I'm writing on:
  810.  
  811. -L 100 2 0 1
  812. -d 100 L 200
  813. 17D3:0100  EB 3C 90 4D 53 57 49 4E-34 2E 31 00 02 40 01 00 k [.MSWIN4.1..@..
  814. 17D3:0110  02 00 02 00 00 F8 9A 00-3F 00 40 00 3F 00 00 00 .....x..?.@.?...
  815. 17D3:0120  41 44 26 00 80 00 29 FC-0F 5F 3C 20 20 20 20 20 AD&...)|._[     
  816. 17D3:0130  20 20 20 20 20 20 46 41-54 31 36 20 20 20 FA 33 FAT16   z3
  817. 17D3:0140  C9 8E D1 BC FC 7B 16 07-BD 78 00 C5 76 00 1E 56 I.Q[|{..=x.Ev..V
  818. 17D3:0150  16 55 BF 22 05 89 7E 00-89 4E 02 B1 0B FC F3 A4 .U?"..~..N.1.|s$
  819. 17D3:0160  06 1F BD 00 7C C6 45 FE-0F 8B 46 18 88 45 F9 38 ..=.|FE~..F..Ey8
  820. 17D3:0170  4E 24 7D 22 8B C1 99 E8-77 01 72 1A 83 EB 3A 66 N$}".A.hw.r..k:f
  821. 17D3:0180  A1 1C 7C 66 3B 07 8A 57-FC 75 06 80 CA 02 88 56 !.|f;..W|u..J..V
  822. 17D3:0190  02 80 C3 10 73 ED 33 C9-8A 46 10 98 F7 66 16 03 ..C.sm3I.F..wf..
  823. 17D3:01A0  46 1C 13 56 1E 03 46 0E-13 D1 8B 76 11 60 89 46 F..V..F..Q.v.`.F
  824. 17D3:01B0  FC 89 56 FE B8 20 00 F7-E6 8B 5E 0B 03 C3 48 F7 |.V~8.wf.^..CHw
  825. 17D3:01C0  F3 01 46 FC 11 4E FE 61-BF 00 07 E8 23 01 72 39 s.F|.N~a?..h#.r9
  826. 17D3:01D0  38 2D 74 17 60 B1 0B BE-D8 7D F3 A6 61 74 39 4E 8-t.`1.>X}s&at9N
  827. 17D3:01E0  74 09 83 C7 20 3B FB 72-E7 EB DD BE 7F 7D AC 98 t..G;{rgk]>.},.
  828. 17D3:01F0  03 F0 AC 84 C0 74 17 3C-FF 74 09 B4 0E BB 07 00 .p,.@t.[.t.4.;..
  829. 17D3:0200  CD 10 EB EE BE 82 7D EB-E5 BE 80 7D EB E0 98 CD M.kn>.}ke>.}k`.M
  830. 17D3:0210  16 5E 1F 66 8F 04 CD 19-BE 81 7D 8B 7D 1A 8D 45 .^.f..M.>.}.}..E
  831. 17D3:0220  FE 8A 4E 0D F7 E1 03 46-FC 13 56 FE B1 04 E8 C1 ~.N.wa.F|.V~1.hA
  832. 17D3:0230  00 72 D6 EA 00 02 70 00-B4 42 EB 2D 60 66 6A 00 .rVj..p.4Bk-`fj.
  833. 17D3:0240  52 50 06 53 6A 01 6A 10-8B F4 74 EC 91 92 33 D2 RP.Sj.j..ttl..3R
  834. 17D3:0250  F7 76 18 91 F7 76 18 42-87 CA F7 76 1A 8A F2 8A wv..wv.B.Jwv..r.
  835. 17D3:0260  E8 C0 CC 02 0A CC B8 01-02 8A 56 24 CD 13 8D 64 h@L..L8...V$M..d
  836. 17D3:0270  10 61 72 0A 40 75 01 42-03 5E 0B 49 75 77 C3 03 .ar.@u.B.^.IuwC.
  837.  
  838. [MICROSOFT PUBLISHER 1997]
  839. Time to bash Microsoft once more... how nice! Let's have a
  840. (quick) look at Microsoft Publisher 1997, another "60 days" trial
  841. version protection from Microsoft (60 days, because the DTP
  842. market moves so quickly that they cannot allow to let it loose
  843. for three months)... I'll show you where the protection is, how
  844. it snaps and how to crack it... I got my copy from one of the
  845. MANY magazines that published the 60 days demo version in April
  846. 1997... you should be able to find this one everywhere... here
  847. are the relevant data:
  848.  
  849. MSPUB.EXE  2.476.304  19/04/97  19:19  <--- da target
  850. MSPUB.ALF 34.054.330  17/04/97  20:18  <--- da dead listing
  851. MSPUB.DED  2.476.304  19/04/97  19:19  <--- da copy you need
  852.  
  853. You should always do a copy of the original target BEFORE
  854. beginning your work on it, you'l need it a lot when you time
  855. deprotect.
  856.  
  857. To crack this target we'll use a slightly different approach...
  858. let's call this technique "hit and see"... it's one of the most
  859. obvious approaches, and I surely have not invented it...
  860. everybody knows it: you run the program, you let the time
  861. protection snap, you look at the "hardwired" hex differences
  862. inside the body of the target (the "non functioning" copy will
  863. slightly differ from the "functioning" one) and you "reverse
  864. engineer" your dead listing back to the protection scheme that
  865. snapped the differences... pretty easy, isnt'it?
  866.  
  867. -------- digression: words inside targets ---------------------
  868. If you are interested in another, COMPLETELY DIFFERENT cracking
  869. door, here are the relevant messages [expir] inside our target...
  870. I used  SR32exe to fetch them (a very nice fetcher, thanks
  871. fravia! :=), which  is much better than my own old C scripts :=(
  872. As a small "extra" for this lesson, crack the protection out of
  873. this fetcher, a program that I'm sure you'll find VERY useful (I
  874. did):
  875. -------------------------------------
  876. Funduc Software search application:
  877. http://home.sprynet.com:80/sprynet.funduc
  878. 102372.2530@compuserve.com
  879. SR32     EXE       286.720  13/05/96   0:14 SR32.exe
  880. SR       HLP        36.830  12/05/96   3:28 SR.HLP
  881. SR       EXE       170.624  12/05/96  23:58 Sr.exe
  882. ------------------------------------
  883. Here the results of this program running on "expir"...
  884. ------------------------------------
  885. Processing file :  C:\PROGRAM FILES\MICROSOFT PUBLISHER 97\Mspub.exe
  886. Offset 0x1ac5e9     
  887. - This trial version of Publisher has [expir]ed. To order a permanent
  888. copy, call 1-800-426-9400 or visit the Publisher site on the World 
  889. Wide Web at http://www.microsoft.com/publisher/. To uninstall this
  890. version choose Add/Remove Programs i
  891. Offset 0x1ac6f4     
  892. - This trial version of Publisher will [expir]e in %d days. For more
  893. information about Publisher 97, call 1-800-426-9400 or visit the
  894. Publisher site on the World Wide Web at http://www.microsoft.com/publisher/. 
  895. ----------------- digression end --------------
  896.  
  897. As I said... there are MANY doors you may trespass to crack this
  898. target... let's continue with the simplest one in my opinion: 
  899.  
  900. 1)   Let's run it... it runs, how nice!
  901. 2)   Let's move the OS date... say four months ahead. 
  902.      It does not run anymore, this is sad! 
  903. 3)   WHAT HAS CHANGED IN THE FILE? That's the point my reader...
  904. Let's compare the two files... the original and the copy after
  905. the fatidic message "trial time is out, won't work any more", bye
  906. sucker:*
  907.  
  908. FC /b mspub.ded mspub.exe 
  909.  
  910. (that's the DOS command FileCompare that you are giving, duh)
  911.  
  912. And this is the result you'll get:
  913.           "Comparing files mspub.ded and mspub.exe"
  914.           "000F3703: 75 EB"
  915.           "000F370C: 75 EB"
  916.  
  917. MMMM! That's interesting! And what do we have there? Let's have
  918. a look at our (huge) dead listing (do not forget: 2560 (256*10)
  919. bytes difference between REAL AND Wdasm addressing... you just
  920. add A00h to the DOS addresses to get your bearings inside the
  921. dead listing files... F3703+A00= F4103... F370C+A00=F410C):
  922.  
  923.  
  924. * Referenced by lotta CALLs at Addresses:
  925. |:004014F1, :0040199A, :00401AC6, :00401C37, :00401F6C,  ;first calls 
  926. ... HUNDERT CALLS AND HUNDERT MORE... many many calls I have not reprinted
  927. |:0058B1C4, :0058B279, :0058B443, :0058BA9F              ;last calls
  928. |
  929. :004F40FC 8B4C2404         mov ecx, [esp + 04]
  930. :004F4100 83F901           cmp ecx, 1
  931. :004F4103 EB09       ****  jmp 004F410E ;..... Should be 75, i.e. Jne
  932. :004F4105 833DD0225C0000   cmp dword ptr [005C22D0], 0
  933. :004F410C EB06       ****  jmp 004F4114 ;..... Should be 75, I.e. Jne
  934.  
  935. :004F410E 890DD0225C00     mov [005C22D0], ecx  ;ecx NOT 1 flag 22D0 FALSE
  936.  
  937. :004F4114 A1D4225C00       mov eax, [005C22D4]
  938. :004F4119 51               push ecx
  939. :004F411A 83E840           sub eax, 00000040
  940. :004F411D 890DC4935C00     mov [005C93C4], ecx
  941. :004F4123 A3D4225C00       mov [005C22D4], eax
  942. :004F4128 83C040           add eax, 00000040
  943. :004F412B 50               push eax
  944. :004F412C FF158C085D00     Call dword ptr [005D088C] ;call MSVCRT40.longjmp
  945. :004F4132 83C408           add esp, 00000008
  946. :004F4135 C20400           ret 0004
  947.  
  948. All this means for us only one thing... location [005C22D0]
  949. decides a lot. But wait, let's see... What did  these assholes
  950. do? They "patched" their own program in order to protect it...
  951. how funny... time is out, so jmp anyway (instead of jump on not
  952. equal) to the evil routines... they know that now we would like
  953. to know WHO calls here... and there are (therefore, as
  954. dissuasion) hundert of procedures calling this cram... no point
  955. in checking all of them... you would sink in a sea of calls...
  956. what will we do? Where is the real and only one PROTECTION call
  957. to 4F40FC among this bunch of useless calls? We have only ONE way
  958. to find it out without losing time... Let's zen a little... you
  959. have read this lesson from the beginning... now STOP and think...
  960. i.e. use your brain (supposed you have one): do not read any more
  961. what follow: STOP NOW and answer this question BEFORE
  962. proceeding... really... you are here to learn, NOT TO COPY
  963. METHODS THAT OTHERS HAVE FOUND... once more... We know that
  964. somebody modified this cram... but HOW DO WE GET BACK (how do we
  965. reverse the flow) TO THE CORRECT CALLING ROUTINE AMONG HUNDERT
  966. OF THEM calling here?
  967.  
  968. Ok, you did stop and think... you may go on reading (if you did
  969. not... be ashamed... cracking is like watching a beautyful
  970. picture... you must think a lot, else your watching is useless).
  971. OK: We used the GetLocalTime routine as a bait inside my first
  972. example... can we apply it here? Let's search for it... HEY! They
  973. do not use it at all, there is NO GetLocalTime in this
  974. application... how the hel do they know which time is it?
  975. Let's search for "time", my friends... here the locations:
  976.  
  977. Processing file :  C:\PROGRAM FILES\MICROSOFT PUBLISHER 97\Mspub.alf
  978. Line 1340 -  Addr:BFF77105 hint(00DB) Name: GetFile[Time]
  979. Line 1342 -  Addr:BFF77144 hint(01F9) Name: SetFile[Time]
  980. Line 1457 -  Addr:BFF62E82 hint(01FE) Name: Set[Time]r
  981. Line 1494 -  Addr:BFF61AC2 hint(0162) Name: Kill[Time]r
  982. Line 1547 -  Addr:BFF643F9 hint(00EF) Name: GetDoubleClick[Time]
  983. Line 1555 -  Addr:BFF63E4D hint(01C9) Name: SendMessage[Time]outA
  984. Line 1572 -  Addr:BFF64406 hint(00D1) Name: GetCaretBlink(Time]
  985. Line 1591 -  Addr:BFF647E6 hint(0110) Name: GetMessage[Time]
  986. Line 1865 -  Addr:10238C10 hint(0466) Name: [time]
  987. Line 1871 -  Addr:102387D0 hint(0423) Name: local[time]
  988.  
  989.      Ok, that's more than enough, thankyou... let's begin from
  990. the beginning... what about a little GetFileTime pinpointing to
  991. start with? Where are the GetFileTime routines inside our target?
  992.  
  993. :004CBC11 FF1594005D00   Call dword ptr [005D0094]
  994. ;KERNEL32.GetFileTime
  995. :004CBD3A FF1594005D00   Call dword ptr [005D0094]
  996. ;KERNEL32.GetFileTime
  997.  
  998. Only TWO? Most rewarding... and where is the triggering call to
  999. the first one (probably to both of them)?
  1000. Have a look at the dead listing of our target... these cracks are
  1001. so simple that I wonder at times why the hell they insist...
  1002. either they shoudl learn HOW TO PROTECT PROPERLY the shit they
  1003. program, or they should give it for free to everybody (like I'm
  1004. doing now... hope that EVERY student and every poor chap in
  1005. Africa and Asia will use Micro$oft publisher for free without
  1006. ever giving them a cent... this is european cracking at his best!
  1007. And besides, that's the minimum we owe the poor slaves that do
  1008. sweat and work hard in order to pay for our barbecues :=)...
  1009. this is the synthesis of the dead listing:
  1010.  
  1011. * Referenced by a CALL at Address:004C8843    ;This is the call
  1012. that triggers everything... DO NOT FORGET IT
  1013. :004CBA50 55                      push ebp
  1014. :004CBA51 A1D4225C00              mov eax, [005C22D4]
  1015. :004CBA56 8BEC                    mov ebp, esp
  1016. :004CBA58 83C040                  add eax, 00000040
  1017. :004CBA5B 81EC5C010000            sub esp, 0000015C
  1018. :004CBA61 A3D4225C00              mov [005C22D4], eax
  1019. :004CBA66 C745E414165C00          mov [ebp-1C], 005C1614;->"MSPUBW40.DLL"
  1020. :004CBA6D C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  1021. :004CBA74 56                      push esi
  1022. :004CBA75 57                      push edi
  1023. :004CBA76 6A00                    push 00000000
  1024. :004CBA78 50                      push eax
  1025. :004CBA79 E889020C00              Call 0058BD07;MSVCRT40._setjmp3, 
  1026. :004CBA7E 83C408                  add esp, 00000008
  1027. :004CBA81 85C0                    test eax, eax
  1028. :004CBA83 B801000000              mov eax, 00000001
  1029. :004CBA88 7502                    jne 004CBA8C
  1030. :004CBA8A 33C0                    xor eax, eax
  1031. :004CBA8C 85C0                    test eax, eax
  1032. :004CBA8E 0F8527030000            jne 004CBDBB
  1033. :004CBA94 6A00                    push 00000000
  1034. :004CBA96 FF1590085D00   **** Call dword ptr [005D0890];MSVCRT40.time **
  1035. :004CBA9C 83C404                  add esp, 00000004
  1036. :004CBA9F B980510100              mov ecx, 00015180
  1037. :004CBAA4 2BD2                    sub edx, edx
  1038. :004CBAA6 8945F4                  mov [ebp-0C], eax
  1039. :004CBAA9 6804010000              push 00000104
  1040. :004CBAAE 8DBDA4FEFFFF            lea edi, [ebp+FFFFFEA4]
  1041. :004CBAB4 F7F1                    div ecx
  1042. :004CBAB6 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  1043. :004CBABC 2955F4                  sub [ebp-0C], edx
  1044. :004CBABF 50                      push eax
  1045. :004CBAC0 FF158C005D00   Call dword ptr[005D008C];GetSystemDirectoryA
  1046. :004CBAC6 B9FFFFFFFF              mov ecx, FFFFFFFF
  1047. :004CBACB 2BC0                    sub eax, eax
  1048. :004CBACD F2                      repnz
  1049. :004CBACE AE                      scasb
  1050. :004CBACF F7D1                    not ecx
  1051. :004CBAD1 80BC29A2FEFFFF5C  cmp byte ptr [ecx + ebp - 0000015E], 5C
  1052. :004CBAD9 7434                    je 004CBB0F
  1053. :004CBADB BF10165C00              mov edi, 005C1610
  1054. :004CBAE0 B9FFFFFFFF              mov ecx, FFFFFFFF
  1055. :004CBAE5 2BC0                    sub eax, ea
  1056. :004CBAE7 F2                      repn
  1057. :004CBAE8 AE                      scasb
  1058. :004CBAE9 F7D1                    not ecx
  1059. :004CBAEB 2BF9                    sub edi, ecx
  1060. :004CBAED 8BD1                    mov edx, ecx
  1061. :004CBAEF 8BF7                    mov esi, edi
  1062. :004CBAF1 B9FFFFFFFF              mov ecx, FFFFFFFF
  1063. :004CBAF6 8DBDA4FEFFFF            lea edi, [ebp+FFFFFEA4]
  1064. :004CBAFC 2BC0                    sub eax, eax
  1065. :004CBAFE F2                      repnz
  1066. :004CBAFF AE                      scasb
  1067. :004CBB00 4F                      dec edi
  1068. :004CBB01 8BCA                    mov ecx, edx
  1069. :004CBB03 C1E902                  shr ecx, 02
  1070. :004CBB06 F3                      repz
  1071. :004CBB07 A5                      movsd
  1072. :004CBB08 8BCA                    mov ecx, edx
  1073. :004CBB0A 83E103                  and ecx, 00000003
  1074. :004CBB0D F3                      repz
  1075. :004CBB0E A4                      movsb
  1076. :004CBB0F 8B7DE4                  mov edi, [ebp-1C]
  1077. :004CBB12 B9FFFFFFFF              mov ecx, FFFFFFFF
  1078. :004CBB17 2BC0                    sub eax, eax
  1079. :004CBB19 F2                      repnz
  1080. :004CBB1A AE                      scasb
  1081. :004CBB1B F7D1                    not ecx
  1082. :004CBB1D 2BF9                    sub edi, ecx
  1083. :004CBB1F 8BD1                    mov edx, ecx
  1084. :004CBB21 8BF7                    mov esi, edi
  1085. :004CBB23 B9FFFFFFFF              mov ecx, FFFFFFFF
  1086. :004CBB28 8DBDA4FEFFFF            lea edi, [ebp+FFFFFEA4]
  1087. :004CBB2E 2BC0                    sub eax, eax
  1088. :004CBB30 F2                      repnz
  1089. :004CBB31 AE                      scasb
  1090. :004CBB32 4F                      dec edi
  1091. :004CBB33 8BCA                    mov ecx, edx
  1092. :004CBB35 C1E902                  shr ecx, 02
  1093. :004CBB38 F3                      repz
  1094. :004CBB39 A5                      movsd
  1095. :004CBB3A 8BCA                    mov ecx, edx
  1096. :004CBB3C 6A00                    push 00000000
  1097. :004CBB3E 83E103                  and ecx, 00000003
  1098. :004CBB41 6880000000              push 00000080
  1099. :004CBB46 F3                      repz
  1100. :004CBB47 A4                      movsb
  1101. :004CBB48 6A03                    push 00000003
  1102. :004CBB4A 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  1103. :004CBB50 6A00                    push 00000000
  1104. :004CBB52 6A01                    push 00000001
  1105. :004CBB54 6800000080              push 80000000
  1106. :004CBB59 50                      push eax
  1107. :004CBB5A FF15C8005D00            Call dword ptr [005D00C8];CreateFileA
  1108. :004CBB60 8945FC                  mov [ebp-04], eax
  1109. :004CBB63 83F8FF                  cmp eax, FFFFFFFF
  1110. :004CBB66 7507                    jne 004CBB6F
  1111. :004CBB68 6AFE                    push FFFFFFFE
  1112. :004CBB6A E88D850200              call 004F40FC
  1113. :004CBB6F 6A00                    push 00000000
  1114. :004CBB71 8B45FC                  mov eax, [ebp-04]
  1115. :004CBB74 6A00                    push 00000000
  1116. :004CBB76 6850D90100              push 0001D950
  1117. :004CBB7B 50                      push eax
  1118. :004CBB7C FF1598005D00            Call dword ptr [005D0098];SetFilePointer
  1119. :004CBB82 83F8FF                  cmp eax, FFFFFFFF
  1120. :004CBB85 7507                    jne 004CBB8E
  1121. :004CBB87 6AE7                    push FFFFFFE7
  1122. :004CBB89 E86E850200              call 004F40FC
  1123. :004CBB8E 6A00                    push 00000000
  1124. :004CBB90 8D45F0                  lea eax, [ebp-10]
  1125. :004CBB93 50                      push eax
  1126. :004CBB94 8D4DF8                  lea ecx, [ebp-08]
  1127. :004CBB97 6A04                    push 00000004
  1128. :004CBB99 8B55FC                  mov edx, [ebp-04]
  1129. :004CBB9C 51                      push ecx
  1130. :004CBB9D 52                      push edx
  1131. :004CBB9E FF1590005D00            Call dword ptr [005D0090];ReadFile
  1132. :004CBBA4 85C0                    test eax, eax
  1133. :004CBBA6 7406                    je 004CBBAE
  1134. :004CBBA8 837DF004                cmp [ebp-10], 00000004
  1135. :004CBBAC 7407                    je 004CBBB5
  1136. :004CBBAE 6A03                    push 00000003
  1137. :004CBBB0 E847850200              call 004F40FC
  1138. :004CBBB5 8B45FC                  mov eax, [ebp-04]
  1139. :004CBBB8 50                      push eax
  1140. :004CBBB9 FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1141. :004CBBBF C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  1142. :004CBBC6 817DF86F6C626F          cmp [ebp-08], 6F626C6F
  1143. :004CBBCD 0F85C2000000            jne 004CBC95
  1144. :004CBBD3 6A00                    push 00000000
  1145. :004CBBD5 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  1146. :004CBBDB 6880000000              push 00000080
  1147. :004CBBE0 6A03                    push 00000003
  1148. :004CBBE2 6A00                    push 00000000
  1149. :004CBBE4 6A00                    push 00000000
  1150. :004CBBE6 68000000C0              push C0000000
  1151. :004CBBEB 50                      push eax
  1152. :004CBBEC FF15C8005D00            Call dword ptr [005D00C8];CreateFileA
  1153. :004CBBF2 8945FC                  mov [ebp-04], eax
  1154. :004CBBF5 83F8FF                  cmp eax, FFFFFFFF
  1155. :004CBBF8 7507                    jne 004CBC01
  1156. :004CBBFA 6AFE                    push FFFFFFFE
  1157. :004CBBFC E8FB840200              call 004F40FC
  1158. :004CBC01 8D45AC                  lea eax, [ebp-54]
  1159. :004CBC04 8D4DB4                  lea ecx, [ebp-4C]
  1160. :004CBC07 50                      push eax
  1161. :004CBC08 8D55BC                  lea edx, [ebp-44]
  1162. :004CBC0B 51                      push ecx
  1163. :004CBC0C 8B45FC                  mov eax, [ebp-04]
  1164. :004CBC0F 52                      push edx
  1165. :004CBC10 50                      push eax
  1166. :004CBC11 FF1594005D00   ****Call dword ptr [005D0094];GetFileTime ***
  1167. :004CBC17 85C0                    test eax, eax
  1168. :004CBC19 7507                    jne 004CBC22
  1169. :004CBC1B 6A03                    push 00000003
  1170. :004CBC1D E8DA840200              call 004F40FC
  1171. :004CBC22 6A00                    push 00000000
  1172. :004CBC24 8B45FC                  mov eax, [ebp-04]
  1173. :004CBC27 6A00                    push 00000000
  1174. :004CBC29 6850D90100              push 0001D950
  1175. :004CBC2E 50                      push eax
  1176. :004CBC2F FF1598005D00            Call dword ptr [005D0098];SetFilePointer
  1177. :004CBC35 83F8FF                  cmp eax, FFFFFFFF
  1178. :004CBC38 7507                    jne 004CBC41
  1179. :004CBC3A 6AE7                    push FFFFFFE7
  1180. :004CBC3C E8BB840200              call 004F40FC
  1181. :004CBC41 6A00                    push 00000000
  1182. :004CBC43 8D45F0                  lea eax, [ebp-10]
  1183. :004CBC46 50                      push eax
  1184. :004CBC47 8D4DF4                  lea ecx, [ebp-0C]
  1185. :004CBC4A 6A04                    push 00000004
  1186. :004CBC4C 8B55FC                  mov edx, [ebp-04]
  1187. :004CBC4F 51                      push ecx
  1188. :004CBC50 52                      push edx
  1189. :004CBC51 FF1530015D00            Call dword ptr [005D0130];WriteFile
  1190. :004CBC57 85C0                    test eax, eax
  1191. :004CBC59 7406                    je 004CBC61
  1192. :004CBC5B 837DF004                cmp [ebp-10], 00000004
  1193. :004CBC5F 7407                    je 004CBC68
  1194. :004CBC61 6A03                    push 00000003
  1195. :004CBC63 E894840200              call 004F40FC
  1196. :004CBC68 8D45AC                  lea eax, [ebp-54]
  1197. :004CBC6B 8D4DB4                  lea ecx, [ebp-4C]
  1198. :004CBC6E 50                      push eax
  1199. :004CBC6F 8D55BC                  lea edx, [ebp-44]
  1200. :004CBC72 51                      push ecx
  1201. :004CBC73 8B45FC                  mov eax, [ebp-04]
  1202. :004CBC76 52                      push edx
  1203. :004CBC77 50                      push eax
  1204. :004CBC78 FF159C005D00    ***Call dword ptr [005D009C];SetFileTime **
  1205. :004CBC7E 8B4DFC                  mov ecx, [ebp-04]
  1206. :004CBC81 51                      push ecx
  1207. :004CBC82 FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1208. :004CBC88 C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  1209. :004CBC8F 8B4DF4                  mov ecx, [ebp-0C]
  1210. :004CBC92 894DF8                  mov [ebp-08], ecx
  1211. :004CBC95 817DF80100ADDE          cmp [ebp-08], DEAD0001 ;***!***
  1212. :004CBC9C 0F8408010000            je 004CBDAA
  1213. :004CBCA2 8B45F8                  mov eax, [ebp-08]
  1214. :004CBCA5 3945F4                  cmp [ebp-0C], eax
  1215. :004CBCA8 7248                    jb 004CBCF2
  1216. :004CBCAA 8B45F4                  mov eax, [ebp-0C]
  1217. :004CBCAD B980510100              mov ecx, 00015180
  1218. :004CBCB2 2B45F8                  sub eax, [ebp-08]
  1219. :004CBCB5 2BD2                    sub edx, edx
  1220. :004CBCB7 F7F1                    div ecx
  1221. :004CBCB9 83F83C                  cmp eax, 0000003C
  1222. :004CBCBC 7334                    jnb 004CBCF2
  1223. :004CBCBE B93C000000              mov ecx, 0000003C
  1224. :004CBCC3 2BC8                    sub ecx, eax
  1225. :004CBCC5 894DC4                  mov [ebp-3C], ecx
  1226. :004CBCC8 8D4DC4                  lea ecx, [ebp-3C]
  1227. :004CBCCB 51                      push ecx
  1228. :004CBCCC 683E040000              push 0000043E
  1229. :004CBCD1 E85C810200              call 004F3E32
  1230. :004CBCD6 B801000000              mov eax, 00000001
  1231. :004CBCDB C705D0225C0000000000    mov dword ptr [005C22D0],0
  1232. :004CBCE5 5F                      pop edi
  1233. :004CBCE6 5E                      pop esi
  1234. :004CBCE7 8BE5                    mov esp, ebp
  1235. :004CBCE9 832DD4225C0040          sub dword ptr [005C22D4],40
  1236. :004CBCF0 5D                      pop ebp
  1237. :004CBCF1 C3                      ret
  1238.  
  1239. :004CBCF2 817DF80100ADDE          cmp [ebp-08], DEAD0001
  1240. :004CBCF9 0F84AB000000            je 004CBDAA
  1241. :004CBCFF 6A00                    push 00000000
  1242. :004CBD01 8D85A4FEFFFF            lea eax, [ebp+FFFFFEA4]
  1243. :004CBD07 6880000000              push 00000080
  1244. :004CBD0C 6A03                    push 00000003
  1245. :004CBD0E 6A00                    push 00000000
  1246. :004CBD10 6A00                    push 00000000
  1247. :004CBD12 68000000C0              push C0000000
  1248. :004CBD17 50                      push eax
  1249. :004CBD18 FF15C8005D00            Call dword ptr [005D00C8];CreateFileA
  1250. :004CBD1E 8945FC                  mov [ebp-04], eax
  1251. :004CBD21 83F8FF                  cmp eax, FFFFFFFF
  1252. :004CBD24 0F8480000000            je 004CBDAA
  1253. :004CBD2A 8D45CC                  lea eax, [ebp-34]
  1254. :004CBD2D 8D4DD4                  lea ecx, [ebp-2C]
  1255. :004CBD30 50                      push eax
  1256. :004CBD31 8D55DC                  lea edx, [ebp-24]
  1257. :004CBD34 51                      push ecx
  1258. :004CBD35 8B45FC                  mov eax, [ebp-04]
  1259. :004CBD38 52                      push edx
  1260. :004CBD39 50                      push eax
  1261. :004CBD3A FF1594005D00  *** Call dword ptr [005D0094];GetFileTime **
  1262. :004CBD40 85C0                    test eax, eax
  1263. :004CBD42 7455                    je 004CBD99
  1264. :004CBD44 6A00                    push 00000000
  1265. :004CBD46 8B45FC                  mov eax, [ebp-04]
  1266. :004CBD49 6A00                    push 00000000
  1267. :004CBD4B 6850D90100              push 0001D950
  1268. :004CBD50 50                      push eax
  1269. :004CBD51 FF1598005D00            Call dword ptr [005D0098];SetFilePointer
  1270. :004CBD57 83F8FF                  cmp eax, FFFFFFFF
  1271. :004CBD5A 743D                    je 004CBD99
  1272. :004CBD5C 6A00                    push 00000000
  1273. :004CBD5E 8D45F0                  lea eax, [ebp-10]
  1274. :004CBD61 50                      push eax
  1275. :004CBD62 8D4DE8                  lea ecx, [ebp-18]
  1276. :004CBD65 6A04                    push 00000004
  1277. :004CBD67 8B55FC                  mov edx, [ebp-04]
  1278. :004CBD6A C745E80100ADDE          mov [ebp-18], DEAD0001
  1279. :004CBD71 51                      push ecx
  1280. :004CBD72 52                      push edx
  1281. :004CBD73 FF1530015D00            Call dword ptr [005D0130];WriteFile
  1282. :004CBD79 85C0                    test eax, eax
  1283. :004CBD7B 741C                    je 004CBD99
  1284. :004CBD7D 837DF004                cmp [ebp-10], 00000004
  1285. :004CBD81 7516                    jne 004CBD99
  1286. :004CBD83 8D45CC                  lea eax, [ebp-34]
  1287. :004CBD86 8D4DD4                  lea ecx, [ebp-2C]
  1288. :004CBD89 50                      push eax
  1289. :004CBD8A 8D55DC                  lea edx, [ebp-24]
  1290. :004CBD8D 51                      push ecx
  1291. :004CBD8E 8B45FC                  mov eax, [ebp-04]
  1292. :004CBD91 52                      push edx
  1293. :004CBD92 50                      push eax
  1294. :004CBD93 FF159C005D00   ***Call dword ptr [005D009C];SetFileTime **
  1295. :004CBD99 8B45FC                  mov eax, [ebp-04]
  1296. :004CBD9C 50                      push eax
  1297. :004CBD9D FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1298. :004CBDA3 C745FCFFFFFFFF          mov [ebp-04], FFFFFFFF
  1299. :004CBDAA 683D040000              push 0000043D
  1300. :004CBDAF E81E800200              call 004F3DD2
  1301. :004CBDB4 33C0                    xor eax, eax
  1302. :004CBDB6 E920FFFFFF              jmp 004CBCDB
  1303. :004CBDBB 837DFC00                cmp [ebp-04], 00000000
  1304. :004CBDBF 740A                    je 004CBDCB
  1305. :004CBDC1 8B45FC                  mov eax, [ebp-04]
  1306. :004CBDC4 50                      push eax
  1307. :004CBDC5 FF154C015D00            Call dword ptr [005D014C];CloseHandle
  1308. :004CBDCB 683F040000              push 0000043F
  1309. :004CBDD0 E8FD7F0200              call 004F3DD2
  1310. :004CBDD5 33C0                    xor eax, eax
  1311. :004CBDD7 5F                      pop edi
  1312. :004CBDD8 5E                      pop esi
  1313. :004CBDD9 8BE5                    mov esp, ebp
  1314. :004CBDDB 5D                      pop ebp
  1315. :004CBDDC C3                      ret
  1316.  
  1317. OK, that's enough dead listing for now... we know now that the
  1318. REAL protection may call :004CBA50 (the beginning of the huge
  1319. code snippet above with GetFileTime and other file opening and
  1320. closing goodies)... and wdasm gives us the caller (only one...
  1321. THE TARGET!... don't you feel it?)
  1322.  
  1323. :004C8843   ;This is the call that triggers everything
  1324.           ;I told you: DO NOT FORGET IT
  1325. :004CBA50 55                      push ebp
  1326. :...                          ...and the rest of the huge snippet
  1327. Therefore let's have a look at the caller... here it is:
  1328.    :call_the_time_checking_huge_snippet
  1329. :004C8843 E808320000              call 004CBA50 ;call time checks
  1330. :004C8848 85C0                    test eax, eax ;on non zero
  1331. :004C884A 7507                    jne 004C8853  ;go go_on
  1332. :004C884C 6A0D                    push 0000000D ;do not push
  1333. :004C884E E8A9B80200              call 004F40FC ;do not call here
  1334.   :go_on
  1335. :004C8853 E8CC1D0500              call 0051A624 ;continue here
  1336. :004C8858 8B4510                  mov eax, [ebp+10]
  1337. :004C885B 50                      push eax
  1338. :004C885C E8298DF7FF              call 0044158A
  1339. :004C8861 F60540F15C0008          test byte ptr [005CF140], 08
  1340. :004C8868 0F84BC010000            je 004C8A2A
  1341. :004C886E C7451400000000          mov [ebp+14], 00000000
  1342.  
  1343. Therefore the crack is clear
  1344. ** how to crack MSPublisher97 (trial 60 days), by +ORC, April
  1345. 1997**
  1346. If you have NOT already sprenged MSpublisher time protection
  1347. search for
  1348. :004C8843 E808320000       call 004CBA50 ;trigger time checks
  1349. and change it to
  1350. :004C8843 E910000000       jmp 004C8853 ;don't trigger
  1351. If you  DO have already sprenged MSpublisher time protection
  1352. FIRST search for
  1353. :004C8843 E808320000      call 004CBA50 ;trigger time checks
  1354. and change it to
  1355. :004C8843 E910000000      jmp 004C8853  ;don't trigger
  1356. THEN search for
  1357. :004F4103 EB09            jmp 004F410E  ;jmp anyway
  1358. and change it to
  1359. :004F4103 7509            jne 004F410E  ;jne
  1360. THEN search for
  1361. :004F410C EB06            jmp 004F4114  ;jmp anyway
  1362. and change it to
  1363. :004F410C 7506            jne 004F4114  ;jne
  1364. **********************************************************
  1365.  
  1366. LET'S CRACK MICROSOFT'S MONEY 97 and 95 NOW
  1367. Let's finish this lesson with another sound hit at Micro$oft.
  1368. This is the main part of the strainer to next year's +HCU, please
  1369. solve it (it's MUCH more easy than last year's strainer).
  1370. I'm cracking here Microsoft MONEY 97, 90 days trial version I
  1371. found on the cd-cover of a review called PC-PRO, issue 31, MAY
  1372. 1997 (but I bought it in transit at Heathrow airport for three
  1373. pounds at the beginning of April and not in May, as usual in this
  1374. awful commerce oriented society even minutiae like the dates of
  1375. the issues of magazines are completely false :=(
  1376. This is another kind of program I personally would not touch with
  1377. a pole, nor would I use it, even if somebody would pay me for
  1378. it... but I know that a lotta suckers buy  these ridiculous
  1379. applications greedly... such kind of customers do pay a lot of
  1380. money to Micro$oft... and to the banks, and to the various
  1381. asinine "investor advisors", and to all the awful commercial
  1382. people that has given us this grey world of unhappiness, and
  1383. inequality, where only irrelevance and bad taste are valued,
  1384. where knowledge is "allowed" only and only if it helps them to
  1385. make more money (not happiness)... where poetry and feelings are
  1386. considered useless and obsolete by the "market forces"... My, how
  1387. I hate cheerfully this whole bunch of "market operators"! How I
  1388. hope that the people they have enslaved will one day hang the
  1389. whole lot of them, pinning the TV-news moderators to the
  1390. doors of the TV-studios by their tongue as a good collateral
  1391. measure... (the sooner this happens the better, give it a move
  1392. please, I would like to take some nice photos of the hanging
  1393. bodies),... ok, enough, let's crack first of all the programs
  1394. used by this outrageous people, hoping that my crackings will
  1395. spread enough to diminish Gates' cashflow a little...  a pebble
  1396. of sand is nothing less than a pebble of sand, after all, let's
  1397. never forget it :=)
  1398.  
  1399. Let's see what happens here... once more with GetLocalTime? Let's
  1400. see... here you have three calling "points" for GetLocalTime:
  1401. at 45804D, at 46A308 and at 5DA056, let's call them 45, 46 and
  1402. 5D. Since the one at 46 is referenced by not less than 80 calls,
  1403. we will  deem it more important than the first one at 45 (three
  1404. calls) and the third one at 5D (two calls).... but wait...
  1405.  
  1406. WAIT, HISTORY IS IMPORTANT
  1407.      But wait...may be we should delve a little deeper in
  1408. Micro$oft's protection strategies, may be you should  have FIRST
  1409. a look at an OLDER copy of Micro$oft's Money... say version 
  1410. 3.00p of February 1994... the file you have to crack is here
  1411. MNYDEMO.EXE, length 1.173.184 bytes, from 8/2/1994... I found it
  1412. on a old cd-rom: PCHOME n.8 from June 1994, as usual, quite a lot
  1413. of magazines will have had the "privilege" of burning this trial
  1414. version on their CD-ROMs during that summer... you should be able
  1415. to find a copy of it on the Web too, if you happen to know how
  1416. to search and, what's even more important, WHERE to search... as
  1417. I said elsewhere, on the Web you can find almost everything...
  1418. provided you already know where it is :=) 
  1419.  
  1420. THE STRAINER... FIRST OF ALL YOU'LL HAVE TO FIND IT!
  1421.      Anyway, since this lesson is intended as a "strainer" for
  1422. next years +HCU, a part of your duty is TO FIND the targets we
  1423. have to crack... this will be easy for MS MONEY 97, but (I hope)
  1424. not so easy for MS MONEY from 1994... believe me, this searching
  1425. is  a very important art... you may be just lucky, or already
  1426. have (like me) a huge collection of many CD-ROM that appeared on
  1427. magazines covers and that you bought at discount prices... or you
  1428. may have to beg or implore or exchange programs with some old guy
  1429. from New Zealand or a weird wannaby warez dude from Corea, which
  1430. happens to have the copy you are interested in... you may have
  1431. to examine old usenet discussion groups, to peruse old
  1432. PC-magazines... to delve inside a lot of useless pages...
  1433. searching for your nugget. But you'll gain a lot of knowledges
  1434. in this process...  ignorantia est carentia scientiae debitae.
  1435.  
  1436. OLD VERSION, SAME LIMITATIONS
  1437.      The "trial" old demo of MS-Money 94 has an analogous
  1438. protection scheme to  the very recent MONEY '97 trial version?
  1439. Please check... if it is so, that would be VERY important for
  1440. us... history and evolution of  a targets' protections IS  INDEED
  1441. very important. If you'll delve inside cracking as an art, as I
  1442. would like you to, you'll see that patterns and trends play (like
  1443. in  real life) a tremendous unproportionated role... protections
  1444. mirror our society (at times I believe that everything does, but
  1445. me): real knowledge and innovation plays almost no role, stupid
  1446. "trends" and repetitions of the same boring schemes do actually
  1447. make the 99% of the "reality". 
  1448.  
  1449.      In the meantime life keep worsening for the stupid slaves,
  1450. more and more useless stinking cars are polluting our cities and
  1451. the "new" programs we buy are slower  and by far not as good and
  1452. powerful as the old DOS programs of 1990... a proof? For the dead
  1453. listing of this target you'll NOT be able to use Word 7.0 ("file
  1454. is too huge"), but you'll still be able to use Word 2.0 from
  1455. 1994... funny, isn't it?
  1456.  
  1457.      This old "trial" demo of MS-Money has THREE levels of
  1458. protection:
  1459.  
  1460. 1)   The system date in your computer must be 1994 or 1995
  1461.  
  1462. 2)   There is a Cinderella 60 days limit (Micro$oft was not yet
  1463. a "90 days" enterprise... we are watching here the BIRTH of this
  1464. MS-protection scheme :=) 
  1465.  
  1466. 3)   Transactions (i.e. fields of this database) can only be
  1467. entered within a 60-days period (this is at the same part the
  1468. "tricky" part of this crack and a key to the crack :=)
  1469.  
  1470. HOW DO YOU BEGIN?
  1471.  
  1472. I'm writing this to teach you MANY cracking techniques, let's
  1473. pack this target from another direction, let's forget winice for
  1474. a while and use a bit of "dead listing", a program like winsight
  1475. and some of the brain we are supposed to have:
  1476.  
  1477. 1)   Have a look at the messages i.e.:
  1478.  install our target...
  1479. run it as it should, changing the OS date to 1994
  1480. change OS date past the 60 days limit
  1481. look at the message ("The 60-days limit of this working model..."
  1482.  
  1483. 2)   Fire Borland's Winsight (I'm using here version 1.30 from
  1484. an old cracked Delphi, but you'll find hundred of them on the
  1485. web) It will describe you EXACTLY the nagwindow you have on your
  1486. screen:
  1487.  
  1488. Popup 0610 {#32770:Dialog} mnydemo.exe (144,183)-(523,345)
  1489. "Notice of Expiration" You may even get details on this Popup 610, if you
  1490.  feel like it.
  1491.  
  1492. 4)   You have the NAME (very important). Search it inside the
  1493. dead listing (you have previously made with WCB or with wdasm)
  1494. of MNYDEMO.EXE, you'll get the following:
  1495.  
  1496. Name: DialogID_0494, # of Controls=004, Caption:"Notice of Expiration"
  1497. 001 - ControlID:02CE, Control Class:"" Control Text:"The 60-day
  1498. limit of this working model has expired." 
  1499.  
  1500. See what's important? ID_0494... that's important.
  1501.  
  1502. 5) Now search ID_0494 in your dead listing... you'll find THREE
  1503. occurrences (i.e. they call three time the 60-days limit) let's
  1504. examine them (with context):
  1505. Block 6 at 263: 6.263 is called "cascade" (switch) from the beginning of
  1506. block 6:
  1507.  
  1508. :0006.0012 57                     push di
  1509. :0006.0013 6A00                   push 0000
  1510. :0006.0015 9AFFFF0000             call USER.GETWINDOWWORD
  1511.       (GETWINDOWWORD returns a 16-bit WORD value from the extra
  1512.        info associated with a  window. Push handle and index (in 
  1513.        bytes) in the extra memory where the value will be found)
  1514. :0006.001A 8BF0                   mov si, ax
  1515. :0006.001C 8B460C                 mov ax, [bp+0C]
  1516. :0006.001F 3DA100                 cmp ax, 00A1 ;is it 161?
  1517. :0006.0022 7503                   jne 0027 ;may call NoE if not
  1518. ...
  1519. :0006.0027 7729                   ja 0052  ;may call NoE if more
  1520. ...
  1521. :0006.0052 3D1501                 cmp ax, 0115
  1522. :0006.0055 7503                   jne 005A ;if not 115
  1523. ...
  1524. :0006.005A 7712                   ja 006E ;more? Call NoE
  1525. ...
  1526. :0006.006E 2D0102                 sub ax, 0201 ;sub 201
  1527. :0006.0071 7503                   jne 0076 ;may call NoE
  1528. ...
  1529. :0006.0076 48                     dec ax   ;-1
  1530. :0006.0077 48                     dec ax   ;-1
  1531. :0006.0078 7503                   jne 007D ;may call NoE
  1532. ...
  1533. :0006.007D 2D9102                 sub ax, 0291  ;sub 291
  1534. :0006.0080 7503                   jne 0085 ;do not call NoE
  1535. :0006.0082 E9D701                 jmp 025C ;call NoE ******
  1536. ...
  1537. :0006.025C 57                     push di
  1538. :0006.025D 9AFFFF0000             call USER.GETPARENT
  1539.       (This returns the handle to a window's parent. Function
  1540.        returns window's parent handle if successful and NULL if
  1541.        no parent or error)
  1542.  
  1543. * Possible Reference to Dialog: DialogID_0494 
  1544.                                   |
  1545. :0006.0263 689404        push 0494  ;HERE! NOTICE OF EXPIRATION
  1546. :0006.0266 FF760A        push word ptr [bp+0A]
  1547. :0006.0269 FF7608        push word ptr [bp+08]
  1548. :0006.026C FF7606        push word ptr [bp+06]
  1549. :0006.026F 9AFFFF0000    call USER.SENDMESSAGE ;bagger off, bad guy!
  1550. :0006.0274 EB14          jmp 028A
  1551.  
  1552. Ok, for block 6 what should we say?  Can we start our crack from
  1553. here?
  1554.  
  1555. Let's have a look at the next block:
  1556. Block 8 at 17D2:
  1557.  
  1558. :0008.17CA 8B46F4                 mov ax, [bp-0C]
  1559. :0008.17CD 3946F0                 cmp [bp-10], ax
  1560. :0008.17D0 7246                   jb 1818
  1561.  
  1562. * Possible Reference to Dialog: DialogID_0494 
  1563.                                   |
  1564. :0008.17D2 689404                 push 0494 ;HERE! NOTICE OF EXPIRATION
  1565. :0008.17D5 685505                 push SEG ADDR of Segment 0028
  1566. :0008.17D8 684C15                 push 154C
  1567. :0008.17DB FF362C0A               push word ptr [0A2C]
  1568. :0008.17DF 6A00                   push 0000
  1569. :0008.17E1 6A00                   push 0000
  1570. :0008.17E3 6A00                   push 0000
  1571. :0008.17E5 9A34019911             call 000.0134 ;call KERNEL.MAKEPROCINSTANCE
  1572.  
  1573.   that's the check for all open windows (Useless with 32 bit)
  1574.  
  1575. And, please, what do we have at 28.154C?
  1576. Exported fn(): DLGPROCDEMO - Ord:0019
  1577.  
  1578. :0028.154C 8CD8                   mov ax, ds
  1579. :0028.154E 90                     np (always suspect these
  1580.           funny nops, somebody patched here?... :=)
  1581. :0028.154F 45                     inc bp
  1582. :0028.1550 55                     push bp
  1583. :0028.1551 8BEC                   mov bp, sp
  1584. :0028.1553 1E                     push ds
  1585. :0028.1554 8ED8                   mov ds, ax
  1586. :0028.1556 83EC02                 sub sp, 0002
  1587. :0028.1559 56                     push si
  1588. :0028.155A 8B4E0C                 mov cx, [bp+0C] ;fetch bp+C
  1589. :0028.155D 8BC1                   mov ax, cx
  1590. :0028.155F 2D0F00                 sub ax, 000F  
  1591. :0028.1562 740E                   je 1572         ;was it 15?
  1592. :0028.1564 2D0101                 sub ax, 0101    ;was it 272?
  1593. :0028.1567 7425                   je 158E
  1594. :0028.1569 48                     dec ax
  1595. :0028.156A 7454                   je 15C0         ;273?
  1596. :0028.156C 33C0                   xor ax, ax
  1597. :0028.156E E98900                 jmp 15FA
  1598.  
  1599.  
  1600. A jump below followed by a switch tree... is it interesting for
  1601. us? You'll answer!
  1602.  
  1603. Finally, let's have a look at the THIRD and last occurrence of 
  1604. our "Notice of expirations" at block 52 at 2465:
  1605.  
  1606.  
  1607. * Possible Ref to Menu: MAINMENU, Item: "Future Transactions"
  1608.                                   |
  1609. :0052.2449 6A02                   push 0002
  1610. :0052.244B 9AE00ED424             call 0006.0EE0
  1611. :0052.2450 837EF800               cmp word ptr [bp-08], 0000
  1612. :0052.2454 7503                   jne 2459
  1613. :0052.2456 E9CE00                 jmp 2527
  1614.  
  1615. :0052.2459 8B5EFC                 mov bx, [bp-04]
  1616. :0052.245C FF7718                 push word ptr [bx+18]
  1617. :0052.245F 9AFFFF0000             call USER.GETPARENT
  1618. :0052.2464 50                     push ax
  1619. * Possible Reference to Dialog: DialogID_0494 
  1620.                                   |
  1621. :0052.2465 689404                 push 0494 ;HERE! NOTICE OF EXPIRATION
  1622.  
  1623. * Possible Ref to Menu: MAINMENU, Item: "Account Book"
  1624.                                   |
  1625. :0052.2468 6A01                   push 0001
  1626. :0052.246A 6A00                   push 0000
  1627. :0052.246C 6A00                   push 0000
  1628. :0052.246E 9A1B250000             call USER.SENDMESSAGE
  1629.  
  1630.  
  1631. Well, I think this is enough:
  1632. The crack for it is pretty obvious, is it?
  1633.  
  1634. Let's start with a simple substitution:
  1635. instead of
  1636. :0008.17D0 7246            jb 1818
  1637. let's have
  1638. :0008.17D0 55              push bp
  1639. :0008.17D0 5D              pop bp
  1640. (nooping it)
  1641.  
  1642. That's it, folk!...  but, wait... all this DOES NOT work
  1643. correctly... did I forgot something?
  1644. THAT's the Strainer! Solve it (you have time until SEPTEMBER 1997).
  1645.  
  1646. THE STRAINER: SOLVE IT!
  1647.  
  1648. You want to be a +HCUker? SOLVE the crack for MS-Money (old
  1649. version and new version), I want to get from you (directly to
  1650. na526164@anon.penet.fi if it still works or else through channel
  1651. you have to find yourself)
  1652.  
  1653. 1)   The complete and WELL described crack to MSMONEY version 3 (1994)
  1654.      (60 days trial protection)
  1655. 2)   The complete and WELL described crack to MSMONEY 97 (1997)
  1656.      (90 days trial protection)
  1657. 3)   The reason for the crack I used for Winproject instead of
  1658. nooping the alternative location... which would have seen more
  1659. obvious at first glance.
  1660.  
  1661.      I would like you (since these cracks are alltogether much
  1662. more easy than the Instant access strainer we used last year) to
  1663. DELVE DEEP inside the date-encryption routines of these programs,
  1664. explaining them perfectly.
  1665.  
  1666.      Please use a language that newbyes can easily follow... I
  1667. do not intend to work in order to re-explain once more things you
  1668. should have explained well in the first time.
  1669.  
  1670.      Best protection busters (and best approaches) will enter the
  1671. +HCU. Lamers and people that have copied from other will be left
  1672. out.
  1673.      +HCU 1998 will begin on 1 Januar 1998. The above solutions
  1674. must be sent to me BEFORE september 1997. Should anon.penet die,
  1675. I'll reopen another anonymous channel end August.
  1676.  
  1677. Well, that's it for this lesson, reader. Not all lessons of my
  1678. tutorial are or will be on the Web.
  1679.  
  1680.      You'll obtain the missing lessons IF AND ONLY IF you mail
  1681. me back (via anon.penet.fi) with some tricks of the trade I may
  1682. not know that YOU discovered. Mostly I'll actually know them
  1683. already, but if they are really new you'll be given full credit,
  1684. and even if they are not, should I judge that you "rediscovered"
  1685. them with your work, or that you actually did good work on them,
  1686. I'll send you the remaining lessons nevertheless. Your
  1687. suggestions and critics on the whole crap I wrote are also
  1688. welcomed. Do not annoy me with requests for warez, everything is
  1689. on the Web, learn how to search, for Hiawatha sake.
  1690.  
  1691.      "If you give a man a crack he'll be hungry again
  1692.      tomorrow, but if you teach him how to crack, he'll
  1693.      never be hungry again"
  1694.  
  1695.                                  E-mail +ORC
  1696.                            +ORC na526164@anon.penet.fi
  1697.