<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-17335939</id><updated>2011-12-14T18:07:40.565-09:00</updated><title type='text'>What The Hack</title><subtitle type='html'>Strange as it may seem, the reasons for cracking are very important for the success of our task. We (at least we old crackers) crack AGAINST society, and OPPOSING laws and conventions. We usually DO NOT crack for money or for other "commercial" reasons (just sometimes, and we are expensive: I have plenty of money already and my services are VERY expensive if you need an aimed deprotection).</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ahackaday.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ahackaday.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>bruenet</name><uri>http://www.blogger.com/profile/01644616483340492993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17335939.post-113821482417923475</id><published>2004-05-09T15:38:00.000-08:00</published><updated>2006-01-25T09:48:51.446-09:00</updated><title type='text'>Lesson 4 : Time protections - A short history of time</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Courier;font-size:85%;"&gt;(Best viewed with good old Courier).&lt;br /&gt;                              &lt;br /&gt;            Time protections in Windows,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="font-family:Courier;font-size:85%;"&gt;For 'time protections' we intend a serie of protection schemes&lt;br /&gt;which are aimed to restrict the use of an application&lt;br /&gt;ONE&lt;br /&gt;-to a predetermined amount of days, say 30 days, starting with&lt;br /&gt;the first day of installation... 'CINDERELLA' TIME PROTECTIONS&lt;br /&gt;TWO&lt;br /&gt;-to a predetermined period of time (ending at a specific fixed&lt;br /&gt;date) independently from the start date... 'BEST_BEFORE' TIME&lt;br /&gt;PROTECTIONS&lt;br /&gt;THREE&lt;br /&gt;-to a predetermined amount of minutes and/or seconds each time&lt;br /&gt;you fire them... 'COUNTDOWN' TIME PROTECTIONS&lt;br /&gt;FOUR&lt;br /&gt;-to a predetermined amount of 'times' you use them, say 30&lt;br /&gt;times. Strictly speaking these protections are not 'time'&lt;br /&gt;dependent, but since their schemas are more or less on the&lt;br /&gt;same lines as in the cases ONE, TWO and THREE, we will examine&lt;br /&gt;them inside this part of my tutorial. Let's call them 'QUIVER'&lt;br /&gt;protections since, as with a quiver, you only have a&lt;br /&gt;predetermined amount of 'arrows' to shoot (and if you never&lt;br /&gt;went fishing with bow and arrows, on a mountain river, you do&lt;br /&gt;not know what's real zen... the fish springs out suddendly, but&lt;br /&gt;you 'knew' it, and your fingers had already reacted... a lot of&lt;br /&gt;broken arrows on the rocks, though :=)&lt;br /&gt;&lt;br /&gt;     As first example I have chosen a double protected&lt;br /&gt;application: it has a time protection (of the 'Cinderella' type,&lt;br /&gt;limited to 90 days) as well as a 'quiver' protection&lt;br /&gt;scheme, which is the other -not time bounded- current variante&lt;br /&gt;of the shareware protections... i.e. you should use this program&lt;br /&gt;only 25 times before a protection lock.&lt;br /&gt;It's a relatively 'old' windows protection (april 1995). I found&lt;br /&gt;the program on a cheap cd-rom, which I bought (in a bunch with&lt;br /&gt;9 others) a month ago: 6000 megabytes of bad protected software&lt;br /&gt;for the price of a good glass of wine! PCPLUS SUPER CD n°13,&lt;br /&gt;originally edited in July 1995. I believe it should be pretty&lt;br /&gt;easy to find it or to find this program on the Web if you do not&lt;br /&gt;already have it inside your collection of cheap CD-ROM. Another&lt;br /&gt;advantage of this program, from our perspective, is that the&lt;br /&gt;whole PCFILE.EXE represents de facto the protection scheme&lt;br /&gt;itself... not excessively overbloated: only 8912 bytes, when the&lt;br /&gt;'real' application works inside the (huge and overbloated)&lt;br /&gt;pcf.dll, which will be called only if the user passes the&lt;br /&gt;protection. You can easily print the WHOLE disassembled listing&lt;br /&gt;of PCFILE.EXE (46 Wordperfect pages), that you'll quickly get&lt;br /&gt;through wcb (for instance). For once you'll have a COMPLETE and&lt;br /&gt;COMPLICATED protection scheme under your eyes.&lt;br /&gt;     Basically we'll study here the 'beginning' of more complex&lt;br /&gt;time protection schemes, the ones we'll crack with our later&lt;br /&gt;lessons. Some protection elements are here still 'naïv', but the&lt;br /&gt;protectionists have -at least- worked a little against easy&lt;br /&gt;cracks... which makes this protection even more interesting for&lt;br /&gt;us :=)&lt;br /&gt;     This program shows even a 'nasty' behaviour: should you use&lt;br /&gt;it after the locking snapped, it will obliterate the whole (main)&lt;br /&gt;pcf.dll from your harddisk, without any warning. This obviously&lt;br /&gt;does not mean anything at all here, but it's the secret to more&lt;br /&gt;advanced (and nastier) protection schemes, so you better have a&lt;br /&gt;look at it too. Nice, enough let's start now.&lt;br /&gt;[PCFILE] (aka the 'dll counter' method)&lt;br /&gt;PCFILE, version 8, (PCFILE.EXE, 8912 bytes, 17 apr 1995, Atlantic&lt;br /&gt;Coast software) is a database program which will be disabled&lt;br /&gt;after having 90 days from its first use or after having used it&lt;br /&gt;25 times, whichever comes first.&lt;br /&gt;     We'll begin as usual: just use your wordprocessor search&lt;br /&gt;capacities to search inside the whole directory (and&lt;br /&gt;subdirectories) of PCFILE for words like 'demo' 'order' 'contact'&lt;br /&gt;'expire' 'disabling' 'evaluation' and so on (alternatively, like&lt;br /&gt;I do, you can write your own little C utility to do it even more&lt;br /&gt;quickly and automatically on the whole 600 megabytes CD-ROM you&lt;br /&gt;have inserted on your drive :=)... You'll see immediately that&lt;br /&gt;only two of the PC-files can interest us: PCFILE.EXE and&lt;br /&gt;PCFRES.DLL. A quick 'turbodumping' of PCFILE.EXE itself will&lt;br /&gt;fetch all filenames and nagstrings we need to be happy from the&lt;br /&gt;end of the file... here they are:&lt;br /&gt;A)   010C      PCF.DAT&lt;br /&gt;B)   0114      PCF.DLL&lt;br /&gt;1)   2.011C    PC-FIle demo has been disabled...&lt;br /&gt;2)   2.01A2    The PC-File demo program has reached the maximum&lt;br /&gt;               allowable 25 sessions...&lt;br /&gt;3)   2.0298    This demo version of PC-File 8 is designed...&lt;br /&gt;4)   2.035A    The PC-File demo program has reached... 90 days&lt;br /&gt;5)   2.0474    This is the last demo session...&lt;br /&gt;&lt;br /&gt;When I see something like this I know that the crack is already&lt;br /&gt;made... it's so easy I can't understand why they don't just give&lt;br /&gt;their software away for free... money I suppose, people seem to&lt;br /&gt;be obsessed with this prepuberal problem... how stupid, besides:&lt;br /&gt;neminem pecunia divitem fecit.&lt;br /&gt;Beside, snooping inside files can be graet fun! At times you find&lt;br /&gt;some 'real' info inside them... Have a look at lotus Wordpro,&lt;br /&gt;for instance, you'll read something like: 'You idiot! Can't flow&lt;br /&gt;a partial paragraph!'; 'Yow! Need to SetFoundry() on this object!';&lt;br /&gt;'Dude! I couldn't find myself!'; 'Ain't nothing to pop!' and many&lt;br /&gt;other amenities which throw a crude light on the life (and possible&lt;br /&gt;blunders) of commercial programmers and on the well know fact&lt;br /&gt;that most application are throw out FULL of bugs just in order&lt;br /&gt;to make money ('bugs for bucks').&lt;br /&gt;OK, back to our cracking: let's just search for the above NUMBERS&lt;br /&gt;inside the code of PCFILE:&lt;br /&gt;1)   PC-File has been disabled: 011C&lt;br /&gt;&lt;br /&gt;  1.1100 &amp;gt;C8040100         enter   0104, 00&lt;br /&gt;  1.1104  56               push    si&lt;br /&gt;  1.1105  C70632060000     mov     word ptr [0632], 0000&lt;br /&gt;  1.110B  6A00             push    0000&lt;br /&gt;  1.110D  B81401           mov     ax, 0114; THIS is PCF.DLL&lt;br /&gt;  1.1110  8946FE           mov     [bp-02], ax&lt;br /&gt;  1.1113  50               push    ax&lt;br /&gt;  1.1114  9A2E0D0212       call    1:0D2E ;what happens here?&lt;br /&gt;  1.1119  83C404           add     sp, 0004&lt;br /&gt;  1.111C  40               inc     ax&lt;br /&gt;  1.111D  7532             jne     1151&lt;br /&gt;  1.111F  1E               push    ds&lt;br /&gt;  1.1120  681C01           push    011C  ;HERE****&lt;br /&gt;  1.1123  8D86FCFE         lea     ax, [bp-0104]&lt;br /&gt;  1.1127  16               push    ss&lt;br /&gt;  1.1128  50               push    ax&lt;br /&gt;  1.1129  9A6E110000       call    USER._WSPRINTF&lt;br /&gt;&lt;br /&gt;Therefore this target will be disabled after a check at the&lt;br /&gt;beginning of WinMain (1.1100) if ax, after having been&lt;br /&gt;incremented is non zero. We should have a look at the routine at&lt;br /&gt;1:0D2E to see what happens... but let's first check the other&lt;br /&gt;nagstrings... no point in delving immediatly inside routines.&lt;br /&gt;&lt;br /&gt;2) The PC-File demo has reached the maximum allowable 25&lt;br /&gt;sessions... 01A2&lt;br /&gt;  1.11C9 &amp;gt;807EFC66                 cmp     byte ptr [bp-04], 66&lt;br /&gt;  1.11CD  7C0F                     jl      11DE&lt;br /&gt;  1.11CF  6AFF                     push    FFFF&lt;br /&gt;  1.11D1  9A36120000               call    USER.MESSAGEBEEP&lt;br /&gt;  1.11D6  6A00                     push    0000&lt;br /&gt;  1.11D8  1E                       push    ds&lt;br /&gt;  1.11D9  68A201                   push    01A2 ; HERE ****&lt;br /&gt;  1.11DC  EB62                     jmp     1240&lt;br /&gt;Therefore 25 sessions if byte ptr [bp-04] &amp;gt;= 66 (as you can see,&lt;br /&gt;the protectionists did not use anything vaguely similar to 25dec,&lt;br /&gt;which is 19hex).&lt;br /&gt;&lt;br /&gt;3)   This demo version of PC-File 8 is designed... : 0298&lt;br /&gt;&lt;br /&gt;  1.11DE &amp;gt;807EFC4D         cmp     byte ptr [bp-04], 4D&lt;br /&gt;  1.11E2  7518             jne     11FC&lt;br /&gt;  1.11E4  6A00             push    0000&lt;br /&gt;  1.11E6  1E               push    ds&lt;br /&gt;  1.11E7  689802           push    0298 ;HERE ****&lt;br /&gt;  1.11EA  1E               push    ds&lt;br /&gt;  1.11EB  FF361000         push    word ptr [0010]&lt;br /&gt;  1.11EF  6A00             push    0000&lt;br /&gt;  1.11F1  9A48120000       call    USER.MESSAGEBOX&lt;br /&gt;  1.11F6  C70632060100     mov     word ptr [0632], 1 ;Flag 632!&lt;br /&gt;This 'Welcome nagged user' message appears therefore only THE&lt;br /&gt;FIRST time you run, when our byte ptr [bp-04] has been set to 4D.&lt;br /&gt;That figures: 66h - 4Dh = 19h, which are the 25 times allowed...&lt;br /&gt;the programmers from Atlantic Coast must have thought something&lt;br /&gt;like 'Stupid crackers will not fetch our nice clever protection:&lt;br /&gt;he'll be searching for byte 19h! Ah!' Note the flag set in&lt;br /&gt;location [632] if it's the first run :=)&lt;br /&gt;&lt;br /&gt;4)   The PC-File demo program has reached... 90 days : 035A&lt;br /&gt;  1.1211  833E320600               cmp     word ptr [0632], 0000&lt;br /&gt;  1.1216  7565                     jne     127D&lt;br /&gt;  1.1218  A13406                   mov     ax, [0634]&lt;br /&gt;  1.121B  8B163606                 mov     dx, [0636]&lt;br /&gt;  1.121F  2B062C06                 sub     ax, [062C]&lt;br /&gt;  1.1223  1B162E06                 sbb     dx, [062E]&lt;br /&gt;  1.1227  83FA76                   cmp     dx, 0076&lt;br /&gt;  1.122A  7251                     jb      127D&lt;br /&gt;  1.122C  7705                     ja      1233&lt;br /&gt;  1.122E  3D00A7                   cmp     ax, A700&lt;br /&gt;  1.1231  764A                     jbe     127D&lt;br /&gt;&lt;br /&gt;  1.1233 &amp;gt;6AFF                     push    FFFF&lt;br /&gt;  1.1235  9A3C130000               call    USER.MESSAGEBEEP&lt;br /&gt;  1.123A  6A00                     push    0000&lt;br /&gt;  1.123C  1E                       push    ds&lt;br /&gt;  1.123D  685A03                   push    035A ; HERE!&lt;br /&gt; &lt;br /&gt;There, location [634] in ax and location [636] in dx.&lt;br /&gt;ax subtracts location [62C] and dx subtracts with carry location&lt;br /&gt;[62E]. Is it more than 76h? (Which is 118 dec), Tell user he has&lt;br /&gt;reached 90 days. Is it exactly 76h? Then have a look at ax, if&lt;br /&gt;it is more than A700 then tell user the same.&lt;br /&gt;&lt;br /&gt;5)        This is the last demo session... : 0474&lt;br /&gt;&lt;br /&gt;  1.132D &amp;gt;56               push    si&lt;br /&gt;  1.132E  9AFFFF0000       call    KERNEL._LCLOSE&lt;br /&gt;  1.1333  807EFC66         cmp     byte ptr [bp-04], 66&lt;br /&gt;  1.1337  7C19             jl      1352&lt;br /&gt;  1.1339  6AFF             push    FFFF&lt;br /&gt;  1.133B  9AFFFF0000       call    USER.MESSAGEBEEP&lt;br /&gt;  1.1340  6A00             push    0000&lt;br /&gt;  1.1342  1E               push    ds&lt;br /&gt;  1.1343  687404           push    0474 ;HERE****&lt;br /&gt;  1.1346  1E               push    ds&lt;br /&gt;  1.1347  FF361000         push    word ptr [0010]&lt;br /&gt;  1.134B  6A10             push    0010&lt;br /&gt;  1.134D  9AFFFF0000       call    USER.MESSAGEBOX&lt;br /&gt;&lt;br /&gt;  1.1352 &amp;gt;1E               push    ds&lt;br /&gt;  1.1353  681401           push    0114 ;this is PCF.DLL&lt;br /&gt;  1.1356  6A01             push    0001&lt;br /&gt;  1.1358  9AFFFF0000       call    KERNEL.WINEXEC ;exec PCF.DLL&lt;br /&gt;&lt;br /&gt;     And here, finally we have our good old [bp-04] -once more-&lt;br /&gt;compared to 66h. Notice that there is no Jumpequal nor&lt;br /&gt;jumpgreater check. This means that the program ALREADY KNOWS that&lt;br /&gt;the user has reached here for the first time the fatidic 66. This&lt;br /&gt;means (of course) that this code will be examined AFTER having&lt;br /&gt;incremented the counter of the protection, which must therefore&lt;br /&gt;happen somewhere between 1.123D and 1.132D (the end of routine&lt;br /&gt;4 and the beginning of routine 5). If you have printed the whole&lt;br /&gt;disassembled listing of PCFILE.EXE and if you have read my other&lt;br /&gt;lessons about dead listing (-&amp;gt; 9.3 and 9.4) you do not need any&lt;br /&gt;more to read the following part of this lesson. Choose your&lt;br /&gt;armchair and sit there with a pen, your listing and a good&lt;br /&gt;cocktail (may I suggest a good Martini-Wodka? Don't use anything&lt;br /&gt;else but Moskowskaja). The moment to start 'feeling' the code has&lt;br /&gt;come! You can do everything alone. Write colored arrows on your&lt;br /&gt;listing! The first (or the fourth) simphony of Mahler on your CD!&lt;br /&gt;Everything will appear!&lt;br /&gt;     Indeed, if you prefer to follow here, behold: at 1.12B2 we&lt;br /&gt;have a call KERNEL._LOPEN wich opens the file PCF.DLL (0114):&lt;br /&gt;&lt;br /&gt;  1.12AD  681401      push    0114 ;want pcf.dll&lt;br /&gt;  1.12B0  6A01        push    0001&lt;br /&gt;  1.12B2  9AFFFF0000  call    KERNEL._LOPEN ;open it&lt;br /&gt;&lt;br /&gt;and at 1.12CD we have the exact point where, inside pcf.dll, a&lt;br /&gt;byte will be modified (at 10AF8):&lt;br /&gt;&lt;br /&gt;  1.12C6  6A01                     push    0001&lt;br /&gt;  1.12C8  68F80A                   push    0AF8&lt;br /&gt;  1.12CB  6A00                     push    0000&lt;br /&gt;  1.12CD  9AFFFF0000               call    KERNEL._LLSEEK&lt;br /&gt;&lt;br /&gt;The only modification takes place therefore inside PCF.DLL, a&lt;br /&gt;monstruosity of 1088832 bytes, where location 10af8 grows WITHOUT&lt;br /&gt;any change in the date of the dll. You can easily check this:&lt;br /&gt;*    copy pcf.dll pcf.ded&lt;br /&gt;*    (run pcfile a couple of time)&lt;br /&gt;*    fc /b pcf.dll pcf.ded&lt;br /&gt;fc /b is file compare /binary, good old (and quick) dos, duh?&lt;br /&gt;And this is what you get...&lt;br /&gt;&lt;br /&gt;     Comparing files PCF.DLL and PCF.DED&lt;br /&gt;     00010AF8: 55 50&lt;br /&gt;&lt;br /&gt;Et voila mesdames et messieurs, found the other way round, please&lt;br /&gt;note that this more 'practical' method can also be used *before*&lt;br /&gt;beginning the dead listing examination of the file (and would&lt;br /&gt;have given you the '0AF8' string to search for).&lt;br /&gt;&lt;br /&gt;Well, what did we learn? A lot: an hidden counter grows in&lt;br /&gt;another file without leaving many traces. The 'quiver'&lt;br /&gt;protection snaps after growing more than 66h, having started at&lt;br /&gt;4Dh. The flag for first time user is inside [0632]. [0634] and&lt;br /&gt;[0636] are used for the current date, [062C] and [062E] are the&lt;br /&gt;original date against which they are checked in a funny way.&lt;br /&gt;     There are two different protections, therefore we'll need&lt;br /&gt;two different cracks to deprotect this cram. Let's begin with the&lt;br /&gt;easiest one.&lt;br /&gt;Our FIRST crack, must destroy the counter that increases inside&lt;br /&gt;pcf.dll (the '25' session allowance). This will be made cracking&lt;br /&gt;following instruction:&lt;br /&gt;  1.12F3  FE46FC                   inc     byte ptr [bp-04]&lt;br /&gt;which is obviously the increasing instruction we are searching&lt;br /&gt;for (BECAUSE it's the only 'inc byte ptr' in the whole stupid&lt;br /&gt;program, AND because it is located short after the _LLSEEK, AND&lt;br /&gt;because it's incrementing nobody else than our good old [bp-&lt;br /&gt;04]... what do you want more, a neon green flashing arrow light&lt;br /&gt;on the top of it?)&lt;br /&gt;We'll very simply "noop" this instruction, transforming it, for&lt;br /&gt;instance, in 40 90 48 (inc ax, nop, dec ax = do nothing). Well,&lt;br /&gt;yes, that was it for the '25 sessions' lock protection, thankyou,&lt;br /&gt;you may use the program a zillion times now. What now? Ah, yes,&lt;br /&gt;the DATE lock, let's have a look once more at it:&lt;br /&gt;  1.1218  A13406           mov     ax, [0634]&lt;br /&gt;  1.121B  8B163606         mov     dx, [0636]&lt;br /&gt;  1.121F  2B062C06         sub     ax, [062C]&lt;br /&gt;  1.1223  1B162E06         sbb     dx, [062E]&lt;br /&gt;  1.1227  83FA76           cmp     dx, 0076 ;118 (-90=1c)&lt;br /&gt;  1.122A  7251             jb      127D&lt;br /&gt;  1.122C  7705             ja      1233&lt;br /&gt;  1.122E  3D00A7           cmp     ax, A700 ;(42572)&lt;br /&gt;  1.1231  764A             jbe     127D&lt;br /&gt;&lt;br /&gt;  1.1233 &amp;gt;6AFF             push    FFFF&lt;br /&gt;  1.1235  9A3C130000       call    USER.MESSAGEBEEP&lt;br /&gt;  1.123A  6A00             push    0000&lt;br /&gt;  1.123C  1E               push    ds&lt;br /&gt;  1.123D  685A03           push    035A ;HERE! 90 days!&lt;br /&gt;&lt;br /&gt;Therefore, if location [636] is &amp;gt; than 76, the nag snaps.&lt;br /&gt;This 76 is calculated through what SEEMS a simple comparison&lt;br /&gt;between the actual date and the installation date.&lt;br /&gt;&lt;br /&gt;  1.1218  A13406   mov     ax, [0634] ;load date ax&lt;br /&gt;  1.121B  8B163606 mov     dx, [0636] ;load date dx&lt;br /&gt;  1.121F  2B062C06 sub     ax, [062C] ;subtract first date&lt;br /&gt;  1.1223  1B162E06 sbb     dx, [062E] ;subtract first date&lt;br /&gt;  1.1227  83FA76   cmp     dx, 0076   ;allowed limit (?)&lt;br /&gt;  1.122A  7251     jb      127D       ;ok: you may&lt;br /&gt;  1.122C  7705     ja      1233       ;beggar off&lt;br /&gt;  1.122E  3D00A7   cmp     ax, A700   ;well, what's this&lt;br /&gt;  1.1231  764A    jbe     127D        ;then?&lt;br /&gt;&lt;br /&gt;     In the reality there are various mathematical checkings&lt;br /&gt;going on here, as the second check on ax = A700 shows. This DOES&lt;br /&gt;NOT need to concern us much (we'll crack this code, later,&lt;br /&gt;changing the 'first time user' flag), but it's useful you have&lt;br /&gt;a rough understanding of what goes on inside these schemes,&lt;br /&gt;therefore let's delve a little inside it.&lt;br /&gt;     Basically, the good old dos function GetSystemDate (21/2A)&lt;br /&gt;works like this: On entry: ah = 2a&lt;br /&gt;On return:&lt;br /&gt;al = day of the week (0 = Sunday, 1 = Monday...)&lt;br /&gt;cx = year&lt;br /&gt;dh = month&lt;br /&gt;dl = day&lt;br /&gt;Short before the 90 days check, the protection calls two&lt;br /&gt;routines:&lt;br /&gt;1:09B4 (GetSystemDate) and 1:0D64 (FetchInstallationCode)&lt;br /&gt;     The first one fetches the date (1.9D3-1.9D7) and the Time&lt;br /&gt;(21/2C, at 1.9E2), get's ONCE MORE the system date (1.9F7)&lt;br /&gt;subtracts the years against 1980 (1.A20: sub cx, 07BC) and then&lt;br /&gt;makes quite a lot of maniuplation of these data (around 1.C7D,&lt;br /&gt;where one year LESS than the current year will be stored in&lt;br /&gt;[SI+03], in order to calculate the total amount of days). The&lt;br /&gt;second one prepares the numbers for the sub ax and sbb dx of the&lt;br /&gt;90 days check.&lt;br /&gt;     As I said all this does not need to concern you much, coz&lt;br /&gt;the protectionists have mad a 'protecion blunder': they have made&lt;br /&gt;every time snapping depending on a flag, the one in [0632].&lt;br /&gt;     What happens is: THE FIRST THING this program makes, smack&lt;br /&gt;at the beginning of WinMain, is to set to zero (FALSE) the&lt;br /&gt;abovementioned flag:&lt;br /&gt;  1.1105  C70632060000             mov     word ptr [0632], 0000&lt;br /&gt;Only in case of first time use, this flag will be set to TRUE at&lt;br /&gt;  1.11F6  C70632060100             mov     word ptr [0632], 0001&lt;br /&gt;knowing that, anyway, as soon as the program runs again this flag&lt;br /&gt;will be reset to FALSE by Winmain.&lt;br /&gt;And, as we saw, this flag is checked both for the 90 days snap:&lt;br /&gt;  1.1211  833E320600               cmp     word ptr [0632], 0000&lt;br /&gt;and for the 'This is your last day Cinderella' Warning:&lt;br /&gt;  1.1315 &amp;gt;833E320600               cmp     word ptr [0632], 0000&lt;br /&gt;A good fundamental crack will therefore be the 'automatical'&lt;br /&gt;setting to TRUE of this flag by our Winmain:&lt;br /&gt;  1.1105  C70632060100             mov     word ptr [0632], 0001&lt;br /&gt;Everytime the program runs it will believe that's the first time&lt;br /&gt;it does it.&lt;br /&gt;I know, theoretically, having nooped the increase inside PCF.DLL,&lt;br /&gt;the counter should remain always at 4D, which would set ANEW the&lt;br /&gt;flag to true every run... but we do not want the first 'welcome'&lt;br /&gt;nagscreen either, do we? Therefore:&lt;br /&gt;****** Crack for PCFILE version 8, 1997 ***&lt;br /&gt;psedit pcf.dll&lt;br /&gt;search         4E 49 44 4D   (4D only if you did not run it)&lt;br /&gt;modify in      4E 49 44 50        (second time run)&lt;br /&gt;psedit pcfile.exe&lt;br /&gt;search         83 C4 06 FE 46 FC&lt;br /&gt;modify in      83 C4 06 40 90 48  (nooped increase)&lt;br /&gt;search         C7 06 32 06 00 00&lt;br /&gt;modify in      C7 06 32 06 01 00  (flag always true)&lt;br /&gt;*********************************************&lt;br /&gt;&lt;br /&gt;As second example I have chosen a fairly interesting 'CINDERELLA'&lt;br /&gt;protection scheme of a Window application which can be useful for&lt;br /&gt;our purposes: Link Check (Version 5.1), an application written&lt;br /&gt;in august 1996. I'll crack here the Windows 3.1 version, for&lt;br /&gt;reasons explained in lesson 9.4, but you'll easily find the Win95&lt;br /&gt;version on the net, whose protection scheme works on the same&lt;br /&gt;lines.&lt;br /&gt;Link Check is a suite of three (3) diagnostic programs which&lt;br /&gt;allows the user to examine different areas of the system.&lt;br /&gt;1) Link Check (WLCHECK.EXE) enables the user to view the links&lt;br /&gt;between an executable file and the modules it requires to run on&lt;br /&gt;the system.&lt;br /&gt;2) Memory Check (WMCHECK.EXE) allows the user to view, load and&lt;br /&gt;unload modules currently in memory.&lt;br /&gt;3) Function Check (WFCHECK.EXE) allows the user to view actual&lt;br /&gt;function calls inside modules.&lt;br /&gt;WLCHECK  EXE     40400 24/08/96    5:10&lt;br /&gt;WMCHECK  EXE     37104 18/08/96    5:10&lt;br /&gt;WFCHECK  EXE     45424 24/08/96    5:10&lt;br /&gt;WLCCOMM  DLL     46960 18/08/96    5:10&lt;br /&gt;KSLHOOKS DLL     29568 15/08/96    1:00&lt;br /&gt;The protection scheme inside this program allows a 21 days use&lt;br /&gt;of the program, then 'disables' it. Even in the first 21&lt;br /&gt;'allowed' days there are some functions that are disabled,&lt;br /&gt;anyway. Another interesting feature of the protection scheme, is&lt;br /&gt;that once you register, an 'electronic key' will be created and&lt;br /&gt;sended to you in order to unlock Link Check for the full retail&lt;br /&gt;version (which, as usual, means that the shareware version you&lt;br /&gt;are using CAN be unlocked).&lt;br /&gt;Therefore this application:&lt;br /&gt;is TIME-LIMITED&lt;br /&gt;has been CRIPPLED&lt;br /&gt;has some DISABLED functions&lt;br /&gt;can be UNLOCKED.&lt;br /&gt;A wonderful world of cracking possibilities! Let's rub our hands!&lt;br /&gt;So much to find! So much to learn! Thanks, Karri Software Ltd!&lt;br /&gt;(100422.3521@compuserve.com)&lt;br /&gt;For these protection schemes we must use both the 'Winice' live&lt;br /&gt;approach and the 'dead listing' one. (both described elsewhere&lt;br /&gt;in my tutorial).&lt;br /&gt;Let's begin at the beginning, i.e. searching for strings inside&lt;br /&gt;the WLCHECK.EXE we'll find nothing.&lt;br /&gt;You'll soon realise that the protection scheme hides inside the&lt;br /&gt;two *.dll WLCCOMM.DLL &amp; KSLHOOKS.DLL... the real problem, with&lt;br /&gt;this kind of protections, is that the 'modalities' to unlock it&lt;br /&gt;are not known, i.e., that you cannot just crack the unlock&lt;br /&gt;procedure itself, but you must reverse engineer the program long&lt;br /&gt;enough to find the 'switch' that fires your cracked 'unlock'&lt;br /&gt;procedure, in order to 'register' this program and in order to&lt;br /&gt;be able to use it ad libitum.&lt;br /&gt;What happens with time protections?&lt;br /&gt;The first problem for the protectionists is the tampering with&lt;br /&gt;the system date. Even a stupid user could set the system clock&lt;br /&gt;backwards in order to use a program of the CINDERELLA sort.&lt;br /&gt;Your target would be easily fooled by any stupid user if it did&lt;br /&gt;just set a variable [START_DATE] and then simply check the system&lt;br /&gt;time with something like&lt;br /&gt;     IF SystemTime &amp;gt; [START_DATE+30] then beggar off&lt;br /&gt;     ELSE OK&lt;br /&gt;Therefore (almost) all this program use some sort of 'diode'&lt;br /&gt;location. Like diodes, which let current through in only one&lt;br /&gt;direction, these locations can only grow... i.e, if you set the&lt;br /&gt;system time to 1 January 2000 and then run the program, it will&lt;br /&gt;throw you off, as expected, but even when you go back to your&lt;br /&gt;current year and date this will be 'remembered'...and the&lt;br /&gt;protection will NOT allow you any more to use the program even&lt;br /&gt;should you (theoretically) still have some free 'try me' days...&lt;br /&gt;your setting at year 2000 screwed up your license for ever.&lt;br /&gt;     IF SystemTime &amp;gt; [START_DATE+30] then [MARK_HERE]&lt;br /&gt;     ELSE continue&lt;br /&gt;     If [MARK_HERE] = TRUE then beggar off&lt;br /&gt;     ELSE OK&lt;br /&gt;Let's try altering the system date on our WLCHECK.EXE target...&lt;br /&gt;Woa! As I said... it does not work anymore.&lt;br /&gt;&lt;br /&gt;It's fairly easy to get at this part through Winice: Just bpx&lt;br /&gt;WritePrivateProfileString (which is a very interesting function&lt;br /&gt;indeed) and then have a good look at the pointers: You'll quick&lt;br /&gt;find out that KSLHOOKS (Segment 0B) writes his own xCLSID value&lt;br /&gt;inside system.ini. The block of KSLHOOKS.DLL's code responsable&lt;br /&gt;for this is the following:&lt;br /&gt;11.0569  9AE4013500  call    7:01E4   ;'Value' and 'SYSTEM.INI'&lt;br /&gt;11.056E  83C408      add     sp, 8    ;adjusting stack&lt;br /&gt;11.0571  8D843901    lea     ax, [si+0139]&lt;br /&gt;11.0575  57          push    di    &lt;br /&gt;11.0576  50          push    ax         ;pushing 'xCLSID'&lt;br /&gt;11.0577  8D46FA      lea     ax, [bp-06]&lt;br /&gt;11.057A  16          push    ss   &lt;br /&gt;11.057B  50          push    ax         ;pushing 'Value'&lt;br /&gt;11.057C  8D468A      lea     ax, [bp-76]&lt;br /&gt;11.057F  16          push    ss    &lt;br /&gt;11.0580  50          push    ax    ;pushing '{6178-0503...}'&lt;br /&gt;11.0581  8D46EE      lea     ax, [bp-12]&lt;br /&gt;11.0584  16          push    ss    &lt;br /&gt;11.0585  50          push    ax         ;pushing 'SYSTEM.INI'&lt;br /&gt;11.0586  9AFFFF0000  call    KERNEL.WRITEPRIVATEPROFILESTRING&lt;br /&gt;11.058B  33C0        xor     ax, ax&lt;br /&gt;11.058D  5E          pop     si&lt;br /&gt;11.058E  5F          pop     di&lt;br /&gt;11.058F  C9          leave &lt;br /&gt;11.0590  CB          retf  &lt;br /&gt;&lt;br /&gt;The call to 7.01E4 fetches the strings 'Value' and 'SYSTEM.INI'&lt;br /&gt;which are 'hardwired' there byte by byte, for instance, 'INI' is&lt;br /&gt;fetched like this:&lt;br /&gt;  7.0234  26C6440749    mov     byte ptr es:[si+07], 49 ;I&lt;br /&gt;  7.0239  26C644084E    mov     byte ptr es:[si+08], 4E ;N&lt;br /&gt;  7.023E  26C6440949    mov     byte ptr es:[si+09], 49 ;I&lt;br /&gt;&lt;br /&gt;What is really interesting in this part of the protection scheme,&lt;br /&gt;is that the function WritePrivateProfileString is one of the MOST&lt;br /&gt;COMMON functions used for this kind of protections, being the&lt;br /&gt;function normally used in order to 'keep track' inside an 'INI'&lt;br /&gt;file of the particular configuration of an application that the&lt;br /&gt;user has chosen... as a matter of fact this program creates an&lt;br /&gt;hidden WLCHECK.SWL file inside c:\windows where it writes its&lt;br /&gt;data, it also writes, through the above code,&lt;br /&gt;&lt;br /&gt;[xCLSID]&lt;br /&gt;Value={0000006236-0017105173-6326000000}&lt;br /&gt;inside system.ini&lt;br /&gt;&lt;br /&gt;and then it writes ANOTHER string inside the reg.dat 'register'&lt;br /&gt;of the windows directory. A short digression, about registrations&lt;br /&gt;in the reg.dat of the Windows directory. If you never had a look&lt;br /&gt;at the reg.dat file (wich you should not have only firing&lt;br /&gt;regedit.exe, but using the switch /v TROUGH THE COMMAND LINE&lt;br /&gt;run!) you are in for a big surprise. If you are used to install&lt;br /&gt;and de-install programs as much as I do, you'll be able to see,&lt;br /&gt;for instance, real BATTLES between big or widespread software&lt;br /&gt;packages (for instance Coreldraw and PaintShopPro) fought&lt;br /&gt;there... but you'll also find some cryptic messages like&lt;br /&gt;WB_10=VMWB20&lt;br /&gt;  FILTER = 000000000e&lt;br /&gt;  OPTION = 0000000005&lt;br /&gt;  TAG    = 0000001857&lt;br /&gt;  KEY    = 0000184F&lt;br /&gt;or, even more cryptic:&lt;br /&gt;VxDSettings = {0000006178-0419758349-4326000000}&lt;br /&gt;And this is actually our target, as you can see... the first&lt;br /&gt;thing you should know is that some protection schemes hyde the&lt;br /&gt;date checking part of their protection inside reg.dat.&lt;br /&gt;The above value is the 'ID' of our target, and the ciffer in the&lt;br /&gt;'middle' varies with the date and with the passing of the time.&lt;br /&gt;     As we said, once the protection snaps, there is no 'normal'&lt;br /&gt;way to reinstall a working copy of the program, even substituting&lt;br /&gt;ALL the files with fresh ones and deleting the 'secret'&lt;br /&gt;WLCHECK.SWL will not help... in order to reinstall this program&lt;br /&gt;or to use it for the eternity (in 21 days chunks) you would have&lt;br /&gt;to do the following every time the limit snaps:&lt;br /&gt;A) regedit /v &lt;br /&gt;   delete key VxD&lt;br /&gt;B) edit system.ini&lt;br /&gt;   manually delete the block&lt;br /&gt;"[xCLSID]&lt;br /&gt;Value={0000006236-0017105173-6326000000}"&lt;br /&gt;C) attrib c:\windows\wlcheck.swl -r -s -h&lt;br /&gt;   del c:\windows\wlcheck.swl&lt;br /&gt;D) reinstall everything anew and run 21 more days... clearly not&lt;br /&gt;a satisfactory solution, exspecially given the fact that some&lt;br /&gt;routines are disabled... therefore let's delve a little more&lt;br /&gt;inside this protection scheme... we'll find a much neater crack,&lt;br /&gt;you'll see... :=)&lt;br /&gt;Since the 'legitimate' user will get 'an electronic key' from the&lt;br /&gt;protectionists, there must exist, somewhere, a small menu of the&lt;br /&gt;kind 'Enter your electronic key, legitimate sucker'... we could&lt;br /&gt;find it searching with a little imagination (and/or zen) inside&lt;br /&gt;our listings, but in these cases, it's much more quicker a small&lt;br /&gt;run with WRT (Windows Resource Toolkit) by borland. Since we are&lt;br /&gt;already inside KSLHOOKS.DLL, let's begin with this one.&lt;br /&gt;Wrt loads kslhooks.dll and shows you immediatly that there are&lt;br /&gt;only three dialog items, the last one, tagged as 'dialog 503'&lt;br /&gt;represents the 'Unlock' little window: ('Please enter your key'),&lt;br /&gt;which has two buttons: OK (1) and Cancel (2). Let's use WRT&lt;br /&gt;'ID_tagging' option: we'll immediatly fetch the ID number of the&lt;br /&gt;'Please enter your key' field: 2035.&lt;br /&gt;2035 dec is 7F3 hex, therefore we now just need to search 07F3&lt;br /&gt;inside our listing... and we land immediatly here:&lt;br /&gt;  6.00DE &amp;gt;8B760A             mov     si, [bp+0A]&lt;br /&gt;  6.00E1  FF760E             push    word ptr [bp+0E]&lt;br /&gt;  6.00E4  6A08               push    0008&lt;br /&gt;  6.00E6  9AFFFF0000         call    USER.GETWINDOWLONG&lt;br /&gt;  6.00EB  8946FC             mov     [bp-04], ax&lt;br /&gt;  6.00EE  8956FE             mov     [bp-02], dx&lt;br /&gt;  6.00F1  83FE01             cmp     si, 0001&lt;br /&gt;  6.00F4  7556               jne     014C&lt;br /&gt;  6.00F6  FF760E             push    word ptr [bp+0E]&lt;br /&gt;  6.00F9  68F307             push    07F3           ;HERE! ****&lt;br /&gt;  6.00FC  9AFFFF0000         call    USER.GETDLGITEM&lt;br /&gt;  6.0101  50                 push    ax&lt;br /&gt;  6.0102  8D4698             lea     ax, [bp-68]&lt;br /&gt;  6.0105  16                 push    ss&lt;br /&gt;  6.0106  50                 push    ax&lt;br /&gt;  6.0107  6A63               push    0063&lt;br /&gt;  6.0109  9AFFFF0000         call    USER.GETWINDOWTEXT&lt;br /&gt;  6.010E  8D4698             lea     ax, [bp-68]&lt;br /&gt;  6.0111  16                 push    ss&lt;br /&gt;&lt;br /&gt;This block of code is part of an Exported function from&lt;br /&gt;kslhooks.dll: KSLHOOKPROC4 - Ord:0006h&lt;br /&gt;Here is the whole sequence:&lt;br /&gt;     :CALL_PLEASE_ENTER_ELECTROKEY&lt;br /&gt;     6.00DE &amp;gt;8B760A       mov     si, [bp+0A]&lt;br /&gt;     ...&lt;br /&gt;     6.00F9  68F307       push    07F3 ;HERE ***&lt;br /&gt;is called (being at 6.00DE) from&lt;br /&gt;     :ENTER 68&lt;br /&gt;     6.0082  C8680000     enter   0068, 00&lt;br /&gt;     ... &lt;br /&gt;     6.009B  7441         je      00DE  ;HERE ***&lt;br /&gt;which (being at 6.00082) is called from&lt;br /&gt;     :PUSH_82&lt;br /&gt;     6.000F  68FFFF          push    selector KSLHOOKPROC4&lt;br /&gt;     6.0012  688200          push    0082  ;HERE ***&lt;br /&gt;     6.0015  FF36200C        push    word ptr [0C20]&lt;br /&gt;     6.0019  9AFFFF0000      call    KERNEL.MAKEPROCINSTANCE&lt;br /&gt;Much interesting, but we are not yet there...&lt;br /&gt;let's see if we have other occurrences of our 7F3h instance&lt;br /&gt;(which, as we saw through WRT, corresponds to the 'Enter your&lt;br /&gt;Key' field of the 'Unlock' window). Yes, we have one more&lt;br /&gt;occurrence (always inside KSLHOOKS.DLL):&lt;br /&gt;&lt;br /&gt;4.030A &amp;gt;81FEF307    cmp   si, 07F3   ;HERE ***&lt;br /&gt;4.030E  7515        jne   0325       ;don't care if not unlock&lt;br /&gt;4.0310  FF760E      push  word ptr [bp+0E]  ;nID&lt;br /&gt;4.0313  56          push  si         ;=7F3, =unlock, =hDlg&lt;br /&gt;4.0314  9AFFFF0000  call  USER.ISDLGBUTTONCHECKED&lt;br /&gt;4.0319  0BC0        or    ax, ax     ;mashed button?&lt;br /&gt;4.031B  7408        je    0325       ;Yeah, jump...&lt;br /&gt;4.031D  C45EFC      les   bx, [bp-04]     &lt;br /&gt;4.0320  2689B7B104  mov   es:[bx+04B1], si&lt;br /&gt;4.0325 &amp;gt;83FE02      cmp   si, 0002   ;...here&lt;br /&gt;   &lt;br /&gt;Now, IsDlgButtonChecked is a 'typical' windows function with&lt;br /&gt;following structure:&lt;br /&gt;          UINT IsDlgButtonChecked(HWND hFlg, int nID)&lt;br /&gt;where the handle of the dialog box contaning the button control&lt;br /&gt;is specified in hDlg. The ID value of the desired button is&lt;br /&gt;passed in nID. For two-state buttons this function returns zero&lt;br /&gt;if the button is unchecked and non zero if it is checked, -1 if&lt;br /&gt;an error occurs.&lt;br /&gt;What else can we do?&lt;br /&gt;Let's search for the limit (21 days, that corresponds to 15h)&lt;br /&gt;inside our code. Well, we'll find two interesting occurrences&lt;br /&gt;inside the OTHER dll module: WLCCOMM.DLL:&lt;br /&gt;  :OCCURRENCE_1_OF_21_DAYS_LIMIT&lt;br /&gt;  1.3E25 &amp;gt;80BEFFFE15   cmp     byte ptr [bp-0101], 15 ;here***&lt;br /&gt;  1.3E2A  7403         je      3E2F  ;Please restart...&lt;br /&gt;  1.3E2C  E9B900       jmp     3EE8  ;xor ax and retf&lt;br /&gt;and now, look what we have immediately afterwards...&lt;br /&gt;  1.3E2F &amp;gt;FF760E       push    word ptr [bp+0E]&lt;br /&gt;  1.3E32  1E           push    ds&lt;br /&gt;  1.3E33  681306       push    0613 ;Please restart...&lt;br /&gt;  1.3E36  1E           push    ds&lt;br /&gt;  1.3E37  68EE05       push    05EE ;Retail version...&lt;br /&gt;  1.3E3A  6A40         push    0040&lt;br /&gt;  1.3E3C  9A90080000   call    USER.MESSAGEBOX&lt;br /&gt;  1.3E41  FF760E       push    word ptr [bp+0E]&lt;br /&gt;  1.3E44  6A01         push    0001&lt;br /&gt;  1.3E46  9AE03E0000   call    USER.ENDDIALOG&lt;br /&gt;  1.3E4B  E99A00       jmp     3EE8  ;xor ax and retf&lt;br /&gt;                                      &lt;br /&gt;Now, string 0613 is&lt;br /&gt;"Please restart the program for the reatil version to take&lt;br /&gt;effect"&lt;br /&gt;and string 05EE is&lt;br /&gt;"Retail version successfully unlocked"                        &lt;br /&gt;...clearly we have found the part of the code where the user gets&lt;br /&gt;the appropriate message once he has digited the correct key&lt;br /&gt;inside the unlock window in KSLHOOKS.&lt;br /&gt;But let's use a little more our 'new' WRT approach. Examining the&lt;br /&gt;'dialog' items through WRT, we'll see that inside WLCCOMM.DLL&lt;br /&gt;there are 'two' About Link check templates, a 'nice' one (for&lt;br /&gt;registered users) and a 'nag' one (for Cinderella's users).&lt;br /&gt;The nice one is WLCCOMM.DIALOG 130, and its second part reads&lt;br /&gt;'This copy of Link check is licensed to'&lt;br /&gt;FIELD 1 = 603 (25bh)&lt;br /&gt;FIELD 2 = 604 (25Ch)&lt;br /&gt;The 'nag' one is WLCCOMM.DIALOG 131 and its second part reads&lt;br /&gt;'UNREGISTERED Shareware notice...' with two buttons:&lt;br /&gt;'How do I register' which is 601 (259h) and&lt;br /&gt;What do I get for it which is 602 (25ah).&lt;br /&gt;Well... let's have a look around our code... and here is&lt;br /&gt;(obviously) the relevant part of it inside WLCCOMM.DLL:&lt;br /&gt;&lt;br /&gt;  1.3C60 &amp;gt;8B760E                   mov     si, [bp+0E]&lt;br /&gt;  1.3C63  FF7606                   push    word ptr [bp+06]&lt;br /&gt;  1.3C66  6AF4                     push    FFF4&lt;br /&gt;  1.3C68  9A8A1D0000               call    USER.GETWINDOWWORD&lt;br /&gt;  1.3C6D  56                       push    si&lt;br /&gt;  1.3C6E  685B02                   push    025B ;here***&lt;br /&gt;  1.3C71  9A803C0000               call    USER.GETDLGITEM&lt;br /&gt;  1.3C76  394606                   cmp     [bp+06], ax&lt;br /&gt;  1.3C79  7421                     je      3C9C&lt;br /&gt;  1.3C7B  56                       push    si&lt;br /&gt;  1.3C7C  685C02                   push    025C ;here***&lt;br /&gt;  1.3C7F  9ADA3C0000               call    USER.GETDLGITEM&lt;br /&gt;  1.3C84  394606                   cmp     [bp+06], ax&lt;br /&gt;  1.3C87  7413                     je      3C9C&lt;br /&gt;  1.3C89  FF760A                   push    word ptr [bp+0A]&lt;br /&gt;  1.3C8C  FF7608                   push    word ptr [bp+08]&lt;br /&gt;  1.3C8F  FF7606                   push    word ptr [bp+06]&lt;br /&gt;  1.3C92  6A01                     push    0001&lt;br /&gt;  1.3C94  9A08039E3D               call    KSLCONTROLCOLOR&lt;br /&gt;  1.3C99  E94E02                   jmp     3EEA&lt;br /&gt;&lt;br /&gt;Whereby, here is the part for the shareware user:&lt;br /&gt;  1.3EA6 &amp;gt;81FE5902        cmp     si, 0259 ;How do I register?&lt;br /&gt;  1.3EAA  7513            jne     3EBF&lt;br /&gt;  1.3EAC  FF760E          push    word ptr [bp+0E]&lt;br /&gt;  1.3EAF  1E              push    ds&lt;br /&gt;  1.3EB0  688B06          push    068B&lt;br /&gt;  1.3EB3  6A01            push    0001&lt;br /&gt;  1.3EB5  6A00            push    0000&lt;br /&gt;  1.3EB7  687217          push    1772&lt;br /&gt;  1.3EBA  9AD43E0000      call    USER.WINHELP&lt;br /&gt;  1.3EBF &amp;gt;81FE5A02        cmp     si, 025A ;What do I get for it?&lt;br /&gt;  1.3EC3  7523            jne     3EE8&lt;br /&gt;  1.3EC5  FF760E          push    word ptr [bp+0E]&lt;br /&gt;  1.3EC8  1E              push    ds&lt;br /&gt;  1.3EC9  689706          push    0697&lt;br /&gt;  1.3ECC  6A01            push    0001&lt;br /&gt;  1.3ECE  6A00            push    0000&lt;br /&gt;  1.3ED0  687117          push    1771&lt;br /&gt;  1.3ED3  9AFFFF0000      call    USER.WINHELP&lt;br /&gt;  1.3ED8  EB0E            jmp     3EE8&lt;br /&gt;&lt;br /&gt;and as you can easily see, here lays the 'working' for the two&lt;br /&gt;mushbuttons of the shareware version.&lt;br /&gt;Shareware starts at 1.3EA6 and will be called from here&lt;br /&gt;  1.3DB9 &amp;gt;81FE5802                 cmp     si, 0258&lt;br /&gt;  1.3DBD  7403                     je      3DC2&lt;br /&gt;  1.3DBF  E9E400                   jmp     3EA6&lt;br /&gt;&lt;br /&gt;Unlocked version starts at 1.3C60 and will be called from here:&lt;br /&gt;   &lt;br /&gt;  1.3C3E  C8FE0400        enter   04FE, 00&lt;br /&gt;  1.3C42  57              push    di&lt;br /&gt;  1.3C43  56              push    si&lt;br /&gt;  1.3C44  1E              push    ds&lt;br /&gt;  1.3C45  B87938          mov     ax, selector 2:0000&lt;br /&gt;  1.3C48  8ED8            mov     ds, ax&lt;br /&gt;  1.3C4A  8B460C          mov     ax, [bp+0C]&lt;br /&gt;  1.3C4D  2D1900          sub     ax, 0019&lt;br /&gt;  1.3C50  740E            je      3C60 ;***here! UNLOCKED&lt;br /&gt;  1.3C52  2DF700          sub     ax, 00F7&lt;br /&gt;  1.3C55  7465            je      3CBC ;copyright, 1st part&lt;br /&gt;  1.3C57  48              dec     ax&lt;br /&gt;  1.3C58  7503            jne     3C5D ;(jmp 3EE8) out&lt;br /&gt;  1.3C5A  E94901          jmp     3DA6&lt;br /&gt;&lt;br /&gt;Well... if [bp+0C] is 19 (dec25) then we'll jump to our unlocked&lt;br /&gt;routine?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt; &lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335939-113821482417923475?l=ahackaday.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113821482417923475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113821482417923475'/><link rel='alternate' type='text/html' href='http://ahackaday.blogspot.com/2004/05/lesson-4-time-protections-short.html' title='Lesson 4 : Time protections - A short history of time'/><author><name>bruenet</name><uri>http://www.blogger.com/profile/01644616483340492993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-17335939.post-113821454124716446</id><published>2004-04-08T09:42:00.000-08:00</published><updated>2006-01-25T09:47:48.346-09:00</updated><title type='text'>Lesson 3 : hands on, paper protections P-2</title><content type='html'>&lt;center&gt;&lt;h1&gt;&lt;span style="font-size:85%;"&gt;[TOP.EXE] [F19.EXE] [POPULOUS.EXE] [MAP.EXE]&lt;/span&gt;&lt;/h1&gt;&lt;/center&gt;&lt;!-- The following is an HTML horizontal rule tag (or line). --&gt;&lt;span style="font-size:85%;"&gt;&lt;!-- The following HTML is just plain text. --&gt;&lt;/span&gt;&lt;p&gt;&lt;center&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt; &lt;/center&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;p&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;You have seen in the previous lesson that the use of a passwordprotection, independently of the coding and hiding methods usedto store them in memory, implies the use of a comparing procedurewith the password that the user types in. You therefore have manyoptions to begin your cracking work: -    find the location of the user password-    find the "echo" in memory of the real password-    find the routine that compares both-    find the passwords hideout and encryption type-    find the go_ahead_nice_buyer exit or jump-    find the beggar_off_ugly_copier exit or jumpjust to name the more obvious ones. In order to make things moredifficult for us crackers, the protectionists have devised manycounter-strategies, the more obvious ones being:-    keeping the various part of the store/compare/hide routineswell apart in code (no match for zen-cracking);-    filling these routines with "bogus" compares, bogus jumpsand bogus variables, in order to make things more difficult forthe crack (no match for decent crackers);-    disseminating the code with anti-debugger tricks, like INT_3instructions or jumps in and out protected mode (no match for ourbeloved [Soft-Ice]);-    trying to eliminate the need for passwords altogetherletting the user input "one letter" or "one number" or "oneimage" as answer to some variable question. In this lesson I'llteach you how to crack these "passletters" protection techniques.&lt;strong&gt;&lt;em&gt;Let's first resume the "uses" of a password protection:&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;PASSWORDS AS PERMISSION TO ACCESS&lt;/strong&gt;These passwords serve to acknowledge that a legitimate user isusing the program. This is the type of password that you'll find,for example, protecting your user account on Compuserve, onNetworks or even in ATM machines used by banks or corporations.These require a little hardwiring to crack: ATM passnumberprotection schemes rely on an answer from the central computer(they do NOT verify only the three magnetic areas in the magneticstrip on the card). The lines between ATM's &amp; their hosts areusually 'weak' in the sense that the information transmitted onthem is generally not encrypted in any way. (Some banks useencrypted information, but this is fairly easy to crack too).So for ATMs you should do the following 1) cross over thededicated line between the ATM and the host; 2) insert yourcomputer between the ATM and the host; 3) Listen to the "normal"messages and DO NOT INTERFERE YET; 4) Try out some operationswith a legal card, make some mistakes, take note of the variouscodes; 5) When you are ready insert a fraudulent card into theATM. Now the following happens: -    the ATM sends a signal to the host, saying "Hey! Can I givethis guy money, or is he broke, or is this funny card invalid?";-    the microcomputer intercepts the signal from the host,discards it, sends on the "there's no one using the ATM" signal;-    the host gets the "no one using" signal and sends back its"good, keep watching out if somebody comes by, and for God's sakedon't spit out any money on the street!" signal to the ATM;-    the microcomputer intercepts this signal (again), throws itaway (again), and sends the "Wow! That guy is like TOO rich! Givehim as much money as he wants. In fact, he's so loaded, give himALL the cash we have!  He is a really valued customer." signal.-    the ATM obediently dispenses cash till the cows come home.     All this should be possible, but as a matter of fact it hasnot much to do with cracking, unless there is a special softwareprotection on the line... so if you want to work on ATMs contactour fellow phreakers/hackers and learn their trade... andplease remember to hack only cash dispenser that DO NOT HAVE acontrol camera :=)&lt;strong&gt;PASSWORDS AS REGISTRATION&lt;/strong&gt;This type of password is often used in shareware programs. Whenyou register the shareware program, you are sent a password thatyou use to upgrade your shareware program to a complete and morepowerful version. This method, used frequently for commercialapplications, has recently been used quite a lot by many windowsapplications that come "crippled" on the magazines cover CD-roms,requiring you to telephone a hot line (and paying) in order toget the "unique key" to unlock the "special protection". It's allbullshit: we'll learn in the "how to crack windows" lessons howeasy it is to disable the various routines that verify yourentry.&lt;strong&gt;PASSWORDS AS COPY PROTECTIONS&lt;/strong&gt;This type of password is often used for games and entertainmentsoftware. The password query does not usually appear any more atthe start of the program, or as the program is loading. Instead,the password query appears after one or more levels are completed(this innovation was pioneered by "EOB I" and the "Ultima"series) or when the user reloads a saved game or session.&lt;strong&gt;DONGLE PASSWORDS&lt;/strong&gt;     A few extremely expensive programs use a dongle (also calledan hardware key). A dongle is a small hardware device containinga password or checksum which plugs into either a parallel or aserial port. Some specially designed dongles even includecomplete program routines. Dongles can be cracked, but the amountof work involved is considerable and the trial and errorprocedure currently used to crack them via software is extremelytedious. It took me more than a week to crack MULTITERM,Luxembourger dongle protected program. The quickest method tocrack dongle protected programs, involves the use of prettycomplicated hardware devices that cannot be dealt with here. Imyself have only seldom seen them, and do not like at all tocrack dongles via software, coz it requires a huge amount of zenthinking and of luck and of time. If you want more informationon the hardware way to crack dongles, try to contact the olderones on the appropriate web sites, they may even answer you ifyou are nice, humble and really technically interested.     The obvious principle, that applies to the software passwordtypes mentioned above is the following: The better the passwordis hidden, and the better it is encrypted, the more secure theprogram will be. The password may be-    encrypted and/or-    in a hooked vector and/or-    in an external file and/or-    in a SMC (Self modifying code) part     Let's finally inspect the common "ready_made" protectionschemes (used by many programmers that do not programthemselves):*    password read in*    letters added to a key to be entered*    complement of the letters formed xoring with 255*    saved key (1 char)*    saved password (256 chars)*    saved checksum (1 char), as protection, against simple     manipulations*    generating file PASSWORD.DAT with password, to be inserted     inside a different file than the one containing the calling     routineNow the lazy programmer that wants to "protect" his programsearches first the file where the password is stored, then loadsthe key, the password and the checksum. He uses a decryptprocedure to decrypt the password and a check_checksum procedureto check whether the password was modified. All this is obviouslycrackabe in few seconds.&lt;strong&gt;[PASSWORD ACCESS INSIDE THE SETUP]&lt;/strong&gt;     Some computers have a password protected access INSIDE theSetup (at the beginning), the protection scheme does not allowa boot with a floppy and does not allow a setup modify. In thesecases the only possible crack is an old hack method: *    open the PC*    find on the motherboard a small jumper (bridge) with the     words "Pw"*    take it away*    PC on*    run the setup with F1 or Del (depending from the BIOS) (the     protection will not work any more)*    deactivate inside the setup the option password*    PC off*    put the small jumper (bridge) back again*    close the PC*    PC on, cracked (if you want to be nasty you could now use     the setup to set YOUR password)     If you want to know more about access refuse and accessdenying, encryption and locking of the FAT tables, get from theweb, and study, the (very well written) code of a virus called"Monkey", that does exactly this kind of devastation. Virusstudying is, in general, very useful for cracking purposes, cozthe virus'code is at times-    very well written (pure, tight assembly)-    using concealing techniques not much different from the     protection schemes (often far superior)-    using the most recent and best SMC (self modifying code)     tricks     But, and this is very important, do not believe that theprotection schemes are very complicated! Most of the time theprotection used are incredibly ordinary: as a final example ofour paper protection schemes, let's take a program released notlong ago (1994), but with a ridiculous protection scheme: TOP(Tiger on the prowl) a simulation from HPS.Here the cracking is straightforward:-    MAP(memory_usage) and find main_sector-    type "AAAA" as password-    (s)earch main_sector:0 lffff "AAAA"-    dump L80 "AAAA" location -40 (gives you a "wide" dump),     this gives you already the "echo" of the correct password-    breakpoint on memory read &amp; write to "AAAA" location and     backtrace the complete main_sectorit's done! Here the code_lines that do protect TOP:     8A841C12  MOV  AL,[SI+121C]   move in AL first user letter     3A840812  CMP  AL,[SI+1208]   compare with echo     7402      JZ   go_ahead_nice_buyer     EB13      JMP  beggar_off_ugly_cracker&lt;strong&gt;Now let's quickly crack it:&lt;/strong&gt;------------------------------------------------CRACKING TOP.EXEren top.exe top.dedsymdeb top.ded-    s (cs+0000):0 Lffff 8A 84 1C 12 3A 84xxxx:yyyy          &lt;strong&gt; (this is the answer of the debugger)&lt;/strong&gt;-    e xxxx:yyyy+2  08 (instead of 1C)-    w-    qren top.ded top.exe-------------------------------------------------And you changed the MOV  AL, [SI+121C] instruction in a MOV AL,[SI+1208] instruction... it is now reading the ECHO instead ofthe characters you typed in... no wonder that the ECHO doescompare exactly with itself... &lt;strong&gt;and you pass!&lt;/strong&gt;&lt;strong&gt;"SOMETHING FISHY UNDER COVERS"&lt;/strong&gt;Back to the "Passletter" type of password protected programs.Let's take as an example the protection used in a game of 1990:"F19", where the protection scheme asks you to identify aparticular plane's silhouette. This kind of protection is usedin order to avoid the use of memory locations where the passwordsare stored: we saw in the first part of our "passwords hands on"how easy it is to crack those schemes.To crack this kind of protection, you could try a technique knowas "memory snuffing". The protected program, START.EXE, installitself first at location xxxx:0000 with a length of 6C62 bytes,but proceeds to a relocation of its modules (with some SMC, selfmodifying code parts) in different locations. What does all thismean? Well, this could mean quite many things... the mostimportant one for crackers is that the protection code will probably snap way ahead of the actual user input phase.Now you 'll quickly find out that the routine determining(randomly) which plane is being chosen, leaves the progressivenumber of this plane in one memory location: (imc) 43CD:DADA.This brings us to the random triggering mechanism:E87FAF    CALL random_seed83C402    ADD  SP,028946E8    MOV  [BP-18],AX     and ds:(BP-18) is the location                              you are looking forNow, every time this random triggers, you get a different number(00-x14) in this location, corresponding to the different planethe user should choose.The random seed routine, evidently, comes back with the randomseed in AX... what we now need is to zero it: the user willalways have to choose the same plane: "plane 0", and he will havegiven the correct answer. Note how elegant all this is: we do notneed to interfere with the whole mouse pointing routines, norwith the actual choosing of the planes... the random seed maychoose whatever plane it wishes... the memory location for thischoice will always report the (legitimate) choice of zero.&lt;strong&gt;So, let's quickly crack this program:&lt;/strong&gt;---------------------------------------------------CRACKING "F19" [START.EXE] (by +ORC, January 1996)ren start.exe start.ded       &amp;lt;- let's have a dead filesymdeb start.ded              &amp;lt;- let's debug it- s cs:O lffff 83 C4 02 89 46 E8 &amp;lt;- search ADD SP,02   xxxx:yyyy                     &amp;lt;- debugger's answer- e xxxx:yyyy 58 [SPACE] 31 [SPACE] C0 [SPACE]- w                           &amp;lt;- write the crack- q                           &amp;lt;- back to the OSren start.ded start.exe       &amp;lt;- re-write the exe----------------------------------------------------You just transformed the instruction you searched for     83C402    ADD  SP,+02 in the following sequence:     58        POP  AX        &amp;lt;- respecting ADD SP,+02     31C0      XOR  AX,AX     &amp;lt;- xoring to zero(the POP AX instruction increments the stack pointer by 2, inorder to respect the previous ADD SP,+02).Well, nice. It's getting easier, isnt'it? Now let's take asexample a protection that has no "echo" in memory. (At thebeginning this was a smart idea: "the cracker won't find thecorrect password, 'coz it's not there, ah!". We'll now thereforecrack one of the first programs that used this scheme:[Populous.exe], from Bullfrog.&lt;strong&gt;[POPULOUS.EXE]&lt;/strong&gt;     A old example of the protection scheme "password that is nota password" can be found in [Populous.exe], from Bullfrog. It'sa very widespread program, and you'll surely be able to find acopy of it in order to follow this lesson. The program asks forthe identification of a particular "shield", a combination ofletters of various length: the memory location were the userpassword is stored is easily found, but there is (apparently) no"echo" of the correct password. You should be able, by now, tofind by yourself the memory location were the user password isstored. Set a breakpoint memory read &amp; write on this area, andyou 'll soon come to the following section of code:&lt;em&gt;F7AE4EFF  IMUL WORD PTR [BP+FF4E]       &amp;lt;- IMUL with magic_Nø40        INC  AX3B460C    CMP  AX, [BP+0C]7509      JNZ  beggar_off_ugly_copier8B460C    MOV  AX, [BP+0C]A3822A    MOV  [2A82], AXE930FE    JMP  nice_buyer817E0C7017CMP  WORD PTR[BP+0C],1770     &amp;lt;- beggar_off&lt;/em&gt;I don't think that you need much more now... how do you preferto crack this protection scheme? Would you choose to insert a MOV[BP+0C], AX and three NOPS (=6 bytes) after the IMUL instruction?Wouldn't you rather prefer the more elegant JMP to nice_buyerinstruction at the place of the JNZ beggar_off? This solution hasless nops: remember that newer protection schemes smellNOPs_patches!). &lt;strong&gt;Yeah, let's do it this way:&lt;/strong&gt;---------------------------------------------------CRACKING [Populous.exe]&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;ren populous.exe populous.ded      &amp;lt;- let's have a dead filesymdeb populous.ded                &amp;lt;- let's debug it-    s cs:O lffff F7 AE 4E FF      &amp;lt;- the imul magic_Nøxxxx:yyyy                          &amp;lt;- debugger's answer-    e xxxx:yyyy+4  EB [SPACE] 03  &amp;lt;- JMP anyway-    w                             &amp;lt;- modify ded-    q                             &amp;lt;- back to the OSren populous.ded populous.exe      &amp;lt;- let's re-have the exe----------------------------------------------------This time was easy, wasnt'it?      Now you are almost ready with this course... let's crack alast application, a memory utility that is very widespread, verygood (the programmers at Clockwork software are Codemasters),very useful for our purposes (you'll use it later to crack a lotof TSR) and, unfortunately for Clockworkers, very easy to crackat the level you are now. But, Hey! Do not forget that you would have never done it withoutthis tutorial, so do the following: look toward east from yourwindow, sip a Martini-Wodka (Two blocks of ice first, 1/3 dryMartini from Martini &amp; Rossi, 1/3 Moskovskaia Wodka, 1/3Schweppes indian tonic) and say three times: Thank-you +ORC!. &lt;strong&gt;[MAP.EXE]&lt;/strong&gt;     Let's now go over to one of the best TOOLS for mapping yourmemory usage that exist: MAP.EXE (version 2) from the masters atClockwork software. The usage of this tool has been recommendedin Lesson 2, and you should learn how to crack it, coz it comeswith an annoying nag-screen ("Nigel" screen). In [Map.exe] thisubiquitous "Nigel" screen appears at random waiting for a randomamount of time before asking the user to press a key which variesevery time and is also selected at random.     The use of a single letter -mostly encrypted with some XORor SHR- as "password" makes the individuation of the relevantlocations using "snap compares" of memory much more difficult.But the crack technique is here pretty straightforward: justbreak in and have a good look around you.     The INT_16 routine for keyboard reading is called just afterthe loading of the nag screen. You 'll quickly find the relativeLODSB routine inside a routine that paints on screen the word"Press" and a box-edge after a given time delay:     B95000         MOV  CX,0050     2EFF366601     PUSH CS:[0166]     07             POP  ES     AC             LODSB     ...You could already eliminate the delay and you could already forcealways the same passletter, in order to temperate the effects ofthe protection... but we crack deep!: let's do the job and trackback the caller! &lt;strong&gt;The previous routine is called from thefollowing section of the code:&lt;/strong&gt;     91             XCHG AX,CX     6792           XCHG AX,DX     28939193       SUB  [BP+DI+9391],DL     2394AA94       AND  DX,[SI+94AA]     2EC7064B880100 MOV  WORD PTR CS:[884B],0001     2E803E5C0106   CMP  BYTE PTR CS:[015C],06     7416           JZ   ret       &amp;lt;- Ha! jumping PUSHa &amp; POPa!     505351525756   PUSH the lot     E882F3         CALL 8870     2E3B064B88     CMP  AX,CS:[884B]     7307           JAE  after RET &amp;lt;- Ha! Not taking the RET!     5E5F5A595B58   POP  the lot     C3             RET     ...                                &amp;lt;- some more instructions     E86700         CALL delay_user     BE9195         MOV  SI,9591     2E8B3E255C     MOV  DI,CS:[5C25]     83EF16         SUB  DI,+16     2E8A263D01     MOV  AH,CS:[013D]     50             PUSH AH     E892C7         CALL routine_LODSB  &amp;lt;-- HERE!     B42C           MOV  AH,2C     CD21           INT  21             &amp;lt;- get seconds in DH     80E60F         AND  DH,0F          80C641         ADD  DH,41     58             POP  AX     8AC6           MOV  AL,DH     83EF04         SUB  DI,+4     AB             STOSW     E85A00         CALL INT_16_AH=01     B400           MOV  AH,00     CD16           INT  16     24DF           AND  AL,DF     &amp;lt;- code user's letter_answer     3AC6           CMP  AL,DH     &amp;lt;- pass_compare     75F3           JNZ  CALL INT_16_AH=01     E807F3         go_ahead     You just need to look at these instructions to feel it: Ithink that unnecessary code segments (in this case protections)are somehow like little snakes moving under a cover: you cannoteasily say what's exactly going on yet, but you could bet thatthere is something fishy going on. Look at the code precedingyour LODSB routine call: you find two JUMPS there: a JZ ret, thatleaves a lot of pusha and popa aside, and a JAE after RET, thatdoes not take the previous ret. If you did smell something hereyou are thoroughly right: The first JZ triggers the NIGEL screenprotection, and the second JAE does THE SAME THING (as usual,there are always redundances, exactly as there are a lot ofpossibilities to disable a single protection). Now you know...you can disable this protection at different points: the twoeasiest blueprints being &lt;strong&gt;1)   to change 7416 (JZ ret) in a EB16 (JMP ret anyway)&lt;/strong&gt; &lt;strong&gt;2)   to change 7307 (JAE after ret) in a 7306 (JAE ret).&lt;/strong&gt;     &lt;strong&gt;We have not terminated yet: if you try locating this partof the code in order to change it, you won't have any luck&lt;/strong&gt;: it'sa SMC (Self modifying code) part: it is loaded -partly- fromother sections of the code (here without any encryption). Youmust therefore first of all set a breakpoint on memory range;find out the LODSW routine; find out the real area; dump thatmemory region; find out a search sequence for the "dead" code...and finally modify the "dead" program.&lt;strong&gt;Now let's quickly crack it:&lt;/strong&gt;------------------------------------------------CRACKING MEM.EXE (version 2) ren map.exe map.dedsymdeb map.ded-    s (cs+0000):0 Lffff 74 16 50 53 51 52 57xxxx:yyyy           &amp;lt;- this is the debugger's answer-    e xxxx:yyyy    EB-    w-    qren map.ded map.exe-------------------------------------------------&lt;strong&gt;Now you have done it, NIGEL has been cracked!&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335939-113821454124716446?l=ahackaday.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113821454124716446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113821454124716446'/><link rel='alternate' type='text/html' href='http://ahackaday.blogspot.com/2004/04/lesson-3-hands-on-paper-protections-p.html' title='Lesson 3 : hands on, paper protections P-2'/><author><name>bruenet</name><uri>http://www.blogger.com/profile/01644616483340492993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-17335939.post-113821419084306616</id><published>2004-02-25T09:36:00.000-09:00</published><updated>2006-01-25T09:47:18.546-09:00</updated><title type='text'>Lesson 3 : hands on, paper protections P1</title><content type='html'>&lt;center&gt;&lt;h1&gt;&lt;span style="font-size:85%;"&gt;[UMS.EXE] [LIGHTSPD.EXE] [GENERAL.EXE]&lt;/span&gt;&lt;/h1&gt;&lt;/center&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;center&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/center&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;SOME PROBLEMS WITH INTEL's INT&lt;/strong&gt;The INT instruction is the source of a great deal of theflexibility in the PC architecture, because the ability to getand set interrupt vectors means that system services (includedDOS itself) are infinitely extensible, replaceable andMONITORABLE. Yet the Int instruction is also remarkablyinflexible in two key ways:-    an interrupt handler DOES NOT KNOW which interrupt number     invoked it.-    the int instruction itself expects an IMMEDIATE operand:     you cannot write MOV AX,x21, and then INT AX; you must     write INT x21.That would be very good indeed for us cracker... unfortunatelymany high level language compilers compile interrupts into PUSHFand FAR CALL instruction sequences, rather than do an actual INT.Another method is to PUSH the address of the handler on the stackand do RETF to it.      Some protection schemes attempt to disguise interrupt calls,1) camouflaging the code, 2) putting in substitute interruptinstructions which look harmless and modifying them "on the fly"or 3) replicating whole interrupt routines inside the code. Thisis particularly frequent in the various "disk access" protectionschemes that utilize INT_13 (the "disk" interrupt) and willtherefore be thoroughly explained in -&amp;gt; lesson 5. &lt;strong&gt;A LITTLE BASIC ASSEMBLER&lt;/strong&gt;In order to understand the protection schemes and to defeat them,you must acquire a passing knowledge of assembler, the "machinelanguage" code. You can find a lot of good, well explained codefor free: viruses are one of the best sources for good "tight andtricky" assembler code. You can find the source code of almostall viruses on the web: oddly all the would be hackers seem tohave an aberrant passion for this kind of stuff instead ofstudying cracking techniques. But there are millions of lines ofgood explained "commercial" assembler code on the net, just fishit out and study it: the more you know, the better you crack.I'll restrict myself to some observations, sprinkled throughoutthis tutorial. Let's start with some must_know:&lt;strong&gt;------------------------ STRINGS ----------------------------&lt;/strong&gt;The string instructions are quite powerful (and play a great rolein password protection scheme). ALL of them have the propertythat:1)   The source of data is described by the combination DS:SI2)   The destination of data is described by the combination     ES:DI3)   As part of the operation, the SI and/or DI register(s)     is(are) incremented or decremented so the operation can be     repeated.&lt;strong&gt;------------------------- JUMPS -----------------------------&lt;/strong&gt;JZ   ero       means what it saysJNZ  ero       means what it saysJG   reater    means "if the SIGNED difference is positive"JA   bove      means "if the UNSIGNED difference is positive"JL   ess       means "if the SIGNED difference is negative"JB   elow      means "if the UNSIGNED difference is negative"JC   arry      assembles the same as JB, it's a matter of               aesthetic choice&lt;strong&gt;CRACKING PASSWORD PROTECTED PROGRAMS&lt;/strong&gt;     Refer to lesson one in order to understand why we are usinggames instead of commercial applications as learn material: theyoffer the same protection used by the more "serious" applications(or BBS &amp; servers) although inside files that are small enoughto be cracked without loosing too much time.     A whole series of programs employ copy protection schemesbased upon the possess of the original manual or instructions.That's obviously not a very big protection -per se- coz everybodynowadays has access to a photocopier, but it's bothering enoughto motivate our cracks and -besides- you'll find the same schemeslurking in many other password protected programs.      Usually, at the beginning of the program, a "nag screen"requires a word that the user can find somewhere inside theoriginal manual, something like: "please type in the first wordof line 3 of point 3.3.2". Often, in order to avoid mistakes, theprogram indicates the first letter of the password... the usermust therefore only fill the remaining letters.&lt;strong&gt;Some examples, some cracks:&lt;/strong&gt;---------------------------------------------------UMS (Universal Military Simulator) version 1by Dr Ezra SIDRAN(c) 1987 Intergalactic DevelopmentEuropean Union:     Rainbird SoftwareUnited States:      Firebird Software&lt;strong&gt;---------------------------------------------------&lt;/strong&gt;     This very old EGA program is one of the first I cracked inmy youth, and it's very interesting coz it employs a very basilarprotection scheme (a "PRIMITIVE"! More than 80% of the protectionschemes used to day (January 1996) are directly derived from oneof the 12 primitives.     The nag screen snaps at the beginning and keeps indefinitelyasking your answer, only the use of CTRL+C will bring you out ofit, back to DOS. That's a clear sign of older protection schemes:newer schemes let you in for only 3 attempts or even only one,and pop out to the OS if you fail. In UMS, besides, there is no"first letter" aid, a later improvement.     The cracking procedure for password protected programs is,first of all, to find out where are stored the letters that youtype in. So examine your memory map, find out where the programdwells in memory, do a snap save of these memory areas and aseries of snap compares as you type your password in.     Strangely enough, in the case of UMS, as you type yourpassword there seems to be no difference at all in the memorylocations where this program dwells... yet the data must besomewhere... Usually such a situation is a clear sign that anhooked interrupt is used to hide the data.&lt;strong&gt;     Checking the hooked vectors you find out the following:&lt;/strong&gt;vecs 00, 02, 22          are hooked where needs bevecs 34-3D               are hooked at xxxx:0vec  3E                  is hooked at xxxx:00CA     Ha! Let's have a closer look at this bizarre 3E hook. Let'ssearch for some words used in the nag_screen and then let's dumpthe area where we find them (in UMS that will be at 3E_hookaddress + 7656) and loo! You'll see the content of the nag screenand, immediately afterwards, ALL the passwords "in extenso", i.e.not encoded, not scrambled, nothing at all... THERE THEY ARE(that's a very old protection scheme indeed). You could now, forinstance, easily patch all the different passwords to (forinstance) "PASS", and this would work... it's a very primitiveprotection, as we said, nevertheless the use of a hooked vectoras hiding place for the protection code is not yet obsolete...we'll find it elsewhere, in many "more modern" programs.     Now let's go deeper and examine the "compare" mechanism, wewant to crack, here, not just to patch.     &lt;strong&gt;Password protected programs (and access protection routines&lt;/strong&gt;for server and BBS, for that matter) have quite a lot of weakpoints. The most obvious one (you 'll find out the other whenyou'll high crack) is that they MUST compare the password of theuser with the original one(s). So you do not need to steal apassword, you just need to "ear" the echo of the original one inthe memory locations used for the compare, or, and that's morecorrect, to crack the compare mechanism itself so as to make itlet you in even with a totally false password.&lt;strong&gt;     The compare mechanism of UMS can be found setting abreakpoint on the memory range that covers the three locationswhere the password is stored&lt;/strong&gt; (and you 'll find these with yoursearch capabilities and with a pair of snap compares):ES:0F8E   (here you 'll see a copy of the password that the          program is asking)ES:0F5C   (here you 'll see a copy of the password that the user          types in)INT_3E hook_address + 7656 (here are all the possible passwords          in extenso).&lt;strong&gt;Here is how the protection scheme looks out:&lt;/strong&gt;MOV       CX,FFFF        Charge MAX in CXREPNZ     SCASB          Scan ES:DI (the user password)NOT       CX             Now CX holds the number of the                         character that the user typed inMOV       DI,SI          Real password offset to DILDS       SI,[BP+0A]     User password offset in SIREPZ      CMPSB          Compares DS:SI with ES:DI (user                         password and real password) then snap                         out at CX=0 or at char_different,                         whichever comes first.Nice, we found the compare schema... how do we crack it now?There are many elegant solutions, but let's remain on a basiclevel... you look at the code that follows the CMPSB searchingthe "snapping schema"... here it is immediately afterwards(that's the case in most of the primitives). Remember: we sprungout of the CMPSB check at the first different char, OR at the endof the count of the user chars. Here it is what follows:     MOV  AL,[SI-01]     loads in AL the before_different char                         of the user password (should be zero)     SUB  AL,ES:[DI-01]  subs with the before_different char of                         the real password (should be zero)     CBW                 zero flag set, "TRUE", if OK_matchWell let's now look for the next JZ near (it's a "74" code)     CS:IP 740D     JZ  location no_goodWait, let's continue a little... is there another check (oftenyou have a double check on DI)... yes there is!     CS:IP 7590     JNZ location no_goodCracking such a schema is very easy: you just need to substitute75 to 74 and 74 to 75: transform your JZ in a JNZ and the JNZ ina JZ... now you will always pass, no matter what you write,unless you exactly guess the password!&lt;strong&gt;Now let's quickly crack it:&lt;/strong&gt;------------------------------------------------CRACKING UMS.EXE ren ums.exe ums.dedsymdeb ums.ded-    s (cs+0000):0 Lffff 74 0D 1E B8 C2 3F(nothing)-    s (cs+1000):0 Lffff 74 0D 1E B8 C2 3F(nothing)-    s (cs+2000):0 lffff 74 0D 1E B8 C2 3Fxxxx:yyyy           (this is the answer of the debugger)-    e xxxx:yyyy    75-    e xxxx:yyyy+17 74-    w-    qren ums.ded ums.exe-------------------------------------------------     In the debug/symdeb crack above we use as search string thebytes comprising and following immediately the first JZ.I know, I know... we saw them in [Soft-ice] and we could havemodified them there, but I'm teaching also pupils who may nothave &lt;strong&gt;[Soft-ice].&lt;/strong&gt;      Note that the program is x431A0 bytes long, and thereforehas a BX=4 sectors adding to the CX=31A0 in the initialregisters... that's the reason I wanted to examine all thesectors (even if I knew that the snap was in sector (cs+2000):that's good practice! If you do not find your string in the firstsector you must search for it in the next sectors, till you findit, coz in many programs there may be MORE THAN ONE repetitionsof the same schema (more about this double check later).That's it, pupils, that's the way to crack old [UMS.EXE].&lt;strong&gt;Let's go over, now, to more elaborate and more modern passwordprotection schemes.&lt;/strong&gt;--------------------------------------------------------&lt;strong&gt;LIGHTSPEED, from Microprose (we crack here version 461.01)&lt;/strong&gt;--------------------------------------------------------     This program, released in 1990, operates a more "modern"variation of the previous scheme. You 'll find this variation inmany access routines of remote servers (and this makes it veryinteresting indeed).     Let's begin as usual, with our hooked vectors examinationand our snap compares.Hooked vectors: 00, 08, 1B, 22, 23: nothing particular.The snap_comparisons of the main memory area -as you type thepassword in- gives more than six pages of changing locations...that's clearly much too much to examine.What now?     Sit down,  Relaxe, meditate. Get the memory map of theprogram's layout. Start anew: snap_save (before typing anythingin). Type as password "ABCDE". Get the print of the snapcompares. Sit down, sip Martini Wodka, relax. You know that thecode for A is x41, for B x42, for C x43 and so on... and in thesnap_compares, that you made between letters, you 'll have onlysome locations with these values changing. Focus on these.      You 'll soon enough find out that for LIGHTSPEED absolutelocation (in my computer) 404307, i.e.: relative locations (inmy computer) 30BE:F857 or 4043:0007 evoke the characters youtype, i.e. something like -----------------------------------------------------F855 F856 F857                F858                F859...41   3E   first_ready_letter  your_1st_letter     your_2nd_one...-----------------------------------------------------Inspecting the same prints, you 'll find out that absolutelocation 30C64 (imc) or relative location 30BE:F83E evokes theLAST character you typed in. The relative code line is:     CS:0097   MOV  AX,[BP-08] where SS:F83E = 00+letter_code     Now breakpoint at these locations and investigate what'sgoing on (for instance, the instruction that follows is      CS:009A   MOV [BX], AX and this means that the code of the letter you just typed in willbe now copied in BX=F85A. What else can you do? Time to use alittle intuition: look for an instruction "CMP AX,000D", whichis the typical "IF the user hits ENTER then" instruction, coz"x1D" its the ENTER keystroke. This must be somewhere aroundhere. Ha! You 'll soon enough find the line     CS:0073  3D0D00     CMP AX,000DAnd now the way is open to the crack. But YOU DO NOT NEED ALLTHIS! Since the password protection schemes are -as I told you-all more or less the same, I would suggest that you use first ofall following trick: in the largest part of the program (usememory map to see where the program dwells) search the "F3A6"sequence, that's instruction REPZ CMPSB.     In the case of Lightspd you 'll get as answer FOUR addresseswith this instruction: (pgsg=program main segment)     pgsg:C6F9     pgsg:E5CA     pgsg:E63E     pgsg:EAB0There you are! Only four... have a short look at each of them:you 'll see that the second one (pgsg:E5CA) is the "good" one.The compare mechanism in this program of 1990 it's more or lessthe same as in 1987'UMS (and do believe me: the same mechanismis still in use to day (1996)!B9FFFF    MOV       CX,FFFF   charge Max in CXF2AE      REPNZ     SCASB     this scans ES:DI (the original                              password)F7D1      NOT       CX        so many chars in the original pw2BF9      SUB       DI,CX     change DI for compareF3A6      REPZ      CMPSB     compares DS:SI with ES:DI (real                              pw with user pw) then snaps out                              at CX=0 or at char_differs     See how easy? They all use the same old tricks the lazybastards! Here the section is preceded by a small routine tolowercase the user password, coz the original muster is alwayslowercased.     Now you would like, may be, to breakpoint at one of theselocations, in order to stop the program "in the snap area" andinspect the snap mechanism... that WILL NOT DO with a "fixed"breakpoint, coz these locations are called by the snap with adifferent segment:offset numeration as the one you found (that'sold dos magic). So you MUST first set a memory_read/writebreakpoint on these locations, and then get at them at the snap.Now you can find out the segment:offset used by the snap and onlynow you'll be able to set a fixed breakpoint (for instance on theNOT CX instruction).     Now run the program and breakpoint in: have a dump of theES:DI and see the original password. How nice! We have now theoriginal password in extenso in our memory dump window. That'sthe "echo". By the way, there is a whole school of crackingdevoted to find and use these echoes... we work on differentpaths, nevertheless password fishing can be interesting: whereare the password stored? From which locations do they come from?A common practice of the protectionists is to hide them indifferent files, far away, or in hooked vectors, or in SMC parts.This is a program of 1990, that differs in respect to UMS: thepasswords are not "hidden" inside a hooked vector, coz that's apretty stupid protection: any hexdump utility would still permityou to see them. Here the passwords are encoded (albeit in a veryprimitive manner): looking for them (with memory rangebreakpoints) you'll quickly find a section of the program codethat looks like this:sg:0118   8C 91 9D 95 9B 8D 00 B8 EC 94 9B 8D 8F 8B 9Bsg:0128   94 9B 8D 00 AE EC 9C 9B 8A 9B 86 00 A9 EC 91This is a typical encoded matrix, with clear 00 fences betweenthe encoded passwords.Ha! If all codes where so easy to crack! This is no better thanchildren's crypt! It's a NEG matrix! And there is directcorrespondence: 91=6F="o"; 92=6E="n"; 93=6D="m" and so on... Ha!     Let's now leave the "hidden" passwords and proceed with ourcracking... let's follow the snap procedure after the REPZ CMPSBinstruction looking for the "jump to OK" instruction...F3A6      REPZ      CMPSB          ; compares DS:SI with ES:DI 7405      JZ   preserved_AX=0000   &amp;lt;--- Here the first JZ1BC0      SBB  AX,AXADFFFF    SBB  AX,FFFF   :preserved_AX=00008BF3      MOV  SI,BX8BFA      MOV  DI,DX5D        POP  BPCB        RETF....83C404    ADD  SP,+040BC0      OR   AX,AX7509      JNZ  0276                &amp;lt;------ And here it is!     Now, remembering the UMS crack, you would probably want tochange the JZ instruction in a JNZ instruction (you tried it onthe fly INSIDE  [Soft-Ice] and it did work!), the "74" with a"75" also. And then you would like to change the JNZ instructionin a JZ instruction... Please feel free to try it... it will NOTwork! (You will not even find the second JNZ in the programcode). You should always be aware of the SMC (self modifyingcode) protections: parts of the code my be decrypted "on thefly", as needs arise, by the program. The code you modify whilethe program is running may be different from the code of the"dead" program.     Here we have a small "improvement" of the primitive: thesame instruction is used as "muster" for manipulation of otherparts of the program... if you do change it in a JNZ you get anoverlay message and the program pops out with instability! Youcannot easily modify the JNZ instruction either, coz the partafter the RETF will be compiled "on the fly" by lightspeed, andyou would therefore have to search the decryption mechanism andmodify the original encrypted byte somewhere... and may be theydo encrypt it twice... and then you must hack all night long...very annoying.     So do the following: back to the snap, a sip of martini-Wodka and meditate: loo! The only thing that happens after theJZ, is the setting of the AX register to flag *FALSE* (AX=1...that's what the two SBB instructions do) if the snap went outwith a non-zero flag... i.e. if you did not know the password.So let's nop the 5 bytes of the two SBB instructions, or, moreelegantly, let's have a INC AX, DEC AX, NOP, INC AX, DEC AXsequence instead of the two SBB! There is a good reason to usea sequence of working instructions instead of a series of NOPs:recent protection schemes "smell" patched nops inside the programand trash everything if they find more than -say- threeconsecutive NOPs! You should always try to choose THE LESSINTRUSIVE and MORE "CAMOUFLAGED" solution when you crack!     Eliminating the two SBBs we get our crack! No need to botherwith the second JNZ either... the program will work as if you gotthe password if you have it AND if you do not (that's better asthe previous type of crack -seen for UMS- when you crack computeraccesses: hereby the legitimate user will not have any suspects'coz the system will not shut him out... everybody will access:the good guys and the bad ones... that's nice isn't it?).&lt;strong&gt;     Now let's quickly crack LIGHTSPD:&lt;/strong&gt;------------------------------------------------CRACKING LIGHTSPEED.EXE ren lightspd.exe lightspd.dedsymdeb lightspd.ded-    s (cs+0000):0 Lffff 2B F9 F3 A6 74xxxx:yyyy           (this is the answer of the debugger)-    s (cs+1000):0 Lffff 2B F9 F3 A6 74(nothing, but do it nonetheless, just to be sure)-    s (cs+2000):0 lffff 2B F9 F3 A6 74 (nothing, just to be sure, now it's enough)-    e xxxx:yyyy+6  40 [SPACE] 48 [SP] 90 [SP] 40 [SP] 48-    w-    qren lightspd.ded lightspd.exe-------------------------------------------------All this CMPSB is very common. Some programs, nevertheless,utilize a password protection scheme that is slightly different,and does not rely on a F3A6 REPZ CMPSB instruction. Let'sanalyze, for instance, the protection scheme used in the firstversion of Perfect general I from QQP-White wolf, July 1992.When you break in, at the nag screen, you are in the middle ofthe BIOS procedures, coz the program expects your input (yourpassword, that's is). You 'll quickly find out (MAP MEMORYUSAGE!) that [General.exe] dwells in two main areas; Settingbreakpoints on memory write you 'll find out that the memory area"queried" by the protection mechanism is     xxxx:1180 to xxxx:11C0where xxxx represents the second of the memory segments where theprogram dwells. Now do the following (a very common crackingprocedure):*    Breakpoint on memory range WRITE for the small memory area     touched by the program in querying you for the password.*    Breakpoint TRACE on the whole memory range of the MAIN     CODE.*    Run anew everythingIt's already done! Now it's your intuition that should work alittle: Here the last 9 traces (traces [!], not instructionsfollowing on a line) before the calling of the procedure sniffingyour memory area:-9   xxxx:0185 7425           JZ   somewhere, not taken-8   xxxx:0187 2D1103         SUB  AX,0311-7   xxxx:018A 7430           JZ   somewhere, not taken-6   xxxx:018C 2DFD04         SUB  AX,04FD-5   xxxx:018F 7443           JZ   next_trace, taken-4   xxxx:01D4 E85500         CALL funny_procedure -3   xxxx:022C 803E8F8C11     CMP  BYTE PTR[8C8F],11-2   xxxx:0231 750E           JNZ  somewhere, not taken-1   xxxx:0233 9A0A0AC33E     CALL procedure_that_sniffs                                   our_memory_area&lt;strong&gt;Well, the call to funny_procedure followed by a byte compare&lt;/strong&gt;"feels" fishy from very far away, so let's immediately look atthis part of the code of [General.exe]:funny_procedure     803E8F8C11     CMP  BYTE PTR[8C8F],11     750E           JNZ  compare_byte     9A0A0AC333     CALL procedure_that_sniffs     0AC0           OR   AL,AL     7405           J2   compare_byte     C6068F8C2A     MOV  BYTE PTR [8C8F],2A:compare_byte     803E8F8C2A     CMP  BYTE PTR [8C8F],2A     7504           JNZ  after_ret     B001           MOV  AL,01     C3             RET  You should be enough crack-able ;=), by this lesson, to noticeimmediately the inconsistency of the two successive instructionsMOV 2A and CMP 2A, coz there would be no sense in comparing the"2A" in order to JNZ to after_ret if you just had the 2A set withthe precedent MOV instruction... but the first JNZ jumps to thecompare WITHOUT putting the "2A" inside. And "2A" is nothing elseas the "*" symbol, commonly used by programmer as "OK"! Thisprotection works in the following way (this is the above codeexplained):-    compare holy_location with 11-    jump non zero to compare holy_loc with "*"-    else call sniffing protection part-    or al,al (al must be zero, else)-    jump zero to compare holy_loc with "*"-    if al was zero mov "*" inside holy_loc-    compare holy_loc with "*"-    if there is a difference then JNZ beggar_off_ugly_copier-    else ret_ahead_nice_buyer&lt;strong&gt;Now let's quickly crack it:&lt;/strong&gt;------------------------------------------------CRACKING GENERAL.EXE ren general.exe general.dedsymdeb general.ded-    s (cs+0000):0 Lffff 8C 11 75 0Exxxx:yyyy           (this is the answer of the debugger)-    e xxxx:yyyy+2  EB [SPACE] 09 -    w-    qren general.ded general.exe-------------------------------------------------And in this way you changed the JNZ to the cmp "*" instructionin a JMP to the mov "*" instruction. &lt;strong&gt;So no more nag screens, nomore protections... serene, placid, untroubled&lt;/strong&gt; [general.exe].&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335939-113821419084306616?l=ahackaday.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113821419084306616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113821419084306616'/><link rel='alternate' type='text/html' href='http://ahackaday.blogspot.com/2004/02/lesson-3-hands-on-paper-protections-p1.html' title='Lesson 3 : hands on, paper protections P1'/><author><name>bruenet</name><uri>http://www.blogger.com/profile/01644616483340492993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-17335939.post-113109465226779160</id><published>2003-11-03T23:50:00.000-09:00</published><updated>2006-01-25T09:00:32.023-09:00</updated><title type='text'>Very Brief History of Hacking</title><content type='html'>&lt;div class="Section1"&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;Prehistory of Hacking (before 1969)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt; &lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;In the beginning there was the phone company ? the brand-new &lt;?xml:namespace prefix = st1 /&gt;&lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Bell&lt;/st1:place&gt;&lt;/st1:city&gt; Telephone, to be precise. And there were nascent hackers. Of course in 1878 they weren't called hackers yet. Just practical jokers, teenage boys hired to run the switchboards who had an unfortunate predilection for disconnecting and misdirecting calls ("You're not my Cousin Mabel?! Operator! Who's that snickering on the line? Hello?"). Now you know why the first transcontinental communications network hired female operators.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Flash forward to the first authentic computer hackers, circa the 1960s. Like the earlier generation of phone pranksters, MIT geeks had an insatiable curiosity about how things worked. In those days computers were mainframes, locked away in temperature-controlled, glassed-in lairs. It cost megabucks to run those slow-moving hunks of metal; programmers had limited access to the dinosaurs. &lt;span class="GramE"&gt;So the smarter ones created what they called "hacks" - programming shortcuts ? to complete computing tasks more quickly.&lt;/span&gt; Sometimes their shortcuts were more elegant than the original program.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;Elder Days of Hacking (1970-1979)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;In the 1970s the cyber frontier was wide open. Hacking was all about exploring and figuring out how the wired world worked. Around 1971 a &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;Vietnam&lt;/st1:place&gt;&lt;/st1:country-region&gt; vet named John Draper discovered that the giveaway whistle in &lt;span class="SpellE"&gt;Cap'n&lt;/span&gt; Crunch cereal boxes perfectly reproduced a 2600 megahertz tone. Simply blow the whistle into a telephone receiver to make free calls; thanks for using AT&amp;T.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Counterculture guru &lt;span class="SpellE"&gt;Abbie&lt;/span&gt; Hoffman (above) followed the captain's lead with The Youth International Party Line newsletter. This bible spread the word on how to get free phone service. "&lt;span class="spelle"&gt;Phreaking&lt;/span&gt;" didn't hurt &lt;span class="GramE"&gt;anybody,&lt;/span&gt; the argument went, because phone calls emanated from an unlimited reservoir. Hoffman's publishing partner, Al Bell, changed the newsletter's name to TAP, for Technical Assistance Program. True believers have hoarded the mind-numbingly complex technical articles and worshipped them for two decades.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;The only thing missing from the hacking scene was a virtual clubhouse. How would the best hackers ever meet? In 1978 two guys from Chicago, Randy Seuss and Ward Christiansen, created the first personal-computer bulletin-board system. It's still in operation today.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;The Golden Age of Hacking (1980-1991)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;In 1981 IBM announced a new model ? a stand-alone machine, fully loaded with a CPU, software, memory, utilities, storage. They called it the "personal computer." You could go anywhere and do anything with one of these hot rods. Soon kids abandoned their Chevys to explore the guts of a "Commie 64" or a "Trash-80."&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;The 1983 movie &lt;span style="mso-bidi-font-style: italic"&gt;War Games&lt;/span&gt; shone a flashlight onto the hidden face of hacking, and warned audiences nationwide that hackers could get into any computer system. Hackers gleaned a different message from the film. It implied that hacking could get you girls. &lt;span class="GramE"&gt;Cute girls.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;The territory was changing. More settlers were moving into the online world. ARPANET was morphing into the Internet, and the popularity of bulletin-board systems exploded. In &lt;st1:city st="on"&gt;Milwaukee&lt;/st1:city&gt; a group of hackers calling themselves the 414's (their area code) broke into systems at institutions ranging from the Los Alamos Laboratories to &lt;st1:city st="on"&gt;Manhattan&lt;/st1:city&gt;'s &lt;st1:place st="on"&gt;&lt;st1:placename st="on"&gt;Memorial&lt;/st1:placename&gt; &lt;st1:placename st="on"&gt;Sloan-Kettering&lt;/st1:placename&gt; &lt;st1:placename st="on"&gt;Cancer&lt;/st1:placename&gt; &lt;st1:placetype st="on"&gt;Center&lt;/st1:placetype&gt;&lt;/st1:place&gt;. Then the cops put the arm on them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;The Great Hacker War&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;To pinpoint the start of the "Great Hacker War," you'd probably have to go back to 1984, when a guy calling himself &lt;span class="SpellE"&gt;Lex&lt;/span&gt; &lt;span class="SpellE"&gt;Luthor&lt;/span&gt; founded the Legion of Doom. Named after a Saturday morning cartoon, the LOD had the reputation of attracting the best of the best ? until one of the gang's brightest young acolytes, a kid named Pier &lt;span class="SpellE"&gt;Optik&lt;/span&gt;, feuded with Legion of &lt;span class="SpellE"&gt;Doomer&lt;/span&gt; Erik &lt;span class="SpellE"&gt;Bloodaxe&lt;/span&gt; and got tossed out of the clubhouse. &lt;span class="SpellE"&gt;Phiber's&lt;/span&gt; friends formed a rival group, the Masters of Deception.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Starting in 1990, LOD and MOD engaged in almost two years of online warfare ? jamming phone lines, monitoring calls, trespassing in each other's private computers. Then the Feds cracked down. For &lt;span class="SpellE"&gt;Phiber&lt;/span&gt; and friends, that meant jail. It was the end of an era.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;Crackdown on Hacking (1986-1994)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;With the government online, the fun ended. Just to show that they meant business, Congress passed a law in 1986 called the Federal Computer Fraud and Abuse Act. Translation: A felony gets you five. Then along came Robert Morris with his Internet worm in 1988. Crashing 6,000 Net-linked computers earned Morris the distinction of being the first person convicted under the Act's computer-crime provision. Translation: a $10,000 fine and too many hours of community service.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Soon you needed a scorecard to keep up with the arrests. That same year Kevin &lt;span class="SpellE"&gt;Mitnick&lt;/span&gt; broke into the Digital Equipment Company's computer network; he was nabbed and sentenced to a year in jail. Then Kevin #2 ? Kevin &lt;span class="SpellE"&gt;Poulsen&lt;/span&gt; ? was indicted on phone-tampering charges. Kevin #2 went on the lam and avoided the long arm of the law for 17 months.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Operation &lt;span class="SpellE"&gt;Sundevil&lt;/span&gt; was the name the government gave to its ham-handed 1990 attempt to crack down on hackers across the country, including the Legion of Doom. It didn't work. But the following year Crackdown &lt;span class="SpellE"&gt;Redux&lt;/span&gt; resulted in jail sentences for four members of the Masters of Deception. &lt;span class="SpellE"&gt;Phiber&lt;/span&gt; &lt;span class="SpellE"&gt;Optik&lt;/span&gt; spent a year in federal prison.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Some people just couldn't learn from their mistakes, though. In February 1995 Kevin &lt;span class="SpellE"&gt;Mitnick&lt;/span&gt; was arrested again. This time the FBI accused him of stealing 20,000 credit card numbers. He sat in jail for more than a year before pleading guilty in April 1996 to illegal use of stolen cellular telephone numbers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;Zero Tolerance for Hacking (1994-1998)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Seeing &lt;span class="SpellE"&gt;Mitnick&lt;/span&gt; being led off in chains on national TV soured the public's romance with online outlaws. Net users were terrified of hackers using tools like "password &lt;span class="spelle"&gt;sniffers&lt;/span&gt;" to ferret out private information, or "spoofing," which tricked a machine into giving a hacker access. Call it the end of anarchy, the death of the frontier. Hackers were no longer considered romantic antiheroes, kooky eccentrics who just wanted to learn things. A burgeoning online economy with the promise of conducting the world's business over the Net needed protection. Suddenly hackers were crooks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;In the summer of 1994 a gang masterminded by a Russian hacker broke into Citibank's computers and made unauthorized transfers totaling more than $10 million from customers' accounts. Citibank recovered all but about $400,000, but the scare sealed the deal. The hackers' arrests created a fraud vacuum out there in cyberspace.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;Hack 2K (1999+)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;As the &lt;span class="SpellE"&gt;millenium&lt;/span&gt; approached, general cyber-hysteria over the infamous Y2K bug was further inflamed by several serious hacker attacks. Well-documented by the media, these invasions were experienced directly (perhaps for the first time) by the growing masses of casual web surfers. In the second week of February 2000 some of the most popular Internet sites (CNN, Yahoo, E-Bay and &lt;span class="SpellE"&gt;Datek&lt;/span&gt;) were subject to "denial of service" attacks. Their networks clogged with false requests sent by multiple computers under the control of a single hacker, these commercial sites crashed and lost untold millions in sales. In May, a new virus appeared that spread rapidly around the globe. The "I Love You" virus infected image and sound files and spread quickly by causing copies of &lt;span class="GramE"&gt;itself&lt;/span&gt; to be sent to all individuals in an address book.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Recent attacks on seemingly "secure" sites such as The White House, FBI and Microsoft.com have proven that despite massive public and private investment in cyber defense technology and methodology, hackers continue to pose a serious threat to the "information infrastructure."&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;Who are hackers, and what makes them tick? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;Two experts in the field of cyber forensics and psychology have some answers to that question. One is Marc Rogers, a behavioral sciences researcher at the &lt;st1:placetype st="on"&gt;University&lt;/st1:placetype&gt; of &lt;st1:placename st="on"&gt;Manitoba&lt;/st1:placename&gt; in &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Winnipeg&lt;/st1:city&gt;, &lt;st1:country-region st="on"&gt;Canada&lt;/st1:country-region&gt;&lt;/st1:place&gt;, and a former cyber detective. The other is Jerrold M. Post, a psychiatrist at &lt;st1:placename st="on"&gt;George&lt;/st1:placename&gt; &lt;st1:placename st="on"&gt;Washington&lt;/st1:placename&gt; &lt;st1:placetype st="on"&gt;University&lt;/st1:placetype&gt; in &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Washington&lt;/st1:city&gt;, &lt;st1:state st="on"&gt;D.C.&lt;/st1:state&gt;&lt;/st1:place&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;&lt;span style="font-family:Verdana;"&gt;Rogers&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:city&gt;&lt;span style="font-family:Verdana;"&gt; and Post have identified some basic behavioral trends for hackers who commit crimes. &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Rogers&lt;/st1:place&gt;&lt;/st1:city&gt; says one characteristic is that they tend to minimize or misconstrue the consequences of their activities, rationalizing that their behavior is really performing a service to society. (Some researchers call this the Robin Hood Syndrome). They may also tend to dehumanize and blame the victim sites they attack. Post says the same hackers share a sense of "ethical flexibility," which means that since human contact is minimized over the computer, hacking becomes like a game where the serious consequences can be easily ignored.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;&lt;o:p&gt;&lt;span style="TEXT-DECORATION: none"&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;span style="font-family:Verdana;font-size:16;"&gt;&lt;strong&gt;Not all hackers are criminals.&lt;o:p&gt;&lt;/o:p&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;1. Old School Hackers&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;: These are your 1960s style computer programmers from Stanford or MIT for whom the term hacking is a badge of honor. They're interested in lines of code and analyzing systems, but what they do is not related to criminal activity. They don't have a malicious intent, though they may have a lack of concern for privacy and proprietary information because they believe the Internet was designed to be an open system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;2. Script Kiddies, or Cyber-Punks&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;: Most commonly what the media calls "hackers." These are the kids, like Mafia Boy, who most frequently get caught by authorities because they brag online about their exploits. As an age group, they can be between 12 and 30 years old, they're predominantly white and male, and on average have a grade 12 education. Bored in school, very adept with computers and technology, they download scripts or hack into systems with the intent to vandalize or disrupt systems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="GramE"&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;3. Professional Criminals, or Crackers&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt; These guys make a living breaking into systems and selling the information. They might get hired for corporate or government espionage. They may also have ties to organized criminal groups.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;4. Coders and Virus Writers&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;: Not a lot of research has been done on these guys. They like to see themselves &lt;span class="GramE"&gt;as an&lt;/span&gt; elite. They have a lot of programming background and write code but won't use it themselves. They have their own networks to experiment with, which they call "Zoos." They leave it to others to introduce their codes into "The Wild," or the Internet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;Underlying the psyche of the criminal hacker may be a deep sense of inferiority.&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; Consequently, the mastery of computer technology, or the shut down of a major site, might give them a sense of power. "It's a population that takes refuge in computers because of their problems sustaining real world relationships," says Post. "Causing millions of dollars of damage is a real power trip."&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;font-size:16;"&gt;&lt;o:p&gt;&lt;span style="TEXT-DECORATION: none"&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Verdana;font-size:16;"&gt;&lt;strong&gt;&lt;u&gt;Hacker Hoax&lt;span style="mso-tab-count: 3"&gt; &lt;/span&gt;&lt;span style="mso-tab-count: 3"&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;/span&gt;Reality&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;o:p&gt;&lt;strong&gt;Jdbgmgr.exe Hoax (2002):&lt;/strong&gt; An email instructs users to delete the file "Jdbgmgr.exe" (teddy bear icon), because it is a destructive virus spread through MSN Messenger.&lt;br /&gt; The file is actually a vital system file for Windows.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WTC Survivor (2001):&lt;/strong&gt; An email advises users to delete any message with the subject line "WTC Survivor" or else a virus will delete their entire C: drive.&lt;br /&gt; This massive chain-letter hoax played on people's emotions following the Sept. 11, 2001, tragedy.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Kournikova (2001):&lt;/strong&gt; In February, an email with an attached JPEG image of tennis star Anna Kournikova propagates in cyberspace.&lt;br /&gt; The "JPEG" was a relatively harmless virus easily detected by anti-virus software. Thus, many companies were unwilling to admit whether it had affected their systems, resulting in a light sentence for the author of the virus.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Red Alert Virus(2000):&lt;/strong&gt; An email alert claims a deadly computer virus will destroy any computer that visits Microsoft's Web site using the Internet Explorer browser.&lt;br /&gt; Popular suspicion of Microsoft and its vulnerability to hackers contributed to the success of this hoax.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Good Times (1994):&lt;/strong&gt; An email alert warns users to avoid messages with "Good Times" in the subject line, as the attached virus will erase a computer's entire hard drive.&lt;br /&gt; Many corporate and academic email servers crashed throughout 1995 under the strain of this hoax chain letter. Frightened users forwarded the alert to "all," prompting others to hit the "Reply to All" button with questions or comments.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Michelangelo Virus (1992): In January, a major U.S. computer manufacturer announces it accidentally shipped 500 PCs carrying the "Michelangelo" virus. A media feeding frenzy implies the virus has spread to "millions" of computers.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;a href="http://www.blogger.com/" target="'ext'"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335939-113109465226779160?l=ahackaday.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ahackaday.blogspot.com/feeds/113109465226779160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335939&amp;postID=113109465226779160&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113109465226779160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113109465226779160'/><link rel='alternate' type='text/html' href='http://ahackaday.blogspot.com/2003/11/very-brief-history-of-hacking.html' title='Very Brief History of Hacking'/><author><name>bruenet</name><uri>http://www.blogger.com/profile/01644616483340492993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335939.post-113692000844962313</id><published>2003-06-13T10:06:00.000-08:00</published><updated>2006-01-25T09:25:06.066-09:00</updated><title type='text'>Lesson 2: Tools and Tricks of the Trade</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;[INDY.EXE] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;strong&gt;LOST IN THE DARK CODEWOODS&lt;/strong&gt;&lt;br /&gt;When you break into a program you end up in portions of code&lt;br /&gt;that are unfamiliar to you. It is also not uncommon for the&lt;br /&gt;breakpoints to occur outside of the confines of the program you&lt;br /&gt;want to crack. Getting your bearings is, in these cases, very&lt;br /&gt;important.&lt;br /&gt;&lt;br /&gt;One of the handiest utilities is the memory dump tool -it&lt;br /&gt;tells you where all the device drivers and TSR are loaded, in&lt;br /&gt;which memory locations the program you are cracking dwells, how&lt;br /&gt;much memory is left and what the next program load point is. The&lt;br /&gt;tools you use should report on the following:&lt;br /&gt;&lt;br /&gt;- the contents of interrupt vectors&lt;br /&gt;- the state of the BIOS data area, beginning at address 40:0&lt;br /&gt;- internal structures within DOS, such as the MCB chain, the&lt;br /&gt;SFT (System File Table) chain, the chain of installed&lt;br /&gt;device drivers, the PSPs and memory allocations associated&lt;br /&gt;with installed TSRs&lt;br /&gt;- memory allocation statistic from XMS and EMS drivers&lt;br /&gt;When seeking to understand a section of foreign code, you&lt;br /&gt;must be especially careful to seek the real intent of the code.&lt;br /&gt;&lt;br /&gt;Consider using a profiler prior to undertaking an analysis of an&lt;br /&gt;unfamiliar program. This will help you by ensuring that you don't&lt;br /&gt;waste time studying sections of the program that aren't even&lt;br /&gt;involved in the protection scheme you are chasing down.&lt;br /&gt;&lt;br /&gt;Using a utility that charts a program's calling hierarchy&lt;br /&gt;can give you an important perspective on how your babe conducts&lt;br /&gt;its internal operations.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;YOUR DEBUGGER: YOUR FAVOURITE TOOL&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;First and foremost, your debugger must be designed for use&lt;br /&gt;with resident modules (or must be itself a resident module).&lt;br /&gt;&lt;br /&gt;Trying to crack with simplistic [debug.com] is a sure way to get&lt;br /&gt;absolutely nowhere. We recommend Softice.exe from Nu-Mega&lt;br /&gt;technologies (Version 2.6 [S-Ice.exe] has been cracked by MARQUIS&lt;br /&gt;DE SOIREE and its vastly available on the Web). You could also&lt;br /&gt;use [Periscope] or [Codeview] or Borland's Turbodebugger... all&lt;br /&gt;these programs have been boldly cracked and/or distributed and&lt;br /&gt;are now on the Web for free... learn how to use YAHOO and find&lt;br /&gt;them. In emergency cases you could fix some quick crack using&lt;br /&gt;[debug] or [symdeb], but, as said above, most of the time these&lt;br /&gt;older debuggers won't do. I'll nevertheless ALWAYS give the final&lt;br /&gt;crack procedure for [debug.com], in order to permit even lusers&lt;br /&gt;to crack programs.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;When you first smell a protection,&lt;/strong&gt; it can be tempting to&lt;br /&gt;immediately begin your crack using invasive types of techniques.&lt;br /&gt;While there is certainly nothing wrong with this approach,&lt;br /&gt;provided that you are fairly familiar with the protection scheme&lt;br /&gt;used, going in too deep too soon can be a problem when you don't&lt;br /&gt;have a strong hunch. Most of the time you'll end up missing&lt;br /&gt;important details. So first of all sit down and ponder... that's&lt;br /&gt;the zen-way, the only one that really works.&lt;br /&gt;&lt;br /&gt;Single-stepping is expensive, not only because of the time&lt;br /&gt;it requires but also because of the amount of detail with which&lt;br /&gt;you must contend. Your immediate goal is to home in on the&lt;br /&gt;protection scheme through a series of successively refined traps,&lt;br /&gt;your broader aim is to get an overview idea of the program's&lt;br /&gt;action... the wise use of breakpoints will condense these&lt;br /&gt;minutiae into an understandable form.&lt;br /&gt;&lt;br /&gt;The first step is to try to identify the section of the&lt;br /&gt;program where the protection scheme is snapping.&lt;br /&gt;Once you are able to isolate a certain section of a program,&lt;br /&gt;breakpoints can be used to gather a trace history of the&lt;br /&gt;program's execution. If your debugger sports a backtrace buffer,&lt;br /&gt;logging window, or similar feature, by all means learn how to use&lt;br /&gt;it. The debugger it's your best weapon, you must know all the&lt;br /&gt;possibilities it offers and all the capabilities it possesses.&lt;br /&gt;&lt;br /&gt;Having a debugger's display output echoed to a printer is another&lt;br /&gt;possibility.&lt;br /&gt;&lt;br /&gt;Using breakpoints is beneficial for two basic reasons: speed&lt;br /&gt;and reduction of detail. Manual single-stepping is invaluable&lt;br /&gt;when you are close to the protection scheme, but too much of it&lt;br /&gt;will bore you to death.&lt;br /&gt;&lt;br /&gt;When selecting breakpoint locations and the types of&lt;br /&gt;breakpoint to use, it is important to step back once more, drink&lt;br /&gt;a cool Martini-Wodka (use only Moskovskaja: non-russian Wodkas&lt;br /&gt;are appalling) and ask yourself: "What is this going to tell me?"&lt;br /&gt;and "What else will I need to know once the break occurs?". MOST&lt;br /&gt;IMPORTANT OF ALL: "Is my current cracking approach the simplest&lt;br /&gt;and most direct?", coz you do not want to waste precious cracking&lt;br /&gt;time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;When devising a set of breakpoints it is wise to consider&lt;/strong&gt;&lt;br /&gt;how "a trail of bread crumbs" can be left. Not allowing for an&lt;br /&gt;execution chronicle from the start can mean having to restart a&lt;br /&gt;cracking session.&lt;br /&gt;&lt;br /&gt;Setting breakpoints on certain software interrupt calls is&lt;br /&gt;an excellent way to get an overview of a program's operations.&lt;br /&gt;The INT_21 DOS services interrupt is probably the most universal&lt;br /&gt;useful of these, with BIOS interrupts such as the INT_13 (BIOS&lt;br /&gt;Disk services) and INT_16 (BIOS keyboard services) useful for&lt;br /&gt;specific cracking.&lt;br /&gt;&lt;br /&gt;When working with a debugger, evaluative breakpoints are&lt;br /&gt;usually your best shot. To avoid having to deal with a plethora&lt;br /&gt;of calls, you would want to have a debugger capable of being told&lt;br /&gt;to "break on any INT_21 call except where AH == 2C or AH == 0B".&lt;br /&gt;A real understanding of the working of a program is surely&lt;br /&gt;important, but don't overdo it!&lt;br /&gt;To reverse-engineer even a small program can involve many hours&lt;br /&gt;of analysis and documentation work. If you'll not be able to&lt;br /&gt;use the zen-cracking techniques described in this tutorial&lt;br /&gt;(sadly not everybody can) pace yourself and make sure your&lt;br /&gt;chair is comfortable: you'll be sitting for quite a spell.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Much of the work involved in reverse-engineering consist of&lt;br /&gt;chasing down tentacles.&lt;/strong&gt; In order to understand the operations of&lt;br /&gt;one function, you must understand what happens within each of the&lt;br /&gt;functions it calls- its child functions. To understand these&lt;br /&gt;child functions you must study their children; and so on down the&lt;br /&gt;calling hierarchy tree. Then there is the data. Tracing tentacles&lt;br /&gt;based on a program's calling hierarchy is a directed process.&lt;br /&gt;Each function you encounter is basically a list of other&lt;br /&gt;functions you must reckon with. When it comes to analyzing a&lt;br /&gt;function's interrelationship with the program's data structure,&lt;br /&gt;no such list is provided. You must have instinct, feeling and&lt;br /&gt;luck.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Data analysis requires more of a broad-based inquisition.&lt;/strong&gt;&lt;br /&gt;For each memory variable you are interested in, you must survey&lt;br /&gt;all functions to determine which ones read and write that&lt;br /&gt;variable. The use of memory conditional breakpoints and of a&lt;br /&gt;disassembler that builds a cross-reference table can make this&lt;br /&gt;task a lot easier. (Use Sourcer! It's a fairly good tool and&lt;br /&gt;version 4.08 of [sr.exe] has been long ago cracked and&lt;br /&gt;distributed on the Web).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ALL SYSTEM CALLS IN ONE LOCATION&lt;/strong&gt;&lt;br /&gt;Remember that if the program you are cracking was written&lt;br /&gt;in assembler in the first place (very unlikely knowing the&lt;br /&gt;laziness of to_days programmers), system calls are probably made&lt;br /&gt;directly from the functions which need them. But when a program&lt;br /&gt;is developed in a high-level language, it is more likely that&lt;br /&gt;common library functions will be used for many operations&lt;br /&gt;involving system calls. When a program makes all of its INT_21&lt;br /&gt;calls from the same location, you know that this is certainly the&lt;br /&gt;case.&lt;br /&gt;&lt;br /&gt;Now, what happens sometimes is that the programmers write&lt;br /&gt;the whole application in a overbloated language like C++, but are&lt;br /&gt;afterwards compelled to "speed up" critical sections of the code&lt;br /&gt;writing them in assembler. And loo! A section where you&lt;br /&gt;repeatedly find assembler crafted patches is precisely the&lt;br /&gt;protection scheme! So you could have a program with all INT_21&lt;br /&gt;calls from the same location but for one or two calls which are&lt;br /&gt;coming out of the section where the morons have "hidden" their&lt;br /&gt;protection strategy. By just "looking" at the dead code of a&lt;br /&gt;program, you should be capable to tell wich parts have been&lt;br /&gt;"added on" in a later phase. They presents themselves as&lt;br /&gt;unevenness and irregularities, especially if you use an utility&lt;br /&gt;that represents graphicallly the code of a program. Protections&lt;br /&gt;are often added on at the end of the development.&lt;br /&gt;&lt;br /&gt;Should you determine that the system calls relevant to your&lt;br /&gt;cracking are made from common library functions, all is not lost.&lt;br /&gt;The specific function from which these library calls were made,&lt;br /&gt;the function you are seeking to locate, is executing at some&lt;br /&gt;point in between these calls. Break in with your debugger at the&lt;br /&gt;end of the first system call, just where it is returning to the&lt;br /&gt;point of call. From there, trace through the remainder of the&lt;br /&gt;common library routine until it returns to its caller. In short&lt;br /&gt;order, you should find yourself in the function you need to see.&lt;br /&gt;The trick is to be able to identify it for what it is.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ASCIIZ IN CODE&lt;br /&gt;&lt;/strong&gt;In the interest of gaining an overall familiarity with the&lt;br /&gt;program you want to crack, it can be enlightening to use a hex&lt;br /&gt;dump utility to examine the message strings contained within the&lt;br /&gt;program's binary modules. If the program happens to load its&lt;br /&gt;message strings from separate files, your search has just been&lt;br /&gt;simplified.&lt;br /&gt;&lt;br /&gt;Your debugger's memory-dumping feature is one tool that can&lt;br /&gt;be useful for this type of exploration. You could also construct&lt;br /&gt;a filtering program, which would read a binary file and output&lt;br /&gt;all sequences of bytes that are comprised of displayable&lt;br /&gt;characters and are over a certain minimum length (the best&lt;br /&gt;cracker tools are often the ones you write yourself).&lt;br /&gt;&lt;br /&gt;When a protection scheme is marked by the issuance of a&lt;br /&gt;specific message on the screen, you could go into the program and&lt;br /&gt;locate the code that emits this message, and then determine what&lt;br /&gt;triggers it. A good way to start the location process is to see&lt;br /&gt;if a system call is used to display the string. Interrupt INT_21,&lt;br /&gt;INT_10 or INT_29 are usually used to display text messages to the&lt;br /&gt;console.&lt;br /&gt;&lt;br /&gt;When the message's display is not a result of one of these&lt;br /&gt;system calls, direct video writing is probably being used. If you&lt;br /&gt;know the screen location used, and if that part of video memory&lt;br /&gt;is not used for anything else at the time (a big if), a memory&lt;br /&gt;write breakpoint could be set on the video buffer address&lt;br /&gt;corresponding to the first character's position. If this won't&lt;br /&gt;work, use the step-over/step-around tracing technique while&lt;br /&gt;watching for the message to appear.&lt;br /&gt;&lt;br /&gt;Now you found it: from a disassembled listing, you locate&lt;br /&gt;the address of the message string and then survey the reminder&lt;br /&gt;of the file for any instructions that reference this address.&lt;br /&gt;[Sourcer] can generate labels for specific memory locations and&lt;br /&gt;a cross-reference table showing where these labelled locations&lt;br /&gt;are referenced. Otherwise, load the disassembled listing file&lt;br /&gt;into your editor and use its search capabilities. Manually&lt;br /&gt;searching for such things in a listing will make you old before&lt;br /&gt;your time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CODE AND DATA&lt;/strong&gt;&lt;br /&gt;When stepping through code at the assembler level, watch out&lt;br /&gt;for interrupt calls that are followed by data. Sometimes you will&lt;br /&gt;find an interrupt call, typically within the range INT_34 to&lt;br /&gt;INT_3F, where several bytes immediately following the interrupt&lt;br /&gt;instruction will be data rather than code.&lt;br /&gt;&lt;br /&gt;Be especially suspicious of this type of code-and-data&lt;br /&gt;mixture when your debugger's disassembly output of the&lt;br /&gt;instructions immediately following an interrupt call doesn't make&lt;br /&gt;sense. Sometimes you can determine the offset of the next true&lt;br /&gt;instruction by inspecting the following code and data. In other&lt;br /&gt;cases, you will have to trace through the interrupt call to see&lt;br /&gt;how it accesses the data following the interrupt call instruction&lt;br /&gt;and how it manipulates the return address on the stack.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HOOKED VECTORS&lt;/strong&gt;&lt;br /&gt;Seeing what interrupt intercepts already exist within a&lt;br /&gt;system before running the program you want to crack, as well as&lt;br /&gt;what interrupt handlers are established by the target program,&lt;br /&gt;can provide useful clues. For example, if a protection&lt;br /&gt;establishes an INT_09 intercept just before the snapping of a&lt;br /&gt;keyboard verification routine, your range of suspects has just&lt;br /&gt;been narrowed significantly.&lt;br /&gt;&lt;br /&gt;To study the interrupt vector activities of an application,&lt;br /&gt;a vector dump map utility is useless. It can't be run while&lt;br /&gt;running the application you want to crack. One solution is to run&lt;br /&gt;the program under a debugger and watch for system calls to INT_21&lt;br /&gt;functions 25h (set interrupt vector) and 35h (get interrupt&lt;br /&gt;vector), but in the event that the program reads and writes&lt;br /&gt;interrupt vectors directly, this method will not give you a&lt;br /&gt;complete picture. Normally you'll use a spy, trace or "step"&lt;br /&gt;utility.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;APPLYING A MEMORY WRITE BREAKPOINT TO A SPECIFIC VECTOR OR&lt;br /&gt;TO THE ENTIRE TABLE&lt;/strong&gt; is another way to deal with this.&lt;br /&gt;&lt;br /&gt;Note that some sort of direct vector writing must be&lt;br /&gt;occurring if a vector change is detected between system calls.&lt;br /&gt;If a vector change is detected during a system call but it&lt;br /&gt;isn't function 25h of INT_21, suspect that an IRQ handler may be&lt;br /&gt;effecting the change.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LITTLE TRICKS OF THE TRADE:&lt;br /&gt;&lt;/strong&gt;* &lt;em&gt;determining interrupt vector addresses&lt;/em&gt; ****************&lt;br /&gt;How do you determine the interrupt vector addresses? As&lt;br /&gt;example let's find the address of the INT_21 interrupt vector.&lt;br /&gt;Since the interrupt vector table starts at address 0000:0000&lt;br /&gt;(easy to remember, isn't it?) and there are four bytes per&lt;br /&gt;vector, the basic process is to multiply the interrupt number&lt;br /&gt;four times and use the result at the offset (on segment zero).&lt;br /&gt;21h + 21h = 42h 42h + 42h = 84h&lt;br /&gt;The int_21 vector is located at address 0000:0084&lt;br /&gt;You could also use a calculator, for instance, the address of&lt;br /&gt;INT_63 is 63h*4=18ch -&gt; 0000:018C&lt;br /&gt;&lt;br /&gt;* address conversion *******************************&lt;br /&gt;After a painstaking cracking session, you have finally&lt;br /&gt;determined that a byte of memory at address 6049:891C is the&lt;br /&gt;trigger. But when you isolate the offending instruction, you find&lt;br /&gt;that the address it is generating when the protection occur is&lt;br /&gt;different, being 6109:7D1C instead! How can this be?&lt;br /&gt;An 80x86 type CPU, when running in real or VM86 mode, uses&lt;br /&gt;what is known as segment:offset type addressing. One side effect&lt;br /&gt;of this addressing method is that one physical address can be&lt;br /&gt;equivalent to many different segment:offset addresses.&lt;br /&gt;To find the PHYSICAL ADDRESS for a given segment:offset do&lt;br /&gt;the following:&lt;br /&gt;&lt;br /&gt;- convert the segment portion of the address to a 1-based number&lt;br /&gt;by multiplying it by 16 (x10)... it's easy: add 0 at the right&lt;br /&gt;end of the number!...&lt;br /&gt;6049 -&gt; 60490&lt;br /&gt;6109 -&gt; 61090&lt;br /&gt;now all you have to do is to add this value to the offset value&lt;br /&gt;60490+891C -&gt; 68DAC&lt;br /&gt;61090+7D1C -&gt; 68DAC &lt;- Got it? And the other way round? If you have a physical address, say 19AC3, and you want to obtain a segment:offset address you must first of all decide in which segment you want the address... if, say, you choose segment 16CC, you proceed as follows: 16CC -&gt; 16CC0&lt;br /&gt;19AC3-16CC0 = 2E03 (offset)&lt;br /&gt;address for 19AC3 in segment 16CC = 16CC:2E03&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;TOOLS OF THE TRADE&lt;br /&gt;&lt;/strong&gt;Before starting this section, for those of you that do not know&lt;br /&gt;anything, here is the ARCHIE way you get all the program that do&lt;br /&gt;EXIST on the planet: e-mail following&lt;br /&gt;&lt;br /&gt;1) (address) archie@archie.univ-rennes1.fr&lt;br /&gt;I use this french archie, but you can get a worldwide list using&lt;br /&gt;the metacommand "servers"&lt;br /&gt;&lt;br /&gt;2) (text) set search sub &lt;- anywhere in string set maxhits 140 &lt;- (100-1000) set maxhitspm 15 &lt;- not just 1 file all over find stepdos &lt;- search e.g. this file Wait two hours, get your post and ftp the file you wanted (and YES!, you 'll find also EVERYTHING else for free on the Web). You could, instead of using archie, also learn how to use YAHOO. [MEMSCAN.EXE] One of the most fascinating tools that I have ever seen is a (very old) program: MEMSCAN.EXE. This program was originally written in 1988 by Scott A. Mebust, running in CGA. It's a "visual" utility: it enables you to see graphically the 1-meg of PC memory in 8 kbyte chunks. It's a powerful tool in order to locate quickly bit mapped graphics and other 'objects' in memory, like program data tables, stack areas, code areas, available RAM, etc. I used this great idea to create (in C) my own tools: a "dead_programs scanner" and an ameliorate version of Memscan itself. Looking at the VISUAL STRUCTURE of a program it's a great help when you'll crack higher levels. [TRACKMEM.COM] A very good tool by James W.Birdsall, tracks memory usage of programs (EMS, XMS, conventional). [SCANCODE.COM] "THE" scancode lister, by the code_masters from clockwork software. The must utility for crackers that do not learn all scancodes by heart. [MAP.EXE] Actually "MAP2", THE memory mapper from the code_masters at clockwork software. It's a very good tool and an interesting one too, coz you get it with the "Nigel" nag screens. They are not difficult to remove (a "passletter" protection scheme, you'll learn how to find and remove it from [Map.exe] in LESSON 3.2). [FILEDUMP.COM] [HEXDUMP.COM] [TDUMP.EXE] [DUMP.EXE] There are hundred of file dump utilities, coz file dumping is one of the first exercise they learn you at C-school. Hexdump.com is 558 bytes long, Tdump.exe 120.704, pick the one you like better or write your own (even better). Filedump.com, by Daniel M.O'Brien, 1046 bytes long, it's nice. [SPRAY.COM] That's a good crack utility indeed! This 1989 program by Daniel M.O'Brien gives you a "post-mortem" picture of your memory. You redirect it to &lt;myfile&gt;and study it at ease. It's&lt;br /&gt;difficult to say how many hours of cracking it did spare me (you&lt;br /&gt;should study the program, only 252 bytes long, and will have to&lt;br /&gt;modify it a bit, coz it's pretty primitive, in the original&lt;br /&gt;version, for instance, the redirection to the printer works only&lt;br /&gt;if there is NO SPACE between "spray" and "&gt;").&lt;br /&gt;&lt;br /&gt;[VEXE.EXE]&lt;br /&gt;&lt;br /&gt;A good EXE files analyzer, useful for windows programs too&lt;br /&gt;(see --&gt; LESSON 7). Some of its functions are present in&lt;br /&gt;TDUMP.EXE too. This 1991 program by S.Krupa it's sometimes very&lt;br /&gt;useful.&lt;br /&gt;&lt;br /&gt;[SNOOP UTILITIES --&gt; KGB.EXE INTMON.EXE INTRSPY.EXE etc...]&lt;br /&gt;[TRACE UTILITIES --&gt; TRACE.EXE STEPDOS.EXE etc...]&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A must to study the "calling hierarchy" of an unknown&lt;br /&gt;program.&lt;/strong&gt; KGB.EXE, a 1992 program by Petr Hor?k could easily be&lt;br /&gt;the best one, and comes with source code(!). I'll teach you how&lt;br /&gt;to crack without any of them (you do not need them if you zen-&lt;br /&gt;crack), but they can nevertheless be very useful in some&lt;br /&gt;situations. Stepdos.exe, by Mike Parker, is a excellent program:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;a pleasure to crack in order to use it for slightly different&lt;br /&gt;purposes :=)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;[SOURCERING UTILITIES]&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SR.EXE can be used for sourcering unknown programs. It's a&lt;br /&gt;fairly good sourcering tool. Version 4.08 has been cracked (it's&lt;br /&gt;a "ORIGINAL NUMBERCODE" protected program) and distributed on the&lt;br /&gt;Web, so you should easily find it. This said, you should NEVER&lt;br /&gt;use such a brute force approach, unless you are really desperate:&lt;br /&gt;I'll teach you how to crack without sourcering (you don't need&lt;br /&gt;to sourcer if you zen-crack).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;[HEXEDITORS]&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Every idiot has written at least one hexeditor, and you can find&lt;br /&gt;very bad tools everywhere (the SIMTEL collection, on the Web,&lt;br /&gt;lists at least 35 hexeditors). I suggest you write your own and&lt;br /&gt;contribute to the flood, or (better) get PSEDIT.EXE, a good 1990&lt;br /&gt;program by Gary C. Crider (Parity Solutions, 1903 Pavia Ct.&lt;br /&gt;Arlington, TX 76006... sometimes even americans can write good&lt;br /&gt;programs). If you do use it (as you should) disapt the nag screen&lt;br /&gt;as small exercise in cracking.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;[DEBUGGER]&lt;/strong&gt;&lt;br /&gt;Your best friend in cracking, your weapon, your hidecloak...&lt;br /&gt;I suggest [Softice.exe] from Nu-Mega technologies (Version 2.6&lt;br /&gt;has been cracked by MARQUIS DE SOIREE and its vastly available&lt;br /&gt;on the Web). You could also use [Periscope] or [Codeview] or&lt;br /&gt;Borland's Turbodebugger... all these programs have been boldly&lt;br /&gt;cracked and/or distributed and are now on the Web for free...&lt;br /&gt;learn how to use ARCHIE and YAHOO in order to find them. Your&lt;br /&gt;debugger is the only tool you 'll REALLY need, believe me. So&lt;br /&gt;choose your weapon wisely and learn how to use backtrace ranges&lt;br /&gt;and (FOREMOST!) breakpoint on user written qualifications&lt;br /&gt;routines. You 'll be able to crack almost EVERYTHING using these&lt;br /&gt;features in the right way.&lt;br /&gt;&lt;br /&gt;You should get all the programs mentioned above (all the&lt;br /&gt;programs that EXIST for that matter) for free on the Web. Use&lt;br /&gt;them, but also modify them recklessly!&lt;br /&gt;REMEMBER THAT YOU ARE (GOING TO BE) A CRACKER!&lt;br /&gt;The first programs you should crack and modify are therefore&lt;br /&gt;your very tools!&lt;br /&gt;So steal the code of the best tools you find!&lt;br /&gt;Snatch the best routines and change them for&lt;br /&gt;the better! That's the whole point in cracking: a mission to&lt;br /&gt;IMPROVE the best accomplishments of humanity's genius :=)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HOW TO CRACK, ZEN-CRACKING&lt;br /&gt;&lt;/strong&gt;You 'll learn, beginning with next lesson, how to crack&lt;br /&gt;systematically the different protection schemes: paper &amp; password&lt;br /&gt;protections, time protections, access protections. At the end of&lt;br /&gt;the "methodolocical" part, you'll be able to deprotect programs,&lt;br /&gt;but you still wont be a cracker. In order to crack higher you&lt;br /&gt;must use what I call (lacking a better definition) "zen-&lt;br /&gt;cracking". I 'll give you right now an example of this, so that&lt;br /&gt;you know what I'm talking about, but -unless you are already&lt;br /&gt;capable- you'll have to finish this tutorial part for "normal"&lt;br /&gt;cracking before attempting this techniques. Let's zen-crack&lt;br /&gt;together a password protection scheme (aka "paper protection",&lt;br /&gt;coz you need the original manual of the program in order to&lt;br /&gt;answer). This protection is based on the typing, at the nag&lt;br /&gt;screen, of the correct sequence of numbers. Our example is a game&lt;br /&gt;for the reasons explained in lesson 1, but you 'll find the SAME&lt;br /&gt;protection scheme in the access protection procedure of some old&lt;br /&gt;Tapestry networks... so do not frown upon games protections.&lt;br /&gt;&lt;br /&gt;INDIANAPOLIS 500, Papyrus software &amp;amp; Electronic Arts, 1989&lt;br /&gt;It's a rather widespread program, you should therefore find it&lt;br /&gt;pretty easily. The nag screen asks for data based on the&lt;br /&gt;historical performances of race cars... that means that the&lt;br /&gt;answers will consist in two to three digits.&lt;br /&gt;&lt;br /&gt;Now, the normal way to crack such a program (described in&lt;br /&gt;-&gt; lesson 3.1) embodyes following steps:&lt;br /&gt;- snap save program memory areas before typing your answer&lt;br /&gt;- snap compare after typing, say, "666"&lt;br /&gt;- search for the sequence 36,36,36 (i.e. 666)&lt;br /&gt;- breakpoint on memory range for reading&lt;br /&gt;- look at the program part fetching your data&lt;br /&gt;- find the snap procedure&lt;br /&gt;- disable it.&lt;br /&gt;&lt;br /&gt;The above crack it's relatively quick and should be most of&lt;br /&gt;the time fairly effective, but there is a better way: the "zen&lt;br /&gt;way", the only one that can really enable you to crack high&lt;br /&gt;protection schemes.&lt;br /&gt;&lt;br /&gt;- Run the program and break in at the nag screen&lt;br /&gt;&lt;br /&gt;- Answer consist of 2-3 digits? Search for "AC" (i.e. the&lt;br /&gt;instruction LODSB, load digit of answer in AL) in the area 500&lt;br /&gt;bytes BEFORE and 500 bytes AFTER your position. You'll get some&lt;br /&gt;locations. (In the case of INDY 500 you get 6 such locations).&lt;br /&gt;&lt;br /&gt;- "feel" the locations (that's the tricky part).&lt;br /&gt;&lt;br /&gt;- OK, you already made it! Here is the protection strategy:&lt;br /&gt;8BBF28A5 MOV DI,[BX+A528]&lt;-- DI points to coded data area :compare_loop AC LODSB &lt;-- load first digit of answer in AL B4FF MOV AH,FF &lt;-- load mask in AH 2A25 SUB AH,[DI] &lt;-- sub coded data from mask and get real answer 47 INC DI &lt;-- ready to get next coded data 3AC4 CMP AL,AH &lt;-- user answer = real answer ? 751A JNZ beggar_off_coz_false_answer 0AC0 OR AL,AL &lt;-- more numbers? 75F2 JNZ compare_loop 59 POP CX &lt;-- all OK, go on, nice guy ... And if the protection scheme had been more far away? And if you cannot "feel" the right one? And if my grandma had wheels? You'll learn it, believe me. &lt;strong&gt;Now let's quickly crack this crap.&lt;/strong&gt;&lt;br /&gt;------------------------------------------------&lt;br /&gt;CRACKING INDY.EXE&lt;br /&gt;ren indy.exe indy.ded&lt;br /&gt;symdeb indy.ded&lt;br /&gt;- s (cs+0000):0 Lffff B4 FF 2A 25 47 3A C4 75 1A&lt;br /&gt;xxxx:yyyy &lt;-- this is the answer of the debugger - s (cs+1000):0 Lffff B4 FF 2A 25 47 3A C4 75 1A (nothing, but you must be sure there isn't a mirror) - e xxxx:yyyy+8 00 &lt;-- "JNZ 1A ahead" changes to "JNZ 0" - w - q ren indy.ded indy.exe ------------------------------------------------- Cracked: you just changed the JNZ beggar_off instruction in a JNZ go_ahead_anyway. Nice, isnt'it? &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335939-113692000844962313?l=ahackaday.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ahackaday.blogspot.com/feeds/113692000844962313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335939&amp;postID=113692000844962313&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113692000844962313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113692000844962313'/><link rel='alternate' type='text/html' href='http://ahackaday.blogspot.com/2003/06/lesson-2-tools-and-tricks-of-trade.html' title='Lesson 2: Tools and Tricks of the Trade'/><author><name>bruenet</name><uri>http://www.blogger.com/profile/01644616483340492993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17335939.post-113691498210622404</id><published>2003-01-06T08:43:00.000-09:00</published><updated>2006-01-25T09:27:21.423-09:00</updated><title type='text'>Lesson 1 - The best way to learn cracking</title><content type='html'>&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;The best way to learn cracking (i.e. understanding, broadly&lt;br /&gt;&lt;br /&gt;individuating, locating exactly and eliminating or suspending or&lt;br /&gt;&lt;br /&gt;deferring one or more protection schemes inside a software&lt;br /&gt;&lt;br /&gt;application you do not possess the source code of) is to begin&lt;br /&gt;&lt;br /&gt;your tampering experiments using OLDER applications which have&lt;br /&gt;&lt;br /&gt;OLDER protection schemes.&lt;br /&gt;&lt;br /&gt;In this way you 'll quickly grasp the base techniques of the&lt;br /&gt;&lt;br /&gt;trade. Do not forget that the evolution of the protection schemes&lt;br /&gt;&lt;br /&gt;has not been a one way road... strictly speaking it's not even&lt;br /&gt;&lt;br /&gt;an evolution: you'll eventually find some very clever new tricks,&lt;br /&gt;&lt;br /&gt;but most of the time you 'll unearth only various trite&lt;br /&gt;&lt;br /&gt;repetitions of past (and well known) tricks. This is no wonder:&lt;br /&gt;&lt;br /&gt;the REAL knowledge of the "commercial" programmers themselves&lt;br /&gt;&lt;br /&gt;(the "protectionists") is often very limited indeed: they are&lt;br /&gt;&lt;br /&gt;inclined to use the old methods (albeit somehow changed,&lt;br /&gt;&lt;br /&gt;sometimes even improved) instead of conceiving new methods. This&lt;br /&gt;&lt;br /&gt;typical "commercial" degeneration happens every time people act&lt;br /&gt;&lt;br /&gt;for money instead of doing things for the sake of it or for&lt;br /&gt;&lt;br /&gt;pleasure. This "commercial" trend is blindly encouraged by the&lt;br /&gt;&lt;br /&gt;stupid, money-oriented society we are coerced to live in.&lt;br /&gt;&lt;br /&gt;So I'll begin the "hands on" part (-&amp;gt; starting from lesson&lt;br /&gt;&lt;br /&gt;3), using as examples, some "old" applications and some "old"&lt;br /&gt;&lt;br /&gt;tricks. We'll be able to come later over to the newest protection&lt;br /&gt;&lt;br /&gt;schemes in order to understand them, and you 'll learn how to&lt;br /&gt;&lt;br /&gt;defeat this kind of junk too. I'll also explain WHERE you can&lt;br /&gt;&lt;br /&gt;find a lot of programs to crack for next to no money at all, and&lt;br /&gt;&lt;br /&gt;HOW 'grossomodo', you should proceed in your work.&lt;br /&gt;&lt;br /&gt;This tutorial is for people who are getting started with&lt;br /&gt;&lt;br /&gt;cracking. Maybe you are just contemplating doing some cracking,&lt;br /&gt;&lt;br /&gt;maybe you have tried it with mixed success. If you are here to&lt;br /&gt;&lt;br /&gt;get aimed in the right direction, to get off to a good start with&lt;br /&gt;&lt;br /&gt;the cracking tricks and procedures, then you have come for the&lt;br /&gt;&lt;br /&gt;right reason. I can't promise you'll get what you want, but I'll&lt;br /&gt;&lt;br /&gt;do my best. On the other hand, if you have already turned out&lt;br /&gt;&lt;br /&gt;some working cracking code in assembler and already cracked many&lt;br /&gt;&lt;br /&gt;different protection schemes, then this tutorial is likely to be&lt;br /&gt;&lt;br /&gt;on the elementary side for you. (If you want to review a few&lt;br /&gt;&lt;br /&gt;basics and have no where else pressing to go, then by all means&lt;br /&gt;&lt;br /&gt;stay).&lt;br /&gt;&lt;br /&gt;In order to crack successfully you need four basic things:&lt;br /&gt;&lt;br /&gt;* A passing knowledge of assembler language (the more you&lt;br /&gt;&lt;br /&gt;know, the better and quicker you crack)&lt;br /&gt;&lt;br /&gt;* Some intuition&lt;br /&gt;&lt;br /&gt;* Some help from more experienced cracker&lt;br /&gt;&lt;br /&gt;* A non mercantile mind (more about this later)&lt;br /&gt;&lt;br /&gt;The applications you'll use to learn with can be divided into:&lt;br /&gt;&lt;br /&gt;1 - Password crippled applications (the easiest to crack)&lt;br /&gt;&lt;br /&gt;2 - applications crippled on how many times, or how many&lt;br /&gt;&lt;br /&gt;days, you use them (fairly easy to crack)&lt;br /&gt;&lt;br /&gt;3 - applications crippled on which date you use them before&lt;br /&gt;&lt;br /&gt;(easy to crack)&lt;br /&gt;&lt;br /&gt;4 - applications that have some functions present but&lt;br /&gt;&lt;br /&gt;disabled (sometimes easy, sometimes difficult)&lt;br /&gt;&lt;br /&gt;5 - applications crippled on Disk access (protections schemes&lt;br /&gt;&lt;br /&gt;that are now defined as "obsolete") and applications&lt;br /&gt;&lt;br /&gt;crippled on CD-ROM presence (more or less the same methods, but&lt;br /&gt;&lt;br /&gt;-somehow- not defined as "obsolete") (very easy to crack)&lt;br /&gt;&lt;br /&gt;6 - CRYPTOGRAFED ADDS ON (i.e. one of the previous protection&lt;br /&gt;&lt;br /&gt;schemes, but with some scrambled or self modifying code&lt;br /&gt;&lt;br /&gt;(XORring and SHRLing codes)or peppered with "junk" instructions&lt;br /&gt;&lt;br /&gt;(fairly easy to crack)&lt;br /&gt;&lt;br /&gt;7 - None of the above (sometimes difficult to crack)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;WHERE TO GET THE STUFF&lt;br /&gt;&lt;br /&gt;The recent widespread appearance of "Demo"-CDROM on magazine&lt;br /&gt;&lt;br /&gt;covers is a treasure for all crackers! A short time after their&lt;br /&gt;&lt;br /&gt;release you 'll get all the copies that remain unsold for next&lt;br /&gt;&lt;br /&gt;to free. The demos on CD-ROMs will permit you to gather quickly&lt;br /&gt;&lt;br /&gt;a lot of applications -old and new- that have somehow been&lt;br /&gt;&lt;br /&gt;crippled (at times with interesting schemes). Truly a wonderful&lt;br /&gt;&lt;br /&gt;world of cracking possibilities! Gee! For next to no money you&lt;br /&gt;&lt;br /&gt;can secure on one CDROM the whole of LOTUS applications (or&lt;br /&gt;&lt;br /&gt;Microsoft or Wordperfect, or you name them) on "trial for 30&lt;br /&gt;&lt;br /&gt;days" or "try it 20 times" editions. You'll really enjoy to crack&lt;br /&gt;&lt;br /&gt;them, to use them for ever and ever and/or graciously donate them&lt;br /&gt;&lt;br /&gt;on the Web to the poor lamers that have no money and no brain.&lt;br /&gt;&lt;br /&gt;GAMES are definitely not to be frowned upon! They are&lt;br /&gt;&lt;br /&gt;very interesting from a cracker prospective coz they are often&lt;br /&gt;&lt;br /&gt;"overprotected". With this I mean that they possess protection&lt;br /&gt;&lt;br /&gt;schemes of a relatively HIGH level hidden inside files that are&lt;br /&gt;&lt;br /&gt;relatively small. Now, see, it is much more easy, and simple, to&lt;br /&gt;&lt;br /&gt;track down and eliminate protection schemes inside a single&lt;br /&gt;&lt;br /&gt;35.000 bytes long executable file than to locate them inside a&lt;br /&gt;&lt;br /&gt;collection of many lengthy DLLs and overlaids that could have&lt;br /&gt;&lt;br /&gt;swollen as long as 2.000.000 bytes each. The lazy bunch of&lt;br /&gt;&lt;br /&gt;"modern" programmers relies systematically for protection schemes&lt;br /&gt;&lt;br /&gt;on this "hide the sting in the wide desert" logic. As a matter&lt;br /&gt;&lt;br /&gt;of fact they are no longer able to program in assembler: they&lt;br /&gt;&lt;br /&gt;bank more and more on overbloated "fatty" atrocities like Visual&lt;br /&gt;&lt;br /&gt;Basic, Delphy or Visual C++. (Don't worry... I'll nevertheless&lt;br /&gt;&lt;br /&gt;teach you how to crack -and quickly- those huge applications&lt;br /&gt;&lt;br /&gt;too).&lt;br /&gt;&lt;br /&gt;There is another reason for employing games instead of&lt;br /&gt;&lt;br /&gt;applications as study material: often EXACTLY THE SAME protection&lt;br /&gt;&lt;br /&gt;schemes that you find in a simple (and short) shareware game will&lt;br /&gt;&lt;br /&gt;be used -without much improving- a little later in order to&lt;br /&gt;&lt;br /&gt;"protect" some huge and extremely expensive graphic application.&lt;br /&gt;&lt;br /&gt;For this reason in my tutorial we'll often crack games&lt;br /&gt;&lt;br /&gt;protection schemes, even if we'll later apply what we learn&lt;br /&gt;&lt;br /&gt;mainly in order to crack the protection schemes of commercial&lt;br /&gt;&lt;br /&gt;applications, or to crack the access protection routines to&lt;br /&gt;&lt;br /&gt;remote servers, or BBS, or even ATM (cash dispensers).&lt;br /&gt;&lt;br /&gt;Here follows an example cracking session, that will show you&lt;br /&gt;&lt;br /&gt;-I hope- the dos and donts of our art: let's crack together as&lt;br /&gt;&lt;br /&gt;introductory example a time crippled application. We'll learn&lt;br /&gt;&lt;br /&gt;later (-&amp;gt; LESSON 4) that all applications that are crippled on&lt;br /&gt;&lt;br /&gt;time (i.e. "how many times" you use them or "how long" you use&lt;br /&gt;&lt;br /&gt;them) rely on analogous protection schemes (albeit with a huge&lt;br /&gt;&lt;br /&gt;palette of small variations):&lt;br /&gt;&lt;br /&gt;1- they may have a counter which "clicks" every so often: FIND&lt;br /&gt;&lt;br /&gt;IT AND DISABLE IT!&lt;br /&gt;&lt;br /&gt;2- they may fetch the time_clock interrupts in your machine:&lt;br /&gt;&lt;br /&gt;INTERCEPT THEM YOURSELF!&lt;br /&gt;&lt;br /&gt;3- they may compare a random_seed with a variable: NOOP IT!&lt;br /&gt;&lt;br /&gt;4- they may check randomly the date of your other, unrelated,&lt;br /&gt;&lt;br /&gt;files on the hard disk: find this verification routine and&lt;br /&gt;&lt;br /&gt;INVERT the JUMPS!&lt;br /&gt;&lt;br /&gt;I wanted to start with a modern example of this "counter clicks"&lt;br /&gt;&lt;br /&gt;protection type, just to give you a feeling for cracking, and I&lt;br /&gt;&lt;br /&gt;have chosen a widely published demo: you should be able to find&lt;br /&gt;&lt;br /&gt;it pretty easily. In order to show you some of the problems you&lt;br /&gt;&lt;br /&gt;may encounter we'll crack this example "wrongly" (you'll learn&lt;br /&gt;&lt;br /&gt;how to crack effectively in the "HANDS ON" lessons).&lt;br /&gt;&lt;br /&gt;EXAMPLE: ARCADE POOL, Demonstration version, PC Conversion&lt;br /&gt;&lt;br /&gt;by East Point Software Ltd, (c) Team 17 Software Ltd 1994. This&lt;br /&gt;&lt;br /&gt;demo has been published by many magazines on their CDRom covers&lt;br /&gt;&lt;br /&gt;throughout 1995.&lt;br /&gt;&lt;br /&gt;What follows will be useful even if you do not have our&lt;br /&gt;&lt;br /&gt;example; nevertheless you should get a copy of this widespread&lt;br /&gt;&lt;br /&gt;demo in order to better grasp some of the following points.&lt;br /&gt;&lt;br /&gt;This nice demo of a billiard game is time-crippled. It is&lt;br /&gt;&lt;br /&gt;crippled on how long you use it: i.e., you can only play 2&lt;br /&gt;&lt;br /&gt;minutes, afterwards a "nag" reminder of where and how you can buy&lt;br /&gt;&lt;br /&gt;the real version snaps: protectionist squalor at its best.&lt;br /&gt;&lt;br /&gt;So, how do you proceed? Where does the beginning begin?&lt;br /&gt;&lt;br /&gt;Here is what you could (but not necessarily should) do:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get [Soft-ice] and load it in your config.sys. See the TOOLS&lt;br /&gt;&lt;br /&gt;OF THE TRADE lesson (-&amp;gt; LESSON 2) about this debugger. Version&lt;br /&gt;&lt;br /&gt;2.6 of [Soft-Ice] has been cracked by MARQUIS DE SOIREE and can&lt;br /&gt;&lt;br /&gt;be found on the Web for free.&lt;br /&gt;&lt;br /&gt;- vecs s (save all the vectors before loading the babe)&lt;br /&gt;&lt;br /&gt;- start [pooldemo.exe]&lt;br /&gt;&lt;br /&gt;- vecs c (vector compare, save a printing of all hooked&lt;br /&gt;&lt;br /&gt;vectors)&lt;br /&gt;&lt;br /&gt;- enter and leave Soft-ice a few times to understand what's&lt;br /&gt;&lt;br /&gt;going on and where in [pooldemo.exe] are we roaming around&lt;br /&gt;&lt;br /&gt;(you should always check MORE THAN ONCE your findings when&lt;br /&gt;&lt;br /&gt;you snoop around: nothing moves and confuses pointers in a&lt;br /&gt;&lt;br /&gt;more frenzied way than good old "inactive" DOS).&lt;br /&gt;&lt;br /&gt;- have a good look at the map of memory usage ("map")&lt;br /&gt;&lt;br /&gt;- now "snap_save" the main memory regions where&lt;br /&gt;&lt;br /&gt;[pooldemo.exe] dwells... snapping saves "photographs" of&lt;br /&gt;&lt;br /&gt;memory areas.&lt;br /&gt;&lt;br /&gt;- do not do anything, let just the seconds go by.&lt;br /&gt;&lt;br /&gt;- "snap_compare" every two or three seconds without moving&lt;br /&gt;&lt;br /&gt;anything at all on the game board (no mouse_clicking,&lt;br /&gt;&lt;br /&gt;NOTHING), so that the only changes are (hopefully) the&lt;br /&gt;&lt;br /&gt;changes caused by the time counters.&lt;br /&gt;&lt;br /&gt;- snap_compare twice in a second.&lt;br /&gt;&lt;br /&gt;- snap_compare at second 00:59 and at second 1:01.&lt;br /&gt;&lt;br /&gt;- snap_compare just before and just after the time limit and&lt;br /&gt;&lt;br /&gt;the snapping of the nag screen.&lt;br /&gt;&lt;br /&gt;- Now collect carefully your printed "snaps" data: write&lt;br /&gt;&lt;br /&gt;clearly on the various sheets the occurrences of the snaps.&lt;br /&gt;&lt;br /&gt;- now comes the graceful "zen-cracking" moment: Sit down with&lt;br /&gt;&lt;br /&gt;a dry Martini and Wodka (obviously only russian Wodka will&lt;br /&gt;&lt;br /&gt;do) and contemplate the printing of the various mutant&lt;br /&gt;&lt;br /&gt;locations. Feel, perceive, empathize! Look closely at the&lt;br /&gt;&lt;br /&gt;locations that have changed in the snap compares. Analyze,&lt;br /&gt;&lt;br /&gt;interpretate, evaluate.&lt;br /&gt;&lt;br /&gt;- Mmm! Hey! Something fishy is changing there, and there, and&lt;br /&gt;&lt;br /&gt;there! (you are lucky, few do actually change in this case:&lt;br /&gt;&lt;br /&gt;only two dozen)&lt;br /&gt;&lt;br /&gt;- breakpoint on execute at the location that you believe act&lt;br /&gt;&lt;br /&gt;as a "continuous" counter, i.e. the location that triggers&lt;br /&gt;&lt;br /&gt;the "a second went by" event when it zeroes.&lt;br /&gt;&lt;br /&gt;- Now set the occurrence counter of BPX in order to break at&lt;br /&gt;&lt;br /&gt;the moment where the location "refills" and restarts from&lt;br /&gt;&lt;br /&gt;the beginning (the equivalent of "one second" went by,&lt;br /&gt;&lt;br /&gt;let's start anew). Use the occurrence counter in order not&lt;br /&gt;&lt;br /&gt;to single-step through the program your life long!&lt;br /&gt;&lt;br /&gt;- IN THIS CASE you 'll quickly locate the refill at location&lt;br /&gt;&lt;br /&gt;3DD0. Here follows the "refill" line:&lt;br /&gt;&lt;br /&gt;xxxx:3DCC C706F1013C00 MOV WORD PTR [01F1], 003C&lt;br /&gt;&lt;br /&gt;The "3C" byte at xxxx:3DD0 represents a counter_byte... i.e. the&lt;br /&gt;&lt;br /&gt;program "charges" 3C in this location and then DECs it step by&lt;br /&gt;&lt;br /&gt;step to 3B, 3A, 39, 38 etc... till 0. When it reaches 0: bingo!&lt;br /&gt;&lt;br /&gt;Sucker user has lost one second more of his precious two minutes.&lt;br /&gt;&lt;br /&gt;Now, you would get a first wizard level if you searched&lt;br /&gt;&lt;br /&gt;further on for the exact point where you get the "nag screen" in&lt;br /&gt;&lt;br /&gt;order to eliminate the whole witless protection, but you may&lt;br /&gt;&lt;br /&gt;think you got it already and you remember anyway that the first&lt;br /&gt;&lt;br /&gt;principle in cracking is the following: "once you can eliminate&lt;br /&gt;&lt;br /&gt;the effects of a protection, do not look further!"&lt;br /&gt;&lt;br /&gt;Most of the time this is true: you do not always need to&lt;br /&gt;&lt;br /&gt;eliminate a "whole" protection scheme (unless you are just&lt;br /&gt;&lt;br /&gt;studying it for the joy of it). It's normally easier (and&lt;br /&gt;&lt;br /&gt;quicker) to eliminate the "effects" of a given protection scheme.&lt;br /&gt;&lt;br /&gt;Unfortunately this is not true in this case.&lt;br /&gt;&lt;br /&gt;Here you believe that you have already found the way: you&lt;br /&gt;&lt;br /&gt;got the counter that charges the reverse clock that triggers the&lt;br /&gt;&lt;br /&gt;particular protection scheme of [pooldemo.exe]. Now you may think&lt;br /&gt;&lt;br /&gt;that if you could modify the refill_value... say changing "3C"&lt;br /&gt;&lt;br /&gt;to "EE" (Yeah, the maximum would be FF... but it's always good&lt;br /&gt;&lt;br /&gt;practice to avoid such extreme values when cracking) you should&lt;br /&gt;&lt;br /&gt;get four times more playtime for your game... more than enough&lt;br /&gt;&lt;br /&gt;in order to make the protection scheme useless.&lt;br /&gt;&lt;br /&gt;So you change location xxxx:3DD0 from "3C" to "EE". To work&lt;br /&gt;&lt;br /&gt;on bytes you should use a good Hexeditor like PSEDIT (Parity&lt;br /&gt;&lt;br /&gt;solutions, [Psedit.exe], brilliant shareware: see the "tool of&lt;br /&gt;&lt;br /&gt;the trade" section) but you could also work with simpler&lt;br /&gt;&lt;br /&gt;debuggers like [debug] or [symdeb] (-&amp;gt; see lesson 2). If you do,&lt;br /&gt;&lt;br /&gt;remember to work on a "dead" copy of your crippled [*.exe] file,&lt;br /&gt;&lt;br /&gt;i.e.:&lt;br /&gt;&lt;br /&gt;ren POOLDEMO.EXE POOLDEMO.DED&lt;br /&gt;&lt;br /&gt;symdeb POOLDEMO.DED&lt;br /&gt;&lt;br /&gt;-s (cs+0000):0 Lffff C7 06 F1 01 3C &amp;lt;- this string&lt;br /&gt;&lt;br /&gt;corresponds to the&lt;br /&gt;&lt;br /&gt;refill line).&lt;br /&gt;&lt;br /&gt;cs:3E85 &amp;lt;- symdeb gives you two locations as answer&lt;br /&gt;&lt;br /&gt;cs:3EEA&lt;br /&gt;&lt;br /&gt;-e cs:3E85+4 EE &amp;lt;- refill changed from 3C to EE&lt;br /&gt;&lt;br /&gt;-w&lt;br /&gt;&lt;br /&gt;ren POOLDEMO.DED POOLDEMO.EXE&lt;br /&gt;&lt;br /&gt;Now you run your tampered pooldemo. You think you cracked it, you&lt;br /&gt;&lt;br /&gt;glee with satisfaction... but loo! Nothing at all has changed,&lt;br /&gt;&lt;br /&gt;everything's as lame as before, you still have only 2 minutes&lt;br /&gt;&lt;br /&gt;playtime. How disappointing: how comez it didn't work?&lt;br /&gt;&lt;br /&gt;Well, for a start you have not been attentive enough! The&lt;br /&gt;&lt;br /&gt;search in debug gave you TWO locations, you moron, and not just&lt;br /&gt;&lt;br /&gt;the one you just tampered with. Check and you 'll see that the&lt;br /&gt;&lt;br /&gt;second location (cs:3EEA) is a MIRROR/CONTROL location (more on&lt;br /&gt;&lt;br /&gt;this later). Some times there exist "double" locations... coz at&lt;br /&gt;&lt;br /&gt;times it's quicker to use a double routine than to use a&lt;br /&gt;&lt;br /&gt;branching if or switch structure... some times the second&lt;br /&gt;&lt;br /&gt;locations do mirror the first ones and correct them on the fly&lt;br /&gt;&lt;br /&gt;if need be.&lt;br /&gt;&lt;br /&gt;So you need to modify this too... you act as said above but&lt;br /&gt;&lt;br /&gt;this time you enter in debug a&lt;br /&gt;&lt;br /&gt;-e cs:3EEA+4 EE&lt;br /&gt;&lt;br /&gt;before writing back the dead file and then renaming it to exe and&lt;br /&gt;&lt;br /&gt;then running it... and loo! Hoow sloow! THERE YOU ARE! Your&lt;br /&gt;&lt;br /&gt;crippled POOLDEMO.EXE is now (sort of) unprotected: You think&lt;br /&gt;&lt;br /&gt;that you can now play the stupid game up to 12 minutes real time,&lt;br /&gt;&lt;br /&gt;even if the protection scheme (and the counter) "believes" that&lt;br /&gt;&lt;br /&gt;it is playing only two minutes.&lt;br /&gt;&lt;br /&gt;So you begin to play, and the seconds look veeery sloow, and&lt;br /&gt;&lt;br /&gt;everything seems OK, but -alas- NO! At screen second 28 you get&lt;br /&gt;&lt;br /&gt;the irritating "two minutes are over" nag screen! Obviously you&lt;br /&gt;&lt;br /&gt;were dead wrong: the program "knows" the time directly from the&lt;br /&gt;&lt;br /&gt;timer... you only modified the stupid counter ON THE SCREEN.&lt;br /&gt;&lt;br /&gt;So it's back to cracking, and now you are angry, and forget&lt;br /&gt;&lt;br /&gt;the quiet ways of the zen-analyze and begin the heavy cracking&lt;br /&gt;&lt;br /&gt;you should reserve -if ever- for really complicated schemes. You&lt;br /&gt;&lt;br /&gt;now start to check the hooked vectors (you did your routinely&lt;br /&gt;&lt;br /&gt;VECS_save before loading pooldemo in [Soft-ice] and your&lt;br /&gt;&lt;br /&gt;VECS_compare afterwards) and you see some findings that you&lt;br /&gt;&lt;br /&gt;believe interesting:&lt;br /&gt;&lt;br /&gt;vecs c&lt;br /&gt;&lt;br /&gt;08 1EFD:84C6 0CD1:17AC &amp;lt;- the clock&lt;br /&gt;&lt;br /&gt;09 1EFD:85EC 136A:069C &amp;lt;- the keyboard&lt;br /&gt;&lt;br /&gt;22 0BCE:02B1 0BCE:017E &amp;lt;- the terminate&lt;br /&gt;&lt;br /&gt;That's more like it -you think. Smack at the beginning: the&lt;br /&gt;&lt;br /&gt;first hooked vector does it! It's good old interrupt_08: the&lt;br /&gt;&lt;br /&gt;timer_clicker!&lt;br /&gt;&lt;br /&gt;Some basics for those of you that do not know anything:&lt;br /&gt;&lt;br /&gt;INT_08 controls indirectly the INT_1C timer interrupt. The 8253&lt;br /&gt;&lt;br /&gt;clock chip generates an IRQ_0 hardware interrupt at a rate of&lt;br /&gt;&lt;br /&gt;18.2 interrupts per second. This gives control to the ISR&lt;br /&gt;&lt;br /&gt;(Interrupt Service Routine) that the INT_08 points to... and this&lt;br /&gt;&lt;br /&gt;should be at 0CD1:17AC, but has been hooked here, by pooldemo,&lt;br /&gt;&lt;br /&gt;to 1EFD:84C6.&lt;br /&gt;&lt;br /&gt;One of the actions taken by the INT_08 ISR within the BIOS&lt;br /&gt;&lt;br /&gt;is to issue a software interrupt call to INT_1C, just in case any&lt;br /&gt;&lt;br /&gt;software modules within the system have established an intercept.&lt;br /&gt;&lt;br /&gt;If no intercepts have been established, the default contents of&lt;br /&gt;&lt;br /&gt;the INT_1C vector point to an iret instruction within the BIOS,&lt;br /&gt;&lt;br /&gt;so that a null action results.&lt;br /&gt;&lt;br /&gt;Normally a protectionist would intercept INT_1C, coz at&lt;br /&gt;&lt;br /&gt;every ISR from INT_08 the CPU would fetch the contents of the&lt;br /&gt;&lt;br /&gt;corresponding interrupt vector and make an interrupt style call&lt;br /&gt;&lt;br /&gt;to the code at that address (which should contain the iret at&lt;br /&gt;&lt;br /&gt;address F000:9876 but can contain any trick they could think of).&lt;br /&gt;&lt;br /&gt;So -you think- the protectionist hooked here INT_08 directly&lt;br /&gt;&lt;br /&gt;(a pretty infrequently used protection scheme by the way): What&lt;br /&gt;&lt;br /&gt;now?&lt;br /&gt;&lt;br /&gt;A rather drastic measure would be, in such circumstances,&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;disable the IRQ_0 level timer interrupt, which is controlled by&lt;br /&gt;&lt;br /&gt;bit 0 of the mask register, at address I/O 0021h. When bit 0&lt;br /&gt;&lt;br /&gt;within the mask register is set to 1, no further interrupts will&lt;br /&gt;&lt;br /&gt;be recognized for this IRQ level. This unfortunately won't work&lt;br /&gt;&lt;br /&gt;here, but it's an interesting technique per se, so you better&lt;br /&gt;&lt;br /&gt;learn it anyway, just in case you should need it elsewhere:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--- Trick to disable the timer ("IRQ_0 masking" by +ORC) ---&lt;br /&gt;&lt;br /&gt;* prompt $t and hit ENTER a few times, see how the dos_clock&lt;br /&gt;&lt;br /&gt;is merrily ticking along?&lt;br /&gt;&lt;br /&gt;* enter DEBUG.COM&lt;br /&gt;&lt;br /&gt;* Assemble using the command 'a'&lt;br /&gt;&lt;br /&gt;- a&lt;br /&gt;&lt;br /&gt;in al,21&lt;br /&gt;&lt;br /&gt;or al,1&lt;br /&gt;&lt;br /&gt;out 21,al&lt;br /&gt;&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;RETURN&lt;br /&gt;&lt;br /&gt;RETURN &amp;lt;- twice to exit immediate assembler&lt;br /&gt;&lt;br /&gt;- g 100 &amp;lt;- to run the tiny program.&lt;br /&gt;&lt;br /&gt;- q &amp;lt;- to quit debug.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;prompt $t is still on: hit ENTER a few times:&lt;br /&gt;&lt;br /&gt;whoa! The clock has stopped advancing!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Compliments: you loaded the current mask register's contents&lt;br /&gt;&lt;br /&gt;into AL, you set the mask bit in the bit 0 position (which&lt;br /&gt;&lt;br /&gt;corresponds to IRQ_0) at then updated the value back to the mask&lt;br /&gt;&lt;br /&gt;register.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you are ready to activate IRQ_0 events again, reenter DEBUG,&lt;br /&gt;&lt;br /&gt;run the following and then reset the clock you stopped with DOS&lt;br /&gt;&lt;br /&gt;TIME command:&lt;br /&gt;&lt;br /&gt;- a&lt;br /&gt;&lt;br /&gt;in al,21&lt;br /&gt;&lt;br /&gt;and al,fe&lt;br /&gt;&lt;br /&gt;out 21,al&lt;br /&gt;&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;RETURN twice&lt;br /&gt;&lt;br /&gt;- g 100&lt;br /&gt;&lt;br /&gt;- q&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A word of caution: with the timer click disabled some processes&lt;br /&gt;&lt;br /&gt;will not operate correctly: once you access the diskette drive,&lt;br /&gt;&lt;br /&gt;the motor will continue to run indefinitely afterwards, etcetera.&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately the above technique cannot work with our&lt;br /&gt;&lt;br /&gt;[pooldemo.exe], where you now are looking closely to the INT_08&lt;br /&gt;&lt;br /&gt;hook you found, believing that it hides the protection scheme:&lt;br /&gt;&lt;br /&gt;herein you find immediately the EoI (End_of_interrupt: MOV&lt;br /&gt;&lt;br /&gt;AL,20h... OUT 20h,AL). Both controllers have a second port&lt;br /&gt;&lt;br /&gt;address at 20h (or 0a0h), from which the instructions are given.&lt;br /&gt;&lt;br /&gt;The most important is the EoI command (20h). This instruction&lt;br /&gt;&lt;br /&gt;indicates the end of the interrupt handler and frees up the&lt;br /&gt;&lt;br /&gt;corresponding controller for the next interrupt. If somebody&lt;br /&gt;&lt;br /&gt;writes a new custom interrupt handler (as many protectionists&lt;br /&gt;&lt;br /&gt;do), it's up to him to see to it that at the end of the handler&lt;br /&gt;&lt;br /&gt;the EoI command (20h) is written to either port 20h or port 0a0h.&lt;br /&gt;&lt;br /&gt;After the EoI follow the usual pushes, then some CALLS then&lt;br /&gt;&lt;br /&gt;a call that issues some OUT 40,AL that look like timer refreshing&lt;br /&gt;&lt;br /&gt;(OUT transfers data to an output port and ports 40-42 correspond&lt;br /&gt;&lt;br /&gt;to the Timer/counter). Some do_maintenance follows, then a double&lt;br /&gt;&lt;br /&gt;CALL, one more conditional CALL and then a "mysterious" call FAR&lt;br /&gt;&lt;br /&gt;CS:[AA91] on which depends a byte PTR[970C] that decides another&lt;br /&gt;&lt;br /&gt;final CALL... then the routine pops all registers and irets away.&lt;br /&gt;&lt;br /&gt;Ah! You say, and begin disassembling, reverse engineering&lt;br /&gt;&lt;br /&gt;and looking inside each suspect call (the quicker method in&lt;br /&gt;&lt;br /&gt;these cases is to breakpoint calls on entrance and see if you&lt;br /&gt;&lt;br /&gt;find the one that's only called at the awakening of the time&lt;br /&gt;&lt;br /&gt;limit protection).&lt;br /&gt;&lt;br /&gt;You work, and work, and work... and eventually find nothing&lt;br /&gt;&lt;br /&gt;at all, coz the protection of this program is NOT HERE!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Back to the zen-analyze of the snap printings... we forsake&lt;br /&gt;&lt;br /&gt;it too soon, as you will see.&lt;br /&gt;&lt;br /&gt;If you watch with more attention the compare locations for&lt;br /&gt;&lt;br /&gt;the range DS:0 DS:FFFF you 'll notice that one of them changes&lt;br /&gt;&lt;br /&gt;relatively slowly from 0 to 1 to 2 to 3 and so on... the&lt;br /&gt;&lt;br /&gt;precedent location changes very quickly, and runs the complete&lt;br /&gt;&lt;br /&gt;cycle 0...FF. That's a counter, at locations DS:0009 and DS:000A!&lt;br /&gt;&lt;br /&gt;How long will it tick along? Well, we saw above that the "charge"&lt;br /&gt;&lt;br /&gt;every second is 3C, so it will be x3C*x78=x1C20, coz x78 is 120&lt;br /&gt;&lt;br /&gt;seconds, i.e. the two minutes time limit.&lt;br /&gt;&lt;br /&gt;Now search this 1C20 value around inside the code&lt;br /&gt;&lt;br /&gt;(protections are most of the time at the beginning of the&lt;br /&gt;&lt;br /&gt;CS:offset section), and you 'll find quickly what follows:&lt;br /&gt;&lt;br /&gt;The protection in [pooldemo.exe] is at code_locations&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CS:0A8A 813E20A7201C CMP WORD PTR [A720], 1C20&lt;br /&gt;&lt;br /&gt;compare location A720 with limit 1C20&lt;br /&gt;&lt;br /&gt;CS:0A90 7C07 JL okay_play_a_little_more&lt;br /&gt;&lt;br /&gt;CS:0A92 E834FD CALL beggar_off_time_is_up&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BINGO!: FOUND!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now let's quickly crack it:&lt;br /&gt;&lt;br /&gt;------------------------------------------------&lt;br /&gt;&lt;br /&gt;CRACKING POOLDEMO.EXE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ren pooldemo.exe pooldemo.ded&lt;br /&gt;&lt;br /&gt;symdeb pooldemo.ded&lt;br /&gt;&lt;br /&gt;- s cs:0 Lffff 81 3E 20 A7 20 1C&lt;br /&gt;&lt;br /&gt;xxxx:yyyy &amp;lt;- this is the answer of the debugger&lt;br /&gt;&lt;br /&gt;- e xxxx:yyyy+5 4C &amp;lt;- this time limit is much better&lt;br /&gt;&lt;br /&gt;- w&lt;br /&gt;&lt;br /&gt;- q&lt;br /&gt;&lt;br /&gt;ren pooldemo.ded pooldemo.exe&lt;br /&gt;&lt;br /&gt;-------------------------------------------------&lt;br /&gt;&lt;br /&gt;We have done here a "weak" crack: we limited ourselves to&lt;br /&gt;&lt;br /&gt;accept a (better) time limit, changing it from 1C20 to 4C20 (4&lt;br /&gt;&lt;br /&gt;minutes instead of two). We could obviously have done a more&lt;br /&gt;&lt;br /&gt;radical crack if we had changed the JL (jump lower) instruction&lt;br /&gt;&lt;br /&gt;in a JMP (jump anyway) instruction. In this case it would have&lt;br /&gt;&lt;br /&gt;worked, but for reasons that will be explained in lesson 4, you&lt;br /&gt;&lt;br /&gt;should choose a rather delicate approach in cracking when you&lt;br /&gt;&lt;br /&gt;deal with time-limit protection schemes.&lt;br /&gt;&lt;br /&gt;As you have seen, in this artificial cracking session we&lt;br /&gt;&lt;br /&gt;found the protection scheme after a little snooping around. But,&lt;br /&gt;&lt;br /&gt;as you will see in the hands on part, there are always MANY ways&lt;br /&gt;&lt;br /&gt;to crack a single protection scheme. You could -for instance-&lt;br /&gt;&lt;br /&gt;have found this protection the other way round: set a trace on&lt;br /&gt;&lt;br /&gt;memory range for the program, restricting the trace to the first&lt;br /&gt;&lt;br /&gt;part of it (say CS:0 to CS:1000, if you do not fetch anything you&lt;br /&gt;&lt;br /&gt;can always try the other blocks). Breakpoint at the nag screen,&lt;br /&gt;&lt;br /&gt;have a look at the last 300-400 backtraced instructions, if you&lt;br /&gt;&lt;br /&gt;did not move anything, everything will follow a repetitive&lt;br /&gt;&lt;br /&gt;pattern, until the protection snaps on:&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;JL 0A99&lt;br /&gt;&lt;br /&gt;CMP BYTE PTR [A72A],01&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;JL 0A99&lt;br /&gt;&lt;br /&gt;CMP BYTE PTR [A72A],01&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;for ages and ages and then...&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;JL 0A99&lt;br /&gt;&lt;br /&gt;E834FD CALL 0759 &amp;lt;- BINGO! (CALL beggar_off_time_is_up)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;... there it is, found the other way round. (But this apparently&lt;br /&gt;&lt;br /&gt;better method is unfortunately very unstable: it depends on your&lt;br /&gt;&lt;br /&gt;timing of the breaking in and on the distance between protection&lt;br /&gt;&lt;br /&gt;and nag screen, therefore the somehow more complicated, but more&lt;br /&gt;&lt;br /&gt;sure previous one should be favoured).&lt;br /&gt;&lt;br /&gt;The reason why "minimal" approaches in cracking are often&lt;br /&gt;&lt;br /&gt;more successful than heavy vector_cracking, is that the programs&lt;br /&gt;&lt;br /&gt;are hardly ever "overprotected", and therefore the protections&lt;br /&gt;&lt;br /&gt;are seldom difficult to find (and those that are really worth&lt;br /&gt;&lt;br /&gt;cracking for study reasons).&lt;br /&gt;&lt;br /&gt;Sometime you don't even need to crack anything at all! Some&lt;br /&gt;&lt;br /&gt;applications are fully functional -per se-, but have been&lt;br /&gt;&lt;br /&gt;crippled in a hurry in order to release them as demos. The&lt;br /&gt;&lt;br /&gt;commercial programmers want only money, do not even try to&lt;br /&gt;&lt;br /&gt;understand our zen ways, and do not care at all for a well done&lt;br /&gt;&lt;br /&gt;job. That means, among other things, that the hard disk of the&lt;br /&gt;&lt;br /&gt;user will be cluttered with files that the main program module&lt;br /&gt;&lt;br /&gt;never calls. A typical example of this sloppy method is the demo&lt;br /&gt;&lt;br /&gt;of [Panzer General] from SSI that appeared in the summer '95.&lt;br /&gt;&lt;br /&gt;This was in reality no less than the complete beta version of the&lt;br /&gt;&lt;br /&gt;game: you just had to substitute to one of the two "allowed"&lt;br /&gt;&lt;br /&gt;scenarios one of the 20 or more scenarios of the beta version in&lt;br /&gt;&lt;br /&gt;order to play them freely... you didn't ever need to crack!&lt;br /&gt;&lt;br /&gt;The pooldemo crack example above should not discourage you&lt;br /&gt;&lt;br /&gt;from cracking intuitively. Be careful! Perform a thoroughly&lt;br /&gt;&lt;br /&gt;zen_analyze before attempting deeper methods: do remember that&lt;br /&gt;&lt;br /&gt;you want to crack the protection scheme SOMEHOW, and not&lt;br /&gt;&lt;br /&gt;necessarily following the same line of thought that the&lt;br /&gt;&lt;br /&gt;programmer eventually WANTED YOU TO CRACK IT with.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Well, that's it for this lesson, reader. Not all lessons of my&lt;br /&gt;&lt;br /&gt;tutorial are on the Web.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You 'll obtain the missing lessons IF AND ONLY IF you mail&lt;br /&gt;&lt;br /&gt;me back (via anon.penet.fi) with some tricks of the trade I may&lt;br /&gt;&lt;br /&gt;not know that YOU discovered. Mostly I'll actually know them&lt;br /&gt;&lt;br /&gt;already, but if they are really new you'll be given full credit,&lt;br /&gt;&lt;br /&gt;and even if they are not, should I judge that you "rediscovered"&lt;br /&gt;&lt;br /&gt;them with your work, or that you actually did good work on them,&lt;br /&gt;&lt;br /&gt;I'll send you the remaining lessons nevertheless. Your&lt;br /&gt;&lt;br /&gt;suggestions and critics on the whole crap I wrote are also&lt;br /&gt;&lt;br /&gt;welcomed.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;!-- The following HTML tag is the external link tag.  This tag is a hot link to the specific URL (or location). --&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17335939-113691498210622404?l=ahackaday.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ahackaday.blogspot.com/feeds/113691498210622404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17335939&amp;postID=113691498210622404&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113691498210622404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17335939/posts/default/113691498210622404'/><link rel='alternate' type='text/html' href='http://ahackaday.blogspot.com/2003/01/lesson-1-best-way-to-learn-cracking.html' title='Lesson 1 - The best way to learn cracking'/><author><name>bruenet</name><uri>http://www.blogger.com/profile/01644616483340492993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
