home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / zines / n_z / pirate4.006 < prev    next >
Encoding:
Text File  |  2003-06-11  |  46.3 KB  |  1,254 lines

  1. ***************************************************
  2. ***  Pirate Magazine Issue IV  /  File 6/10     ***
  3. ***  PTL Cracking tips (reprinted)              ***
  4. ***************************************************
  5.  
  6. {This file has been around for awhile, but it's sufficiently good
  7. that it deserves reprinting (eds.)}
  8.  
  9. IN THIS FILE: Unprotects for:
  10.      Title:         Case Study: A Colorful CLS
  11.      Title:         Cracking On the IBM PC Part I
  12.      Title:         Cracking On the IBM PC Part II
  13.      Title:         MEAN-18 UnProtect For CGA/EGA Version
  14.      Title:         Space Station Oblivion Crack
  15.      Title:         F-15 Unprotect
  16.      Title:         BATTLEHAWKS-1945 Doc Check Crack
  17.      Title:         Yeager's Advanced Flight Trainer
  18.      Title:         Microsoft Flight Simulator 1.00 Unprotect
  19.  
  20.  
  21.                               Version 1.3
  22.                                   By
  23.                             Specular Vision
  24.  
  25.                           Special Thanks to:
  26.                             Mr. Transistor
  27.                                 Ironman
  28.                            The Grand Elusion
  29.                             Banzai Buckaroo
  30.  
  31.                       Another fine PTL Production
  32.                         Call The Myth Inc. BBS
  33.      ------------------       (Page  Numbers will be aprox.  until
  34.                                   final version is finished)
  35.           i.        Table of Contents                         2
  36.  
  37.           ii.       Introduction                              3
  38.  
  39.           I.        How to Crack                              4
  40.                       Debugging DOS                           4
  41.                       Cracking on the IBM PC Part 1           7
  42.                       Cracking on the IBM PC Part 2          11
  43.  
  44.           II.       Example Cracks                           14
  45.                       Mean-18 by Accolade                    14
  46.                       Submarine by Eypx                      18
  47.                       Space Station Oblivion by Eypx         22
  48.  
  49.           III.      Removing Doc Check Questions             23
  50.                       F-15 Strike Eagle by MicroProse        23
  51.                       Battlehawks 1945 by Lucasfilms         25
  52.                       A - Interrupt Tables                   36
  53.                           (This will be an add-on file)
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. 01 90 FE C5 80 FD 0C
  72.  
  73. 04.   After modifying the bytes,  write the modified  file
  74. E1 90 CD 20
  75.  
  76.  
  77.                                    2
  78.  
  79.      Comments Key:
  80.      -------------
  81.  
  82.      Comments in the following material will be made by one of the
  83.      following  and the lines that enclose the comments  show  who
  84.      made the comment.
  85.  
  86.      Specular Vision = -------------
  87.      Mr. Transistor  = +++++++++++++
  88.      Ironman         = |||||||||||||
  89.  
  90.  
  91.      Special thanks to Mr.  Transistor, for coming out of "Retire-
  92.      ment" to help compose this document.
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.                                    3
  121.  
  122.      -------------------------------------------------------------
  123.      Let's start with a simple introduction to patching a  program
  124.      using the DOS DEBUG program.  The following article will  in-
  125.      troduce you to the basic ideas and concepts of looking for  a
  126.      certain area of a program and making a patch to it.
  127.      -------------------------------------------------------------
  128.  
  129.  
  130.      By:            Charles Petzold / Specular Vision
  131.      Title:         Case Study: A Colorful CLS
  132.  
  133.        This article originally appeared in the Oct.  14,1986 Issue
  134.      of PC Magazine (Vol 15. Num 17.). Written by Charles Petzold.
  135.  
  136.        The hardest part of patching existing programs is determin-
  137.      ing  where the patch should go.  You really have to  make  an
  138.      intelligent guess about the functioning of the program.
  139.  
  140.        As an example,  let's attempt to modify COMMAND.COM so that
  141.      is colors the screen on a CLS command.   As with any type  of
  142.      patch try it out on a copy and NOT the original.
  143.  
  144.        First, think about what we should look for.  CLS is differ-
  145.      ent from all the other DOS internal Commands,  It is the only
  146.      internal command that does something to the screen other than
  147.      just write to it with simple teletype output.  CLS blanks the
  148.      screen and homes the cursor.   Since it can't do this through
  149.      DOS Calls (unless ANSI.SYS is loaded), it is probably calling
  150.      the BIOS Directly.   The BIOS Interrupt 10h call controls the
  151.      video,  and so the CLS command probably uses several INT  10h
  152.      instructions.  The machine code for INT 10h is CD 10.
  153.  
  154.        (While  this  same method will work under  any  version  of
  155.      PC-DOS,  Version 2.0 and later, the addresses I'll  be  using
  156.      are from PC-DOS 3.1. Other versions of PC-DOS(or MS-DOS) will
  157.      have  different addresses;  you should be absolutely  certain
  158.      that you're using the correct addresses.)
  159.  
  160.        Load COMMAND.COM into DEBUG:
  161.  
  162.                     DEBUG COMMAND.COM
  163.  
  164.      and do an R (Registers) command.  The size of COMMAND.COM  is
  165.      in  register CX.   For DOS 3.1's COMMAND.COM,  this value  is
  166.      5AAA.
  167.  
  168.        Now do Search command to look for the CD 10 bytes:
  169.  
  170.                     S 100 L 5AAA CD 10
  171.  
  172.      You'll get a list of six addresses, all clustered close to-
  173.  
  174.                                    4
  175.      gether.  The first one is 261D. You can now pick an address a
  176.      little before that (to see what the first call is doing)  and
  177.      start disassembling:
  178.  
  179.                     U 261B
  180.  
  181.       The  first INT 10 has AH set to 0F which is a Current  Video
  182.      State  call.   The code checks if the returned  value  of  AL
  183.      me  to get started.   Next we'll look at two other  articles,
  184.      both written by Buckaroo Banzi.   These two articles  CRACK-1
  185.      and  CRACK-2 give you an introduction to the  different  copy
  186.      protection schemes used on IBM PC's, and how to find and  by-
  187.      pass them.
  188.      -------------------------------------------------------------
  189.  
  190.  
  191.  
  192.      By:            Buckaroo Banzai
  193.      Title:         Cracking On the IBM PC Part I
  194.  
  195.  
  196.      Introduction
  197.      ------------
  198.        For  years,  I have seen cracking tutorials for  the  APPLE
  199.      computers,  but never have I seen one for the PC.  I have de-
  200.      cided to try to write this series to help that pirate move up
  201.      a level to a crackest.
  202.  
  203.        In this part, I will cover what happens with INT 13 and how
  204.      most copy protection schemes will use it.  I strongly suggest
  205.      a  knowledge of Assembler (M/L) and how to use  DEBUG.  These
  206.      will be an important figure in cracking anything.
  207.  
  208.  
  209.      INT-13 - An overview
  210.      --------------------
  211.  
  212.        Many  copy  protection  schemes  use  the  disk   interrupt
  213.      (INT-13).  INT-13 is often use to either try to read in a il-
  214.      legally   formatted   track/sector  or  to   write/format   a
  215.      track/sector that has been damaged in some way.
  216.  
  217.        INT-13 is called like any normal interrupt with the  assem-
  218.      bler  command INT 13 (CD 13).  [AH] is used to  select  which
  219.      command to be used, with most of the other registers used for
  220.      data.
  221.  
  222.      INT-13 Cracking College
  223.      -----------------------
  224.        Although,  INT-13 is used in almost all protection schemes,
  225.      the easiest to crack is the DOS file.  Now the protected pro-
  226.      gram  might use INT-13 to load some other data from a  normal
  227.      track/sector on a disk, so it is important to determine which
  228.      tracks/sectors  are  important to the protection  scheme.   I
  229.      have  found  the best way to do this is to  use  LOCKSMITH/pc
  230.      (what, you don't have LS. Contact your local pirate for it.)
  231.  
  232.        Use LS to analyze the diskette. Write down any track/sector
  233.      that seems abnormal.  These track are must likely are part of
  234.      the protection routine.   Now, we must enter debug. Load in
  235.  
  236.                                    7
  237.      the  file  execute a search for CD 13.   Record  any  address
  238.      show.
  239.  
  240.        If no address are picked up,  this mean 1 or 2 things,  the
  241.      program is not copy protected (right...) or that the check is
  242.      in an other part of the program not yet loaded.   The  latter
  243.      being  a real hassle to find,  so I'll cover it in  part  II.
  244.      There is another choice.   The CD 13 might be hidden in  self
  245.      changing  code.   Here is what a sector of hidden code  might
  246.      look like
  247.  
  248.      -U CS:0000
  249.      1B00:0000 31DB     XOR    BX,BX
  250.      1B00:0002 8EDB     MOV    DS,BX
  251.      1B00:0004 BB0D00   MOV    BX,000D
  252.      1B00:0007 8A07     MOV    AL,[BX]
  253.      1B00:0009 3412     XOR    AL,12
  254.      1B00:000B 8807     MOV    [BX],AL
  255.      1B00:000D DF13            FIST   WORD...
  256.  
  257.        In  this  section of code,  [AL] is set to DF  at  location
  258.      1B00:0007.   When you XOR DF and 12,  you would get a CD(hex)
  259.      for  the  INT opcode which is placed right next to a  13  ie,
  260.      giving you CD13 or INT-13.   This type of code can't and will
  261.      not be found using debug's [S]earch command.
  262.  
  263.  
  264.  
  265.      Finding Hidden INT-13s
  266.      ----------------------
  267.  
  268.        The  way I find best to find hidden INT-13s,  is to  use  a
  269.      program called PC-WATCH (TRAP13 works well also).   This pro-
  270.      gram  traps  the interrupts and will print  where  they  were
  271.      called  from.   Once running this,  you can just  disassemble
  272.      around  the address until you find code that look like it  is
  273.      setting up the disk interrupt.
  274.  
  275.        An  other way to decode the INT-13 is to use  debug's  [G]o
  276.      command.   Just  set  a breakpoint at  the  address  give  by
  277.      PC-WATCH  (both  programs give the return address).   Ie,  -G
  278.      CS:000F (see code above).   When debug stops,  you will  have
  279.      encoded  not only the INT-13 but anything else leading up  to
  280.      it.
  281.  
  282.  
  283.      What to do once you find INT-13
  284.      -------------------------------
  285.  
  286.        Once you find the INT-13,  the hard part for the most  part
  287.      is over.   All that is left to do is to fool the computer  in
  288.      to thinking the protection has been found.   To find out what
  289.      the computer is looking for, examine the code right after the
  290.      INT-13.  Look for any branches having to do with the
  291.  
  292.                                    8
  293. ny CMP to the AH register.  If a JNE or JC
  294.       (etc) occurs, then [U]nassembe the address listed with the
  295.      jump.  If it is a CMP then just read on.
  296.  
  297.        Here you must decide if the program was looking for a  pro-
  298.      tected  track or just a normal track.   If it has a CMP  AH,0
  299.      and it has read in a protected track,  it can be assumed that
  300.      it  was looking to see if the program had  successfully  com-
  301.      plete  the  READ/FORMAT of that track and that the  disk  had
  302.      been  copied thus JMPing back to DOS (usually).   If this  is
  303.      the case,  Just NOP the bytes for the CMP and the correspond-
  304.      ing JMP.
  305.  
  306.        If  the program just checked for the carry flag to be  set,
  307.      and it isn't,  then the program usually assumes that the disk
  308.      has been copied. Examine the following code
  309.  
  310.            INT 13      <-- Read in the Sector
  311.            JC 1B00     <-- Protection found
  312.            INT 19      <-- Reboot
  313.      1B00  (rest of program)
  314.  
  315.        The program carries out the INT and find an error (the  il-
  316.      legally formatted sector) so the carry flag is set.  The com-
  317.      puter,  at the next instruction,  see that the carry flag  is
  318.      set  and know that the protection has not been  breached.  In
  319.      this case, to fool the computer, just change the "JC 1B00" to
  320.      a "JMP 1B00" thus defeating the protection scheme.
  321.  
  322.      NOTE: the PROTECTION ROUTINE might be found in more than just
  323.            1 part of the program
  324.  
  325.  
  326.        ----------------------------
  327.          00   - Successful
  328.          01   - Bad command given to INT
  329.         *02   - Address mark not found
  330.          03   - write attempted on write protected disk
  331.         *04   - request sector not found
  332.          08   - DMA overrun
  333.          09   - attempt to cross DMA boundary
  334.         *10   - bad CRC on disk read
  335.          20   - controller has failed
  336.          40   - seek operation failed
  337.          80   - attachment failed
  338.      (* denotes most used in copy protection)
  339.      AH=2    Read Sectors
  340.  
  341.        input
  342.           DL = Drive number (0-3)
  343.           DH = Head number (0or1)
  344.           CH = Track number
  345.           CL = Sector number
  346.           AL = # of sectors to read
  347.        ES:BX = load address
  348.        output
  349.            AH =error number (see above)
  350.                [Carry Flag Set]
  351.            AL = # of sectors read
  352.  
  353.      AH=3 Write (params. as above)
  354.      AH=4 Verify (params. as above -ES:BX)
  355.      AH=5 Format (params. as above -CL,AL
  356.                   ES:BX points to format
  357.                   Table)
  358.  
  359.      ------------------------------------------------------------
  360.        For more information on INT-13 refer to appendix A.
  361.      ------------------------------------------------------------
  362.  
  363.      END.
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.                                   10
  372.      In part II,  Buck cover's Calls to INT-13 and INT-13 that are
  373.      located  in  different overlays of the program.   This  is  a
  374.      method that is used often.
  375.      -------------------------------------------------------------
  376.  
  377.  
  378.      Cracking Tutorial II.
  379.  
  380.      By:            Buckaroo Banzai
  381.      Title:         Cracking On the IBM PC Part II
  382.  
  383.  
  384.      Introduction
  385.      ------------
  386.  
  387.        OK guys,  you now passed out of Copy Class 101 (dos  files)
  388.      and have this great new game with overlays.   How do I  crack
  389.      this one.  You scanned the entire .EXE file for the CD 13 and
  390.      it's nowhere.  Where can it be you ask yourself.
  391.  
  392.        In  part II,  I'll cover cracking Overlays and the  use  of
  393.      locksmith in cracking.   If you haven't read part I,  then  I
  394.      suggest you do so.  The 2 files go together.
  395.  
  396.  
  397.      Looking for Overlays
  398.      --------------------
  399. it can mean
  400.      4 things.
  401.  
  402.           1:  The .EXE (though it is mostly .COM) file is  just  a
  403.               loader for the main file.
  404.  
  405.           2:  The .EXE file loads in an overlay.
  406.  
  407.           3:  The CD 13 is encrypted &/or hidden in the .EXE file.
  408.  
  409.           4:  Your looking at the WRONG file.
  410.  
  411.  
  412.        I  won't  discuss case 1 (or at least no here)  because  so
  413.      many UNP files are devoted to PROLOCK and SOFTGUARD,  if  you
  414.      can't figure it out with them, your stupid.
  415.  
  416.        If you have case 3, use the technique in part I and restart
  417.      from the beginning. And if you have case 4, shoot your self.
  418.  
  419.        You  know  the program uses overlays but don't see  and  on
  420.      disk?   Try looking at the disk with good old Norton's.   Any
  421.      hidden files are probably the overlays.   These are the  ones
  422.      we  are after.   If you still can't find them,  use  PC-WATCH
  423.      (this program is a must!!! For all crackists.   Traps ALL in-
  424.      terrupts).
  425.  
  426.                                   11
  427.  
  428.      Using PC-Watch to Find Overlays
  429.      -------------------------------
  430.        Start up PC-Watch and EXCLUDE everything in the left  Col..
  431.      Search  the  right Col.  until you find DOS21 -  OpnFile  and
  432.      select it.
  433.  
  434.           Now run the program to be cracked.
  435.           Play the game until the protection is checked.
  436.           Examine  you PCWatch output to see what file was  loaded
  437.            right before it.
  438.           This probably is the one holding the check.
  439.           If not, go through all the files.
  440.  
  441.  
  442.      You Have Found the Overlays
  443.      ---------------------------
  444.        Great,  now just crack the overlay as if it was a DOS file.
  445.      You don't need to worry about .EXE file,  debug can write  an
  446.      overlay  file.   Part I explains the basics of  cracking.   I
  447.      suggest that you keep a backup copy of the overlay so if  you
  448.      mess up,  and you will, you can recover quickly. Ah,  and you
  449.       I find it useful,  before I even start cracking,  to analyze
  450.   the  protected  disk to find and id  it's  protection.   This
  451.      helps in 2 ways.   First,  it helps you to know what to do in
  452.      order to fake out the protection.   Second,  it helps you  to
  453.      find what the program is looking for.
  454.  
  455.       I  suggest that you get locksmith if you don't already  have
  456.      it.   Check your local pirate board for the program.   I also
  457.      suggest  getting PC-Watch and Norton Utilities 3.1.(Now  4.1)
  458.      All of these program have many uses in the cracking world.
  459.  
  460.      END.
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.                                   12
  472.  
  473.  
  474.  
  475.      -------------------------------------------------------------
  476.      OK,  now let's put some of this information into practice  by
  477.      examining a few cracks of some common programs.   First we'll
  478.      look at a Crack for Mean-18 Golf by Accolade.   Accolade  has
  479.      been one of those companies that has a fervent belief in Copy
  480.      Protection.
  481.      -------------------------------------------------------------
  482.  
  483.  
  484.  
  485.  
  486.      Title:         MEAN-18 UnProtect For CGA/EGA Version
  487.  
  488.      This crack works by eliminating the code that tests for known
  489.      bad  sectors  on the original diskette to see if  it  is  the
  490.      genuine article or an illegal copy.   The code begins with an
  491.      INT 13 (CD 13 HEX),  a DOS BIOS disk service routine followed
  492.      a few bytes later by another INT 13 instruction.  The program
  493.      then checks the returned value for the bit configuration that
  494.      signifies the bad sectors and, if all is as expected, contin-
  495.      ues on with program execution.
  496.  
  497.      The code that needs to be patched is in the GOLF.EXE file and
  498.      in the ARCH.EXE file.  It is identical in both files and lies
  499.      near the end of each file.
  500.  
  501.      In the following steps,  you'll locate the start of the  test
  502.      code and patch it by replacing it with NOP instructions  (HEX
  503.      90).   The  method described uses the DOS DEBUG  utility  but
  504.      Norton's Utility (NU) works too.
  505.  
  506.      Copy  all  of the files from the MEAN-18 disk  onto  a  fresh
  507.      floppy  using  the DOS COPY command and place  your  original
  508.      diskette out of harm's way.
  509.  
  510.      Assuming DEBUG is in the A:  drive and the floppy  containing
  511.      the files to be unlocked is in the B: drive , proceed as fol-
  512.      lows:
  513.  
  514.      First  REName  the  GOLF.EXE  file  so  it  has  a  different
  515.      EXTension other than .EXE.
  516.  
  517.                     REN GOLF.EXE GOLF.DEB
  518.  
  519.  
  520.      Next  load the file GOLF.DEB into DEBUG and displays the  "-"
  521.      DEBUG prompt.
  522.  
  523.                     A:> DEBUG B:GOLF.EXE
  524.  
  525.                                   13
  526.      Search for the beginning of the code to be patched by typing:
  527.  
  528.  
  529.                     - S CS:100 FFFF CD 13
  530.  
  531.      Searches  the file for the two byte INT 13  instruction.   If
  532.      all goes well, two addresses should appear on the screen.
  533.  
  534.                     XXXX:019C
  535.                     XXXX:01A8
  536.  
  537.      XXXX indicates that the numbers preceeding the ":"  vary from
  538.      system  to system but the numbers following the ":"  are  the
  539.      same on all systems.
  540.  
  541.      The  next  step is to use the "U"  command  as  indicated  to
  542.      un-assemble  a few bytes in order to verify your position  in
  543.      the file)
  544.  
  545.                     - U CS:019C
  546.  
  547.      (Un-assembles  32 bytes of code.   Verify the  following  se-
  548.      quence of instructions:
  549.  
  550.                     INT       13
  551.                     JB        01E9
  552.                     MOV       AL,[BX+01FF]
  553.                     PUSH      AX
  554.                     MOV       AX,0201
  555.                     INT       13
  556.                     POP       AX
  557.                     JB        01E9
  558.                     CMP       AL,F7
  559.                     JNZ       01B5
  560.  
  561.      These are the instructions you'll be patching out in the fol-
  562.      lowing step)
  563.  
  564.                     - A CS:019C
  565.  
  566.      This command assembles the new instructions you enter at  the
  567.      keyboard into the addresses shown.  Beginning at CS:019C, and
  568.      for the next 21 bytes, ending with and including CS:01B0, en-
  569.      ter  the no op command "NOP" (90h) followed by a <return>  or
  570.      <enter>.   Just hit <enter> at address XXXX:01B1 to  end  the
  571.      assemble command.)
  572.  
  573.                     XXXX:019C  NOP <enter>
  574.                     XXXX:019D  NOP <enter>
  575.                                .
  576.                                .
  577.                                .
  578.                     XXXX:01AE  NOP <enter>
  579.                     XXXX:01AF  NOP <enter>
  580.  
  581.                                   14
  582.                     XXXX:01B0  NOP <enter>
  583.                     XXXX:01B1 <enter>
  584.  
  585.      This just wipes out the section of code containing the INT 13
  586.      check.
  587.  
  588.      Now  do  a HEX dump and verify that bytes 019C  through  01B0
  589.      have been set to 90 HEX.
  590.                     - D CS:019C
  591.  
  592.      If they have, write the patched file to the disk as follows)
  593.  
  594.                     - W
  595.  
  596.      This    writes    the    patched    file    back    to    the
  597.  
  598. but
  599.      now,  it  can be run from any drive,  including  the     hard
  600.      drive)
  601.  
  602.      Now just [Q]uit or exit back to DOS.  This command can be ex-
  603.  ecuted at any "-" DEBUG prompt if you get lost.  No modifica-
  604.      tion will be made to the file on the disk until you issue the
  605.      "W" command.
  606.  
  607.                     - Q
  608.  
  609.      The process is the same for the ARCH.EXE file but because  it
  610.      is a different length, the segment address, (XXXX part of the
  611.      13  instruction  at address XXXX:019C and the second  one  at
  612.      XXXX:01A8 as before.
  613.  
  614.      You  will again be patching 21 bytes and you will start  with
  615.      019C and end with 01B0 as before.   After doing the HEX  dump
  616.      starting  at address 019C,  you again write the file back  to
  617.  
  618.                     RCS<cr>
  619.  
  620.  
  621.                                   16
  622.      Debug will prompt you for the new value of CS with:
  623.  
  624.                     CS:27FC:
  625.  
  626.        You  respond  by typing the value of DS you  saw  when  you
  627.      dumped the registers the first time.   For example,  I  typed
  628.      "12CE<cr>".   The  value you type will be  different.   Debug
  629.      will  again respond with the "-"  prompt which means  we  are
  630.      ready to do our search.   Type in the following after the "-"
  631.      prompt:
  632.  
  633.                     S CS:0 FFFF CD 13<cr>
  634.  
  635.        The computer should respond with three lines of information
  636.      which are the addresses of the three Interrupt 13 calls built
  637.      into the program.   The first four digits are the segment ad-
  638.      dress  and will equal to the value of CS you have  just  set.
  639.      The second four digits following the colon are the offset ad-
  640.      dresses which are of primary interest to us.   On my  machine
  641.      they came back as follows:
  642.  
  643.                     12CE:4307
  644.                     12CE:431F
  645.                     12CE:4335
  646.  
  647.        The segment addresses will be identical and the three  off-
  648.      set  addresses should all be relatively close together.   Now
  649.      look at the first offset address.  (As you can see,  mine was
  650.      "4307".) Write it down.  Now we do a bit of Unassembly.
  651.  
  652.        Type "U4307<cr>"  which is the letter "U", followed immedi-
  653.      ately  (with no blank spaces) by whatever your  first  offset
  654.      address turned out to be, followed by a carriage return.   If
  655.      you are not familiar with unassembled machine code,  it  will
  656.      look like lines of gibberish as follows:
  657.  
  658.                     12CE:4307 CD13        INT      13
  659.                     12CE:4309 4F          DEC      DI
  660.                     12CE:430A 744C        JZ       4358
  661.                               .
  662.                               .
  663.                     12CE:431F CD13        INT      13
  664.                     12CE:4321 4F          DEC      DI
  665.                               .
  666.                               .
  667.                     12CE:4324 BF0400      MOV      DI,0004
  668.                     12CE:4326 B80102      MOV      AX,0201
  669.  
  670.        In  my computer,  Unassemble will automatically  output  16
  671.      lines of code to the screen.  Yours may differ.  Note, in the
  672.      (INT  13) correspond to the first two addresses we  found  in
  673.      our search.  Now we continue the unassemble, and here comes
  674.  
  675.                                   17
  676.      another  tricky part.   Just type in "U<cr>"  after  the  "-"
  677.      prompt.
  678.  
  679.        You'll get sixteen more lines of code with the third Inter-
  680.      rupt 13 on a line which begins with the address (CS):4335  if
  681.      you  have  the same version of Submarine as I do.   It's  not
  682.      terribly  important  to  this  exercise,   but  it  will   at
  683.      least show you that things are proceeding okay.   Now type in
  684.      "U<cr>"  again  after the prompt.  You are  now  looking  for
  685.      three key lines of code.   On my program they appear as  fol-
  686.      lows:
  687.  
  688.                     12CE:4335 07          POP      ES
  689.                     12CE:4356 5D          POP      BP
  690.                     12CE:4357 CB          RETF
  691.  
  692.      The true key is the instruction "POP ES".   This  instruction
  693.      begins  the normal return sequence after the program has  ex-
  694.      ecuted its Interrupt 13 instructions and accompanying checks.
  695.      If  Debug on your machine prints fewer than 16 lines of  code
  696.      at a shot, you may have to type in "U" more than twice at the
  697.      "-" to find these instructions.  (If you haven't found any of
  698.      this stuff, either get help on the use of Debug or go back to
  699.                     A4307<cr>
  700.  
  701.        This first bit tells Debug that new Assembler code will  be
  702.      inserted at the address of the first Interrupt 13.   If  your
  703.      first  Interrupt 13 is at an address other that  "4307",  use
  704.      the correct address,  not mine.  The computer will prompt you
  705.  
  706.      with the address:
  707.  
  708.                     12CE:4307
  709.  
  710.      After which you will immediately type:
  711.  
  712.                     JMP 4354<cr>
  713.  
  714.      This instruction jumps the program immediately to the  normal
  715.      return code instructions.  Again, at the risk of being redun-
  716.      dant, if your "POP ES" instruction is at a different address,
  717.      use that address, not "4354"!
  718.  
  719.      The computer will prompt you with the address of the next in-
  720.  
  721.                                   18
  722.      struction  if  all went well.   MAKE SURE you  just  hit  the
  723.      carriage  return at this point.  Debug will then  return  the
  724.      familiar "-" prompt.
  725.  
  726.      Now  it's  time  to examine your  handiwork.   Let's  do  the
  727.      unassemble again starting at the address of what had been the
  728.      first Interrupt 13 instruction, but which is now the Jump in-
  729.      struction.  Type in "U4307<cr>" or "U" followed by the appro-
  730.      priate address and a carriage return.   The first line begin-
  731.      ning with the address should appear as follows:
  732.  
  733.                     12CE:4307 EB4B        JMP      4354
  734.  
  735.      The key here is the four bytes immediately following the  ad-
  736.      dress.   In my example they are "EB4B".   Yours may  not  be.
  737.      But,  they are VERY IMPORTANT because they represent the  ac-
  738.      tual machine code which is the Jump instruction.  WRITE THESE
  739.      FOUR BYTES DOWN AND MAKE SURE THEY ARE CORRECT.
  740.  
  741.        Now  if  you want to have some fun before we go  on,  reset
  742.      register  CS to its original value by first typing  "RCS<cr>"
  743.      and execute your program.   If you have followed my  instruc-
  744.      tions, it should run fine.  Get help if it doesn't.  Now, you
  745.      should be all set.  You can load onto your hard disk,  if you
  746.      haven't already.  You can run it from a RAM disk using a  BAT
  747.      file if you really want it to hum.   Or,  if you have the fa-
  748.      cilities,  you can copy it from 5-1/4" floppy to 3-1/2"  dis-
  749.      kette and run it on machines which accept that medium if  you
  750.      upgrade to a new computer.
  751.  
  752.      END.
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.                                   20
  772.      Now let's take a look at a newer crack on the program,  Space
  773.      Station Oblivion by Eypx.  At a first [S]earch with Debug and
  774.      Norton's  Utility no CD 13's could be found,  and yet it  was
  775.      using them... So a different approach had to be taken...
  776.      -------------------------------------------------------------
  777.  
  778.  
  779.      By:            PTL
  780.      Title:         Space Station Oblivion Crack
  781.  
  782.  
  783.      First of all,  you must determine which file the INT 13's are
  784.      in,  in this case it had to be the file OBLIVION.EXE since it
  785.      was the main program and probably contained the INT 13's.  So
  786.      then rename it to a different EXTension and load it into  De-
  787.      bug.
  788.  
  789.      Then do a [S]earch for INT 13's.
  790.  
  791.                     -S 100 FFFF CD 13
  792.  
  793.      Which will promptly turned up nothing.  Hmmm...
  794.  
  795.      Next you might decide that, maybe, the code was modifying it-
  796.      self.   So quit from Debug and load up PC-Watch,  include all
  797.      the  INT  13  Calls.   For those of  you  not  familiar  with
  798.      PC-Watch,  it is a memory resident program that can be set to
  799.      look  for  any type of BIOS call.   When that  call  is  made
  800.      PC-Watch prints to the screen the contents of all the  regis-
  801.      ters  and the current memory location that the call was  made
  802.      from.
  803.  
  804.      After PC-Watch is initialized, then run the OBLIVION.EXE file
  805.      from the hard disk,  leaving the floppy drive door open,  and
  806.      sure  enough,  when the red light comes on in   the  diskette
  807.      drive,  PC-Watch  will report the address's of  some  INT  13
  808.      calls.  Which you should then write down.
  809.  
  810.      From  there,  quit the game, reboot,  (To dump PC-Watch  from
  811.      memory) and load the OBLIVION.EXE into Debug and issue a [G]o
  812.      command with a breakpoint.  What address should you use for a
  813.      breakpoint?   You guessed it, the same address PC-Watch gives
  814.      you.
  815.      Well,  it locked up did'nt it?  Which is quite common in this
  816.      line of work so don't let that discourage you.   So next  re-
  817.      loaded  it into debug and this time [U]nassemble the  address
  818.      that you got from PC-Watch.   But instead of finding the  INT
  819.      13's you'll find harmless INT 21's.
  820.  
  821.      Hmm...  could  it be that the program was converting  the  CD
  822.      21's to CD 13's during the run?   Well,  to test the idea as-
  823.      semble an INT 20 (Program Terminate) right after the first
  824.  
  825.                                   21
  826.      INT 21. Then I run the program, and yes immediately after the
  827.      red light comes on the drive, the program will terminate nor-
  828.      mally.
  829.  
  830.      Then [U]nassemble that same area of memory,  and low and  be-
  831.      hold,  some  of the INT 21's have magically turned  into  INT
  832.      13's.  How clever...
  833.  
  834.      So,  then it is just a matter of locating the address of  the
  835.      routine that it jumped (JMP) to if the correct disk was found
  836.      in  drive A:.   Once you have that address,  just go  to  the
  837.      start of all this nonsense and [A]ssemble a JMP XXXX command.
  838.      Where  XXXX was the address to jump to if the  original  disk
  839.      was in drive A:.
  840.  
  841.      Then  just [W]rite the file back out to the disk  and  [Q]uit
  842.      debug,   and  then  REName  the  file  back  to  OBLIVION.EXE
  843.      afterwhich it should work fine.
  844.  
  845.  
  846.      END.
  847.  
  848.                                   22
  849.  
  850.      -------------------------------------------------------------
  851.      A  new fad has recently started up with software vendors,  it
  852.      involves  the use of "Passwords" which are either  stored  in
  853.      the  documentation or are actually the documentation  itself.
  854.      Then  when you reach a certain part of the  program  (Usually
  855.      the beginning) the program will ask for the password and  you
  856.      have  to look it up in the Docs before being allowed to  con-
  857.      tinue.   If the wrong password is entered,  it  will  usually
  858.      drop you to DOS or take you to a Demo version of the program.
  859.  
  860.      This  new form of copy protection is very annoying,  but  can
  861.      usually  be cracked without too much effort,   and the  files
  862.      and the disk are usually in the standard DOS format.   So now
  863.      we'll take a look at cracking the Doc check questions.
  864.  
  865.      First  of  all  we'll crack the startup  questions  in   F-15
  866.      Strike Eagle by MicroProse.
  867.      -------------------------------------------------------------
  868.  
  869.  
  870.      By:            JP ASP
  871.      Title:         F-15 Unprotect
  872.  
  873.  
  874.  
  875.      Make a copy of the original disk using the DOS DISKCOPY  pro-
  876.      gram.
  877.  
  878.                     >DISKCOPY A: B:
  879.  
  880.      Then  insert the copy disk in the A drive and invoke DOS  DE-
  881.      BUG.
  882.  
  883.                     >DEBUG
  884.  
  885.      Now we'll [F]ill an area of memory with nothing (00).
  886.  
  887.                     -F CS:100 L FEFF 0
  888.  
  889.      Next we will [L]oad into address CS:0100 the data that is  on
  890.      the A: disk (0) from sector 0 to sector 80.
  891.  
  892.                     -l cs:100 0 0 80
  893.  
  894.      Now  lets [S]earch the data we loaded for the area where  the
  895.      copy protection routine is.
  896.  
  897.                     -s cs:100 l feff FA EB FD
  898.  
  899.      Then for each of the occurences listed, use the address DEBUG
  900.      returned in the [E]nter command below.
  901.  
  902.                                   23
  903.  
  904.                     -e xxxx 90 90 90
  905.  
  906.      -------------------------------------------------------------
  907.      Here's the part we are interested in,  it's where you  change
  908.      all  the autorization codes to a space.   Notice how you  can
  909.      use the [S]earch command to look for ASCII text.
  910.      -------------------------------------------------------------
  911.  
  912.                     -s cs:100 l feff "CHIP"
  913.  
  914.      Then for each occurance of "CHIP"  use the address DEBUG  re-
  915.      turned in the [F]ill command below.
  916.  
  917.                     -F XXXX L F 20
  918.  
  919.      Write out the modified data
  920.  
  921.                     -W CS:100 1 0 80
  922.  
  923.      Quit DEBUG
  924.  
  925.                     -Q
  926.  
  927.  
  928.        You should now be able to DISKCOPY and boot from all copies
  929.      also  just press the space bar when it ask for ANY  authority
  930.      code and then press "ENTER". Now there is no need to remember
  931.      (or look up) any codes that are so finely tucked away in  the
  932.      manual!
  933.  
  934.      END.
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.                                   24
  958.      -------------------------------------------------------------
  959.      Here is a similar method that was used break the passwords in
  960.      the  program BATTLEHAWKS 1945 by Lucasfilms.  However  Norton
  961.      Utilities  is  used to search for the  passwords  and  change
  962.      them.
  963.      -------------------------------------------------------------
  964.  
  965.      By:            PTL
  966.      Title:         BATTLEHAWKS-1945 Doc Check Crack
  967.  
  968.  
  969.      In  keeping in line with their previous programs,  Lucasfilms
  970.      has  released yet another program which uses Doc  Checks  for
  971.      its means of copy protection, Battlehawks 1942.
  972.  
  973.      When you run this program,  it first goes through a series of
  974.      graphic displays, then it goes through a series of questions,
  975.      asking what type of mission you want to fly,  such as  Train-
  976.      ing, Active Duty, or which side of the war you want to be on.
  977.  
  978.      Then right before the simulation begins,  it shows you a pic-
  979.      ture of a Japanese Zero and ask you for a password which you
  980.  
  981.      are  then  supposed to get by looking up the picture  of  the
  982.      Zero in the User Manual and typing the corresponding password
  983.      in.   After which it enters the simulation,  in the event you
  984.      enter  the wrong password,  it puts you into a training  mis-
  985.      sion.
  986.  
  987.      Removing  the  Doc Check in a program like  this  is  usually
  988.      pretty  easy.   The ideal way to do it is to remove  the  Doc
  989.      Check routine itself,  but if you don't have all day to debug
  990.      and  trace  around the code this might not be the  best  way.
  991.      For  instance if you only have your lunch hour to work on  it
  992.      (Like  I did),  then you need to use the standard  Q.D.C.R.S.
  993.      (Quick Doc Check Removal System).
  994.  
  995.      How do you do a QDCRS?  Well first of all,  play around  with
  996.      the program,  find out what it will and will NOT accept as  a
  997.      password.   Most  programs will accept anything,  but  a  few
  998.      (Like Battlehawks) will only accept Alpha characters.
  999.  
  1000.      Once you've learned what it likes,  make an educated guess as
  1001.      to what program the Doc Check routine is in.   Then load that
  1002.      program into Norton's Utility (NU).
  1003.  
  1004.      At this point,  take a look at the passwords,  and write down
  1005.      the most unusual one that you can find (I'll explain  later).
  1006.      Now  type that password in as the search string,  and let  NU
  1007.      search through the file until it finds the password.   Now  a
  1008.      couple of things can happen.
  1009.  
  1010.           1. It only finds one occurrence
  1011.           2. It finds more than one occurrence
  1012.         3. It doesn't find any occurrence
  1013.  
  1014.      In  the event of case 2 then YOU have to determine where  the
  1015.      passwords  are stored,  you can do this by opening your  eyes
  1016.      and looking.
  1017.  
  1018.      In the event of case 3,  go to the kitchen and start a pot of
  1019.      coffee, then tell you wife to go to bed without you,  because
  1020.      you have a "Special Project" that you have to finish tonight.
  1021.      And by the way, Good Luck.  You'll need it.
  1022.  
  1023.      Hopefully case 1 will occur,  now you have to take a look  at
  1024.      the data and ask yourself 2 questions:
  1025.  
  1026.           1. Are all the passwords the same length?
  1027.           2. Is there a set number of spaces  between  each  pass-
  1028.              word?
  1029.           3. Does the next password always start a certain  number
  1030.              of characters from the first character of the  previ-
  1031.              ous password?
  1032.  
  1033.      If you can answer yes to any of the above questions,  you  in
  1034.      luck.  All you have to do is change the passwords to spaces
  1035.  
  1036.      (If the program allows that,  Battlehawks doesn't) or  change
  1037.      them to you favorite character. The letter X works good, it's
  1038.      easy to type and easy to remember.
  1039.  
  1040.      If you can't answer yes to any of the questions then you  ei-
  1041.      ther need to bypass the Doc Check routine itself or you  need
  1042.      to be adventurous and experiment. Battlehawks will not follow
  1043.      any  of the above patterns,  and your quickly running out  of
  1044.      time, so you'll have to try something, fast...
  1045.  
  1046.      So  just  wiped out all of the data area with  X's,  all  the
  1047.      passwords and associated "garbage" between them.   Then saved
  1048.      the changes and drop out of NU and into BH.  Then when it ask
  1049.      for the password,  just filed the area with X's.  Next  thing
  1050.      you  know,  you'll be escorting a bombing run on  a  Japanese
  1051.      carrier.
  1052.  
  1053.      So,  this one turned out to be fairly simple.   Where you may
  1054.      run into trouble is on Doc Checks that use a graphic  system,
  1055.      such as Gunship by MicroProse.  When it comes to this type of
  1056.      Doc Check, you almost have to bypass the routine itself.  And
  1057.      again, a good way to do this is with setting break points and
  1058.      using the trace option in Debug.
  1059.  
  1060.      END.
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.                                   25
  1069.  
  1070.      -------------------------------------------------------------
  1071.      That  was the easy version Doc Check crack,  however there  a
  1072.      "Better"  way to crack Doc Checks,  is to bypass the  routine
  1073.      completely  so  the user can just press enter and  not  worry
  1074.      about spaces.   Let's take a lot at this method by looking at
  1075.      a crack for the program, Yeager's Advanced Flight Trainer, by
  1076.      Electronic Arts.
  1077.      -------------------------------------------------------------
  1078.  
  1079.  
  1080.      By:            PTL
  1081.      Title:         Yeager's Advanced Flight Trainer
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.                                   26
  1099.  
  1100.  
  1101.  
  1102.      -------------------------------------------------------------
  1103.      Now we'll take a look at cracking self booters.  A few compa-
  1104.      nies  have found this to be the best copy  protection  scheme
  1105.      for them, one of which is DataEast, makers of Ikari Warriors,
  1106.      Victory Road,  Lock-On, Karnov, etc...  This posses a special
  1107.      problem  to the Amateur Cracker, since they seldom use  stan-
  1108.      dard DOS formats.  So let's jump right in!
  1109.      -------------------------------------------------------------
  1110.  
  1111.  
  1112.      This  is the area where a "Higher than Normal"  knowledge  of
  1113.      Assembly  Language and DOS Diskette structures,  so first  of
  1114.      all, the Basic's.
  1115.  
  1116.  
  1117.      The Disk's Physical Structure
  1118.  
  1119.      Data is recorded on a disk in a series of concentric circles,
  1120.      called Tracks.   Each track if further divided into segments,
  1121.      called  Sectors.   The  standard  double-density  drives  can
  1122.      record  40 tracks of data, while the new quad-density  drives
  1123.      can record 80 tracks.
  1124.  
  1125.      However, the location, size, and number of the sectors within
  1126.      a  track are under software control.   This is why  the  PC's
  1127.      diskettes are known as soft-sectored.  The characteristics of
  1128.      a  diskette's sectors (Their size, and the number per  track)
  1129.      are set when each track is formatted.  Disk Formatting can be
  1130.      done either by the operating system or by the ROM-BIOS format
  1131.      service.   A lot of self booters and almost all forms of copy
  1132.      protection  create unusual formats via the ROM-BIOS  diskette
  1133.      services.
  1134.  
  1135.      The  5 1/4-inch diskettes supported by the standard  PC  BIOS
  1136.      may  have  sectors that are 128,256,512,  or 1,024  bytes  in
  1137.      size.   DOS, from versions 1.00 through 4.01 has consistently
  1138.      used sectors of 512 bytes, and it is quite possible that this
  1139.      will continue.
  1140.  
  1141.      Here is a table displaying 6 of the most common disk formats:
  1142.      _____________________________________________________________
  1143.  
  1144.      Type      Sides        Sectors       Tracks       Size(bytes)
  1145.      _____________________________________________________________
  1146.  
  1147.       S-8        1             8            40            160K
  1148.       D-8        2             8            40            320K
  1149.       S-9        1             9            40            180K
  1150.       D-9        2             9            40            360K
  1151.      QD-9        2             9            80            720K
  1152.      QD-15       2            15            80          1,200K
  1153.      _____________________________________________________________
  1154.  
  1155.  
  1156.  
  1157.      S  - Single Density
  1158.      D  - Double Density
  1159.      QD - Quad Density
  1160.  
  1161.      Of all these basic formats,  only two are in widespread  use:
  1162.      S-8  and D-9.   The newer Quad Density formats are for the  3
  1163.      1/2" and 5 1/4" high density diskettes.
  1164.  
  1165.  
  1166.             * SIDES.PER.DISK
  1167.  
  1168.      And  here are the formulas for converting  sequential  sector
  1169.      numbers to three-dimensional coordinates:
  1170.  
  1171.           BIOS.SECTOR = 1 + DOS.SECTOR.NUMBER MOD SECTORS.PER.SIDE
  1172.             BIOS.SIDE = (DOS.SECTOR.NUMBER f SECTORS.PER.SIDE)
  1173.             MOD SIDE.PER.DISK
  1174.             BIOS.TRACK = DOS.SECTOR.NUMBER f (SECTORS.PER.SIDE
  1175.             * SIDES.PER.DISK)
  1176.  
  1177.           (Note:  For double-sided nine-sector diskettes, the PC's
  1178.           most  common disk format, the value of  SECTORS.PER.SIDE
  1179.           is  9 and the value of SIDES.PER.DISK is 2.   Also  note
  1180.           that  sides and tracks are numbered differently  in  the
  1181.           ROM-BIOS numbering system: The sides and tracks are num-
  1182.      Diskette Space Allocation
  1183.  
  1184.      The  formatting  process divides the sectors on a  disk  into
  1185.      four sections, for four different uses.  The sections, in the
  1186.      order they are stored, are the boot record,  the file alloca-
  1187.      tion  table (FAT),  the directory, and the data  space.   The
  1188.      size of each section varies between formats,  but the  struc-
  1189.      ture and the order of the sections don't vary.
  1190.           The Boot Record:
  1191.  
  1192.           This section is always a single sector located at sector
  1193.      1 of track 0, side 0.  The boot record contains,  among other
  1194.      things,  a short program to start the process of loading  the
  1195.      operating system on it.   All diskettes have the boot  record
  1196.      on them even if they don't have the operating system.  Asisde
  1197.      from  the start-up program,  the exact contents of  the  boot
  1198.      record vary from format to format.
  1199.  
  1200.           The File Allocation Table:
  1201.  
  1202.           The  FAT follows the boot record,  usually  starting  at
  1203.      sector 2 of track 0,  side 0.   The FAT contains the official
  1204.      record of the disk's format and maps out the location of  the
  1205.      sectors used by the disk files.   DOS uses the FAT to keep  a
  1206.      record of the data-space usage.  Each entry in the table con-
  1207.      tains  a specific code to indicate what space is being  used,
  1208.      what space is available,  and what space is unusable (Due  to
  1209.      defects on the disk).
  1210.  
  1211.           The File Directory:
  1212.  
  1213.           The file directory is the next item on the disk.   It is
  1214.  
  1215.      -------------------------------------------------------------
  1216.      Here  is a simple routine to just make a backup copy  of  the
  1217.      Flight Simulator Version 1.0 by Microsoft.  I know the latest
  1218.      version  is  3.x but this version will serve the  purpose  of
  1219.      demonstrating  how to access the data and program files of  a
  1220.      selfbooter.
  1221.      -------------------------------------------------------------
  1222.  
  1223.  
  1224.      By:            PTL
  1225.      Title:         Microsoft Flight Simulator 1.00 Unprotect
  1226.  
  1227.  
  1228.      This procedure will NOT convert the Flight Simulator disk  to
  1229.      files  that can be loaded on a hard drive.   But...  it  will
  1230.      read  off the data from the original and put it onto  another
  1231.      floppy.  And this should give you an idea of how to read data
  1232.      directly from a disk and write it back out to another disk.
  1233.  
  1234.      First of all take UNFORMATTED disk and place it in drive  B:.
  1235.      This will be the target disk.
  1236.  
  1237.      Now  place your DOS disk (which has Debug) into drive A:,  or
  1238.      just load Debug off you hard disk.
  1239.  
  1240.                     A>DEBUG
  1241.  
  1242.      Then  we  are going to enter (manually) a little  program  to
  1243.      load the FS files off the disk.
  1244.  
  1245.                     -E CS:0000 B9 01 00 BA 01 00 BB 00
  1246.                                01 0E 07 06 1F 88 E8 53
  1247.  hexadecimal  which is location 17,415  decimal  in  the
  1248.  
  1249.  
  1250.                  >--------=====END=====--------<
  1251.  
  1252.  
  1253.  
  1254.