home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
VIRUS
/
BOOTCHK1.ZIP
/
BOOTCHK1.DOC
< prev
next >
Wrap
Text File
|
1992-03-10
|
6KB
|
147 lines
Program: BootCheck
Version: 1.0
Date: 03/10/92
Author: George Spafford
Purpose:
To store a copy of a boot sector in a data file and then to compare this
data file to the phsical boot sector at each boot. If a change occurs, the
program will notify the user and ask if the data file should be used to rebuild
the boot sector.
NOTE: IF YOU USE THIS PROGRAM AS A VIRUS GUARD, MAKE SURE THAT YOU KNOW THE
BOOT SECTOR IS CLEAN BEFORE YOU RUN THIS PROGRAM. OTHERWISE YOU WILL
NOT STORE THE VALID BOOT SECTOR AND MAY IN FACT COPY THE VIRUS.
Procedure:
BOOTCHK should be one of the first programs run in your AUTOEXEC.BAT file if you
want it to check the sector each time the computer is started. BOOTCHK does
have several parameters:
BOOTCHK /D:d /L:log.DAT /C
/D:d Here, "d" is the drive that you want to check.
The current drive is the default value.
/L:log.dat log.dat is the name of the data file that you are using
for the drive.
BOOTCHK.DAT is the default value.
/C Instructs the program to build the data file.
To store the boot sector for C:
BOOTCHK /C
This will create the image of the sector in the BOOTCHK.DAT data file.
To store the boot sector for D:
BOOTCHK /D:D /L:D_DRIVE.DAT
This will make the image of drive D's boot sector in the D_DRIVE.DAT
data file.
DO NOT USE THIS PROGRAM ON NETWORK DRIVES!!!!!!!!!!!!!!!!!
and
DO NOT USE THIS PROGRAM WITH A DOS LOWER THAN VERSION 3.2.
How it's done:
BOOTCHK accesses absolute sectors by doing absolute reads and writes at the
sector level. The program assumes that the sector will be 512 bytes and then
takes it from there. What's your boot sector you say? Trust me, you don't want
to lose it. Here's a brief summary:
The Basic Boot Record Format is as Follows:
Offset Size Contents
00 hex 3 bytes Near jump to boot code + NOP
03 8 OEM name and version number
0B 2 Bytes per Sector -------------------*
0D 1 Sectors per Cluster |
0E 2 Number of reserved sectors, starting at 0 | BIOS
10 1 Number of FAT tables | Parameter
11 2 Number of directory entries for root dir | Block
13 2 Number of logical sectors per logical volume |
15 1 Media descriptor byte |
16 2 Number of FAT sectors -------------------*
18 2 Sectors per track
1A 2 Number of Heads
1C 2 Number of hidden sectors
1E 416 Actual Boot Code
1BE 16 Partition Table (Hard Drives only)
1CE 50 Remaining Boot Code
---
Total: 512 bytes
The Hard Drive Partition Table itself is as follows:
Offset Size Name
00 hex 1 byte Partition State [0 = InActive, 80h = Active]
01 1 Starting Head
02 2 Starting sector and cylinder
04 1 Partion Type [1=12-bit FAT, 2=16-bit FAT, 5=Extended]
05 1 Ending Head
06 2 Ending sector and cylinder
08 4 Absolute starting sector relative to disk
0C 4 Number of sectors in the partition
As you can see, this is information that you do not want to lose. With the
advent of boot sector virii (Stoned, Michelangelo etc), it is good to have
a copy handy to check your physical code against.
BootCheck should not be viewed as a substitute for a good virus scanner, such
as McAfee's ViruScan. Bootcheck is intended to be a non-TSR watchdog. Or even
a utility to rebuild a damaged boot sector. BootCheck doesn't have any built
in virus detection. It can become infected itself and never know it. The
VALIDATE codes (using McAfee's VALIDATE program) are:
File Name: bootchk.exe
Size: 16,414
Date: 3-9-1992
File Authentication:
Check Method 1 - 129D
Check Method 2 - 1E5E
Testing:
I have tested BOOTCHECK under DOS 5.0 on 80286 and 80386 systems. It has been
used to successfully identify and rebuild boot sectors on hard drives (with and
without extended partitions) and on floppy drives. DO NOT USE THIS PROGRAM
ON NETWORKED DRIVES!!!!!!!!!!!!!!!!!!! IF YOU DO, I WILL NOT BE LIABLE FOR ANY
DAMAGE CAUSED.
Other Stuff:
This program is released as shareware. Its priced at $5 for each concurrently
used copy (discounts are available). If you have any suggestions or comments,
I'd REALLY like to hear those too.
Sincerely,
George Spafford
3001 LakeShore Drive, #329
St. Joseph, MI 49085
Data: (616) 468-5026 Queued Access BBS 14.4Kb USR Dual HST
FIDOnet: 1:2340/0 NEC/NC Site.
Sysop: Tim Akright
And now for the unpleasantries:
BOOTCHECK IS DISTRIBUTED AS IS. THE AUTHOR (GEORGE SPAFFORD) MAKES NO
WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
WITH RESPECT TO THIS SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY DAMAGES, INCLUDING LOST PROFITS, LOST
SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OF OR THE INABILITY TO USE THIS PROGRAM.
----------------------------------------------------------------