BOOTCHK, BOOTRST                                          01/05/1996
  - boot sector archival, verification, restoration
===================================================

(c) Copyright 1995 by Bryan L. Leaman. All rights reserved.


Disclaimer
----------
   BootChk and BootRst are provided "AS-IS" with no warranty or guarantee 
that they will work as expected or that it is appropriate for your specific
needs. You only have my assurance that they work for me as I intended
and to my knowledge have not caused any ill effects as of the writing of 
this documentation.


Licensing
---------
   Anyone and everyone is hereby granted the right to use and/or
distribute BOOTCHK.EXE, BOOTRST.EXE and their source code 
(BOOTCHK.C, BOOTRST.C) provided they follow these guidelines:
   1. The BOOTCHK.EXE and BOOTRST.EXE programs must retain their 
      original copyright notices.
   2. BOOTCHK.EXE, BOOTRST.EXE, BOOTCHK.C and BOOTRST.C must remain 
      unchanged in any way except by the original author. If the programs 
      are distributed, the original source and this documentation must 
      be distributed with them in their original form.
   3. If you use all or part of the BOOTCHK.C or BOOTRST.C source code 
      in your own program and that program performs a similar function to 
      BOOTCHK and/or BOOTRST, you must include the following copyright 
      notice on program startup and in the documentation:
      Portions (c) copyright 1995 by Bryan L. Leaman. All rights reserved.
   4. You may not place a virus, trojan or other damaging code into the
      program or create a new version of the program with any virus,
      trojan or other damaging code in it.
   5. You may not charge any fee for the distribution of the program or
      its source code, or for any program you create that performs a
      similar function and includes code from this program without 
      explicit permission from the author of this program.


Now that that's out of the way...


Overview
--------
   BOOTCHK and BOOTRST are DOS-based programs that help protect your
computer from damaging viruses and trojans. They do not reduce the
need for a comprehensive virus detection program nor regular backups.
   
   BOOTCHK takes two parameters: the drive you boot from and a file
name to create or compare to. If the file exists, BOOTCHK will compare
your current boot sector with the file and report any differences. If the
file does not exist, BOOTCHK will create it as a backup of your boot
sector.
   A typical example of how to use the program is:
	d:path\> bootchk c: a:SAVE.MBR
   BOOTCHK does not attempt to get around stealth virus techniques.
Creating the backup boot sector while the hard disk if virus-free is
essential! (Note that some (very few) implementations of MS-DOS do
legitimately modify the boot sector. If BOOTCHK reports a change, use
a good virus detection package immediately.)

   BOOTRST was born out of necessity. At work we've been pummeled by
a virus known as NYB or Gneb. It has recurred numerous times. We weren't
using virus detection software regularly on a large scale, so a few
computer were "hit." When NYB strikes, it wipes out the boot drive's
partition table, rendering it unusable until it is re-partitioned and
re-formatted, thus eliminating ALL data on the drive. Our attempts to
repair the damage with the leading disk repair package helped in some
cases, but was time consuming and unpredictable.
   BOOTRST will read a file that was created with BOOTCHK and restore
all or part of the boot sector back on the hard drive. 
** ONLY RESTORE TO THE DRIVE THE FILE WAS ORIGINALLY CREATED FROM! **
BOOTRST takes two parameters and a series of "flags" that indicate which
parts of the boot sector need to be restored.
   This program has enabled me to resurrect PCs at work in a matter of 
a few seconds after the NYB virus has struck. We now keep copies of 
most of our employees' boot sectors on diskettes with the programs in
case of another outbreak of NYB or a similar virus.
   
   A typical example of how to use the program is:
       d:\path> bootrst a:saved.mbr C: /PARTITION
 -or-  d:\path> bootrst a:saved.mbr C: /ALL
The first of these will only restore the partition table. The second will
restore the entire boot sector. The valid boot sector sections are:
/JUMP /OEM /BIOS /FORMAT /CODE /PARTITION /ALL
Only the first character need be provided (e.g. bootrst save.mbr c: /a).


   BOTH programs will give an overview of their function, syntax and a
valid parameters listing if executed with no parameters or the wrong
number of parameters.


Enjoy!


Who am I / How to contact me
----------------------------

mailing address:
   Bryan L. Leaman
   5854 Sunland St. NE
   Louisville, OH 44641

e-mail:
   blleaman@aol.com

I am a programmer/analyst for Akro Corporation, Inc. of Canton, Ohio,
a division of Collins & Aikman, based in Charlotte, NC. I work on an
IBM AS/400 in RPG, CL and MI (Machine Interface). I dabble in C at
home and hope to soon work with Delphi for Windows (TM) programming.



Windows (TM) is a trademark of Microsoft Corporation.
