home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / VIRUS / BOOTCHK1.ZIP / BOOTCHK1.DOC < prev    next >
Text File  |  1992-03-10  |  6KB  |  147 lines

  1. Program:        BootCheck
  2. Version:        1.0
  3. Date:           03/10/92
  4. Author:         George Spafford
  5.  
  6. Purpose:
  7.  
  8. To store a copy of a boot sector in a data file and then to compare this
  9. data file to the phsical boot sector at each boot.  If a change occurs, the
  10. program will notify the user and ask if the data file should be used to rebuild
  11. the boot sector.
  12.  
  13. NOTE:  IF YOU USE THIS PROGRAM AS A VIRUS GUARD, MAKE SURE THAT YOU KNOW THE
  14.        BOOT SECTOR IS CLEAN BEFORE YOU RUN THIS PROGRAM.  OTHERWISE YOU WILL
  15.        NOT STORE THE VALID BOOT SECTOR AND MAY IN FACT COPY THE VIRUS.
  16.  
  17. Procedure:
  18.  
  19. BOOTCHK should be one of the first programs run in your AUTOEXEC.BAT file if you
  20. want it to check the sector each time the computer is started.  BOOTCHK does
  21. have several parameters:
  22.  
  23.         BOOTCHK /D:d  /L:log.DAT /C
  24.  
  25.         /D:d        Here, "d" is the drive that you want to check.
  26.                     The current drive is the default value.
  27.         /L:log.dat  log.dat is the name of the data file that you are using
  28.                     for the drive.
  29.                     BOOTCHK.DAT is the default value.
  30.         /C          Instructs the program to build the data file.
  31.  
  32.  
  33. To store the boot sector for C:
  34.  
  35.         BOOTCHK /C
  36.  
  37.         This will create the image of the sector in the BOOTCHK.DAT data file.
  38.  
  39. To store the boot sector for D:
  40.  
  41.         BOOTCHK /D:D /L:D_DRIVE.DAT
  42.  
  43.         This will make the image of drive D's boot sector in the D_DRIVE.DAT
  44.         data file.
  45.  
  46. DO NOT USE THIS PROGRAM ON NETWORK DRIVES!!!!!!!!!!!!!!!!!
  47.  
  48. and
  49.  
  50. DO NOT USE THIS PROGRAM WITH A DOS LOWER THAN VERSION 3.2.
  51.  
  52. How it's done:
  53.  
  54. BOOTCHK accesses absolute sectors by doing absolute reads and writes at the
  55. sector level.  The program assumes that the sector will be 512 bytes and then
  56. takes it from there.  What's your boot sector you say?  Trust me, you don't want
  57. to lose it.  Here's a brief summary:
  58.  
  59. The Basic Boot Record Format is as Follows:
  60.  
  61. Offset  Size      Contents
  62. 00 hex  3 bytes   Near jump to boot code + NOP
  63. 03      8         OEM name and version number
  64. 0B      2         Bytes per Sector          -------------------*
  65. 0D      1         Sectors per Cluster                          |
  66. 0E      2         Number of reserved sectors, starting at 0    | BIOS
  67. 10      1         Number of FAT tables                         | Parameter
  68. 11      2         Number of directory entries for root dir     | Block
  69. 13      2         Number of logical sectors per logical volume |
  70. 15      1         Media descriptor byte                        |
  71. 16      2         Number of FAT sectors     -------------------*
  72. 18      2         Sectors per track
  73. 1A      2         Number of Heads
  74. 1C      2         Number of hidden sectors
  75. 1E      416       Actual Boot Code
  76. 1BE     16        Partition Table (Hard Drives only)
  77. 1CE     50        Remaining Boot Code
  78.        ---
  79. Total: 512 bytes
  80.  
  81. The Hard Drive Partition Table itself is as follows:
  82.  
  83. Offset  Size      Name
  84. 00 hex  1 byte    Partition State [0 = InActive, 80h = Active]
  85. 01      1         Starting Head
  86. 02      2         Starting sector and cylinder
  87. 04      1         Partion Type [1=12-bit FAT, 2=16-bit FAT, 5=Extended]
  88. 05      1         Ending Head
  89. 06      2         Ending sector and cylinder
  90. 08      4         Absolute starting sector relative to disk
  91. 0C      4         Number of sectors in the partition
  92.  
  93. As you can see, this is information that you do not want to lose.  With the
  94. advent of boot sector virii (Stoned, Michelangelo etc), it is good to have
  95. a copy handy to check your physical code against.
  96.  
  97. BootCheck should not be viewed as a substitute for a good virus scanner, such
  98. as McAfee's ViruScan.  Bootcheck is intended to be a non-TSR watchdog.  Or even
  99. a utility to rebuild a damaged boot sector.  BootCheck doesn't have any built
  100. in virus detection.  It can become infected itself and never know it.  The
  101. VALIDATE codes (using McAfee's VALIDATE program) are:
  102.  
  103.                   File Name:  bootchk.exe
  104.                Size:  16,414
  105.                Date:  3-9-1992
  106. File Authentication:
  107.      Check Method 1 - 129D
  108.      Check Method 2 - 1E5E
  109.  
  110.  
  111. Testing:
  112.  
  113. I have tested BOOTCHECK under DOS 5.0 on 80286 and 80386 systems.  It has been
  114. used to successfully identify and rebuild boot sectors on hard drives (with and
  115. without extended partitions) and on floppy drives.  DO NOT USE THIS PROGRAM
  116. ON NETWORKED DRIVES!!!!!!!!!!!!!!!!!!!  IF YOU DO, I WILL NOT BE LIABLE FOR ANY
  117. DAMAGE CAUSED.
  118.  
  119.  
  120. Other Stuff:
  121.  
  122. This program is released as shareware.  Its priced at $5 for each concurrently
  123. used copy (discounts are available).  If you have any suggestions or comments,
  124. I'd REALLY like to hear those too.
  125.  
  126.                 Sincerely,
  127.  
  128.                 George Spafford
  129.                 3001 LakeShore Drive, #329
  130.                 St. Joseph, MI 49085
  131.  
  132.         Data:  (616) 468-5026  Queued Access BBS 14.4Kb USR Dual HST
  133.                                FIDOnet: 1:2340/0 NEC/NC Site.
  134.                                Sysop:  Tim Akright
  135.  
  136.         And now for the unpleasantries:
  137.  
  138.  
  139.         BOOTCHECK IS DISTRIBUTED AS IS.  THE AUTHOR (GEORGE SPAFFORD) MAKES NO
  140.         WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  141.         TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
  142.         WITH RESPECT TO THIS SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL
  143.         THE AUTHOR BE LIABLE FOR ANY DAMAGES, INCLUDING LOST PROFITS, LOST
  144.         SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  145.         OUT OF THE USE OF OR THE INABILITY TO USE THIS PROGRAM.
  146.         ----------------------------------------------------------------
  147.