home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / d / ds115.zip / DISKSEC.DOC < prev    next >
Text File  |  1991-11-14  |  18KB  |  396 lines

  1.  
  2.  
  3.                           DISKSECURE  version 1.15
  4.  
  5.  
  6. Hard Disk Protection Program          Copyright (c)1990, 1991 by 
  7.                       Computer Security Plus Inc.
  8.                                           All Rights Reserved
  9.     
  10.  
  11.  
  12.  
  13.  
  14.           I  - Why low-level protection ?
  15.  
  16.          II  - What is DISKSECURE ?
  17.  
  18.         III  - How is DISKSECURE Loaded ?
  19.  
  20.          IV  - How is DISKSECURE Removed ?
  21.  
  22.           V  - Malicious Software (viruses) and DISKSECURE
  23.  
  24.          VI  - Return Codes
  25.  
  26.         VII  - Licensing 
  27.  
  28.        Appendix A  - FlopSec.EXE
  29.  
  30.      Appendix B  - Hidden Sectors
  31.  
  32.      Appendix C  - Other Files
  33.  
  34.                   I - Why Low-Level Protection ?
  35.  
  36.     Today there are many anti-viral software products available
  37. for the IBM-PC (and clone) platform running MS-DOS, OS/2, and UNIX but 
  38. nearly all are invoked following load of the operation system (usually
  39. from CONFIG.SYS or AUTOEXEC.BAT in MS-DOS).  In many cases this is too late
  40. for effective protection from common boot sector infectors (BSI) such as
  41. STONED, JOSHI, or the MUSICBUG.  In the case of the "stealth" variants,
  42. even state-of-the-art anti-virus routines such as the McAfee programs
  43. must rely on detection of a viral signature in memory rather than 
  44. detection of infected files.
  45.  
  46.     At the operating system level, many  extra programs have been piled
  47. upon the basic disk access routines to be able to reliably separate the 
  48. actions of legitimate drivers and TSRs from the activity of malicious 
  49. software.
  50.  
  51.     There is a point at which executable code may be placed that
  52. will always be executed during the boot of a hard disk when the low
  53. level activities have not yet been masked - during the execution of
  54. the partition table.  At this point the organization of a PC is defined 
  55. according to the IBM BIOS specification. In most cases this structure is
  56. impossible for malicious software to subvert without causing a detectable 
  57. change.  As of March, 1991, there are no known boot sector or partition 
  58. table viruses that can bypass detection at this level.
  59.  
  60.     Additionally, there are many access control packages available
  61. that provide strict control and full encryption of systems.  DISKSECURE
  62. does not attempt to do this, rather it is intended as a simple, unobtrusive
  63. primary access control mechanism that does not require administration,
  64. and which may be installed/removed/modified with a simple menu-driven
  65. interface.
  66.  
  67.  
  68.  
  69.                    II - What DISKSECURE Does
  70.  
  71.     Simply put, DISKSECURE replaces the partition table on
  72. a hard disk with its own code.  The necessary elements of the original
  73. partition table are stored on an unused part of the disk and presented 
  74. to the authenticated operating system as required. Unauthorized boot 
  75. programs (such as the BRAIN, STONED, or AZUSA viruses) will not be
  76. able to access the partition table as expected.
  77.  
  78.     DISKSECURE has multiple elements: three are contained in the file
  79. DISKSEC.EXE supplied with this document.  The first is an interactive
  80. installation/maintenance/removal module that allows the user to activate,
  81. change, or remove DISKSECURE from a hard disk.  The second is a replacement
  82. for the hard disk partition table that performs load-time checking, prevents
  83. DOS access to the hard disk if booted from a floppy, and contains the 
  84. password access routine if implemented.  The third element is a resident
  85. protection program that takes up 1k of RAM memory and protects the partition
  86. table, hidden sectors, and boot sector of a conventionally partitioned hard 
  87. disk.
  88.  
  89.     Once loaded, DISKSECURE will prevent access to the fixed disk from
  90. DOS if the resident portion of DISKSECURE is not in memory.  If password
  91. access has been invoked, this password must be given before DISKSECURE will
  92. become resident, allow the OS to load, and before DISKSECURE can be changed
  93. or removed. 
  94.  
  95.     Other elements of DISKSECURE include an automated installation 
  96. program  (DSINSTAL.BAT) - installation may be dome manually if desired,
  97. a program to verify proper operation of DISKSECURE (CHKSEC.EXE), and
  98. a program that will allow creation of a compliant bootable floppy disk
  99. for maintenance purposes (FLOPSEC.EXE)
  100.  
  101.  
  102.  
  103.                III - How  DISKSECURE is Loaded 
  104.  
  105.     The modification program may be loaded either from the fixed
  106. disk or from a separate, bootable floppy (recommended).  It is designed
  107. to recognize if DISKSECURE is resident, will make many checks to
  108. ensure the integrity of the program, and will warn the user of anything
  109. unusual that it finds.  
  110.  
  111.     THE DISKSEC program is invoked by executing from either the DOS 
  112. prompt (automatic installation from other OSs is not yet available) or a
  113. batch (DSINSTALL.BAT) file.  DISKSECURE will check the number of fixed 
  114. disks present and verify this with the user before proceeding.  Following 
  115. this, DISKSECURE will require the user to input a password if this 
  116. additional protection is in use before proceeding.  At this point, a 
  117. first-time user will be presented with a warning message before the menu 
  118. is presented.  The user may then select a choice from the menu (the menu 
  119. will change to accommodate the state of DISKSECURE in the system).
  120.  
  121.     During installation, the user will be asked to save the partition
  122. tables to a file (default: DSPART.COM).  This file should be copied to
  123. a known clean, bootable floppy disk.  If all else fails, the system may be
  124. booted from the floppy, and DSPART executed. Even if the disk is 
  125. unrecognizable by DOS, this will replace the partition table.  WARNING: if 
  126. this file is executed on a machine other than the original or the partition 
  127. table has been changed by repartitioning all data on the disk could be lost.
  128.  
  129.     Where multiple machines are to be protected, it is suggested that
  130. each machine have a unique and identifiable recovery disk and DSPART.DAT
  131. be renamed to identify it with each creating PC.
  132.  
  133.     Should it be necessary to repartition a disk or the operating
  134. system upgraded, it is necessary that the simple removal procedure be 
  135. followed first as DISKSECURE will trap any attempt to write to the MBR,
  136. hidden sectors, or the boot record.
  137.  
  138.     Also provided is the program CHKSEC.EXE.  This will allow the user 
  139. to check if DISKSECURE is in memory - on activation, nothing will return 
  140. if DISKSECURE is not active - the DISKSECURE logo will display if it is 
  141. active.  An errorlevel of (0) will return if DISKSECURE is not found and 
  142. (1) if DISKSECURE is resident.  
  143.  
  144.     Additionally, the program FLOPSEC.EXE will allow the user or
  145. custodian to convert an ordinary bootable floppy into one that may be
  146. used to bring up a DISKSECUREd system without the normal device drivers
  147. for maintenance or defragmentation purposes.  See Appendix B for details.  
  148.  
  149. Note: After activation, if booted from a floppy DOS will not recognize
  150.       the hard disk(s) and, if additional removable media are present,
  151.       DOS may recognize them as the C: drive.  This will not affect
  152.       the operation of DISKSEC.EXE nor will it endanger the data on the
  153.       fixed disk.  If DISKSECURE is removed, on the next boot the fixed 
  154.       disk(s) will again be recognizable by DOS from a floppy.  They will 
  155.       always be recognized when booted from a DISKSECURE floppy disk so 
  156.       long as DISKSECURE maintains validity. Should the DISKSECURE floppy
  157.       register an error, the DSPART file on the recovery disk should be 
  158.       used to restore the disk and the system should be immediately 
  159.       checked for a malicious attack.
  160.  
  161.       Use of the DSPART.DAT file as outlined above from a standard DOS
  162.       bootable floppy will recover the disk even if DOS reports the 
  163.       disk unavailable. On the next boot, the drive will be again 
  164.       accessible, however DISKSECURE will have been removed and must
  165.       be re-installed to restore protection.
  166.  
  167.  
  168.            IV - How DISKSECURE is Removed
  169.  
  170.     In the event that it is necessary to remove DISKSECURE from a PC,
  171. the best way is to utilize the DiskSec.EXE program either from the
  172. MAINTENANCE floppy, or from the c:\ds directory. When DS is resident, the
  173. program will detect this and modify the menu to include a REMOVE option. 
  174. If a password is in use, it will be necessary to provide this also.
  175.  
  176.     If the disk should become corrupt, the DSPART.COM program on the
  177. RECOVERY disk may be used for an emergency recovery of the low levels after
  178. which the machine may be rebooted and conventional recovery tools used.
  179. While effective, this should be used only as a "last resort".
  180.  
  181.           V - Malicious Software and DISKSECURE
  182.  
  183.     DISKSECURE is a software program.  Consequently, even though it 
  184. is the first software loaded from a fixed disk it CAN be infected or 
  185. damaged , should an indadvertant boot from an infected floppy disk take 
  186. place, even though DOS will not recognize the fixed disk .  Only hardware 
  187. in the form of a ROM extension or custom BIOS can prevent this.  
  188.  
  189.     What DISKSECURE can and does do is to recognize immediately 
  190. when it is loaded that an infection has occurred, display an error
  191. message as listed below, and refuse to proceed with the boot process.
  192. This information can be used by a technician and DISKSECURE booted from 
  193. a clean floppy to determine what has happened.
  194.  
  195.     Additionally, certain destructive viruses (such as AZUSA) can 
  196. destroy DISKSECURE. In this event, the disk will be unable to boot and
  197. the drive will be unrecognizable from a floppy. The use of DSPART.DAT,
  198. stored on a bootable floppy, renamed DSPART.COM, and executed will
  199. restore the partition table to a usable condition. In any event, the 
  200. attack will be immediately noticeable and containable.
  201.  
  202. DISKSECURE boot error messages:
  203.  
  204. VECTOR ERROR:   Low-level disk access is not directed to the BIOS
  205.                 (a virus or other BIOS intercept is present)
  206. LOAD ERROR:     Problem accessing the fixed disk.
  207. MATCH ERROR:    DISKSECURE has been changed or replaced in sector 1.
  208. TABLE ERROR:    Something is wrong with the original partition table.
  209.  
  210.     Additionally, some malicious software (as well as some low-level
  211. programs) may try to write to DISKSECURE protected areas on the disk.  In
  212. this case a message may appear on the screen "DISKSECURE TRAP: x" where x 
  213. indicates the trapped function.  If this should happen during a legitimate 
  214. program, DISKSECURE will have to be removed and the machine rebooted before 
  215. the program will execute properly.  
  216.  
  217.     A DISKSECURE trap will occur on an attempt to write to any of the 
  218. "hidden" sectors as well as the first partition's boot sector, or an 
  219. attempt to format any sector on the protected disk(s) (note: many OS format
  220. programs do not actually "format" the disk, only the low-level formatting
  221. such as done by programs that set the interleave of a disk may do this.  (A
  222. MS-DOS 3.3 "FORMAT" will not trigger a DISKSECURE trap until it is nearly
  223. complete and information may be lost).
  224.  
  225.     Generally, this will only occur if a program attempts to change disk 
  226. interleave, boot record/partitioning, or on complete replacement of the 
  227. operating system (Central Point Software's COMPRESS and Peter Norton's 
  228. SpeedDisk are not affected, Peter Norton's CONFIGUR and MS-DOS FDISK, are).  
  229.  
  230.     DISKSECURE cannot protect the FATs or Directory structure since 
  231. the user must be able to modify these.  Other programs such as Enigma-
  232. Logic's VIRUS-SAFE, Certus International's CERTUS, Fischer's PC-WATCHDOG, the
  233. McAfee Programs, the Dr.  Panda Utilities, Ross Greenberg's FLUSHOT, and
  234. Fridrik Skulasen's F-PROT exist for this function.  DISKSECURE was created
  235. to plug a hole that exists under the operating system so that a reasonable
  236. expectation of a clean system can be had when the "C:\>" prompt appears.  And
  237. to prevent inadvertent disclosure of information to any person with a bootable
  238. floppy.
  239.  
  240.  
  241.  
  242.                       VI - Return Codes
  243.  
  244. On termination (if not a reboot) DISKSECURE returns various error
  245. codes to indicate the reason.  These may be used by a batch file 
  246. for checking/corrective action, however DISKSECURE is primarily
  247. a manual, interactive program.
  248.  
  249. DISKSEC.EXE
  250.  
  251. user terminated codes
  252.  
  253. code (hex)
  254.  0   (0)    Program completed with no errors
  255.  1   (1)    Following warning message
  256.  2   (2)    Following TOM/COMPARE message - possible virus
  257.  3   (3)    Following number of fixed disks message
  258.  7   (7)        Following save to file request
  259.  
  260. program terminated codes
  261.  
  262. code (hex)
  263.  8   (8)    No hard disk responding
  264.  9   (9)    Disk access failure
  265. 10   (A)    No active partition table located
  266. 11   (B)    Error in sector one on disk - possible virus
  267. 12   (C)    Active partition table not in proper place - possible virus
  268. 14   (E)        No "Hidden Sectors" on disk (used early version of FDISK).
  269.         or Changing MBR (see actual error message)
  270.                 See Appendix B
  271.  
  272. CHKSEC.EXE
  273.  
  274. 0    (0)    DISKSECURE not present in memory
  275. 1    (1)        DISKSECURE present in memory
  276.  
  277.                    VII - Licensing
  278.  
  279.     DISKSECURE is copyrighted material distributed both as individual
  280. copies and on site/entity licenses. If received as SHAREWARE, the programs
  281. may be used without license, guarentee, or warrenty for fitness of any type
  282. and at the user's sole risk for a period of not more than thirty days. At 
  283. the end of that time the program may be registered through payment for a 
  284. single copy of U$25 dollars which will place the registeree on a list of
  285. approved users and entitle the user to receive support and upgrade notices.
  286.  
  287.     In the event of dissatisfaction with the product, the sole liability
  288. of Computer Security Plus shall be limited to refund of the registration fee
  289. with no additional liability implied or accepted.
  290.  
  291.             REGISTRATION
  292.  
  293. Name_________________________________________________________________
  294.  
  295.  
  296. Address______________________________________________________________
  297.  
  298.  
  299. City_________________________State or Country________________________
  300.  
  301.  
  302. Zip Code or Postal Zone________________ Telephone ___________________
  303.  
  304.  
  305. Where was product obtained from______________________________________
  306.  
  307.  
  308. Number of Personal Compuers to be registered_________________________
  309.  
  310.  
  311. Amount of Registration Fee Enclosed U$________________________________
  312. (cheque or money order payable in US dollars within the United States)
  313. Make payable to:
  314.    Computer Security Plus, POB 1203, Windermere, FL, USA, 34786
  315.  
  316.             Appendix A - FLOPSEC.EXE
  317.  
  318.     The program FLOPSEC.EXE is provided for maintenance purposes
  319. to allow the user to create a bootable floppy disk without device
  320. drivers such as disk caches that can interfere with defragmentation.  To
  321. use, simply create a bootable floppy disk (e.g.  with DOS FORMAT using the
  322. /s switch) containing the configuration and files you wish to use for
  323. maintenance.  
  324.  
  325.     Once this is done, place the un-write-protected disk in drive 
  326. A: of the system that already has DISKSECURE resident (if it is not, the 
  327. program will terminate).  Running FLOPSEC will then convert this disk
  328. from a plain bootable disk to a DISKSECURE bootable disk.  Following 
  329. successful termination, the disk should then be write protected and secured
  330. in a safe or offsite location.
  331.  
  332.     When desired, this disk may be placed in drive A: and the machine
  333. can be re-booted into the configuration defined by the floppy disk.  
  334.  
  335.     Note: all of the DISKSECURE functions are active and, if the 
  336. machine is password protected, this must be entered before the boot will 
  337. proceed, the only difference is the provision for a different CONFIG.SYS 
  338. and AUTOEXEC.BAT configuration.  
  339.  
  340.     FLOPSEC has been designed to be computable with any floppy disk 
  341. conforming to MicroSoft FORMAT specification and having a 12 bit FAT.  
  342. It has been tested with 360k & 1.2 Mb 5 1/4 and 720k & 1.44 Mb 3 1/2 inch 
  343. disks.  It should work with other conforming media but has not been further 
  344. tested.
  345.                  Appendix B - Hidden Sectors / Mutable MBR
  346.  
  347.     While all disk partitioning schemes since the release of PC-DOS
  348. 3.0 in early 1984 have aligned partitions on cylinder boundaries,  very
  349. early disk partitioning programs (e.g.  FDISK 1.00) did not perform this 
  350. alignment.  DISKSECURE relies on this alignment for installation and 
  351. protection, therefore the installation procedure verifies that no partition 
  352. violates this requirement.
  353.  
  354. Should a disk be found on the system (DISKSECURE checks all fixed disks),
  355. the installation process will terminate with the warning "No Hidden 
  356. Sectors...".  In this case, it will be necessary to repartition the disk 
  357. using a later version of the partitioning software.
  358.  
  359. Note: It is possible to be running a later version of DOS or other OS
  360.       with a disk partitioned using the early scheme so the DOS "VER"
  361.       command cannot be used to reliably test for this condition.  Peter
  362.       Norton's DI (DiskInfo) and other software will report the number 
  363.       of "hidden sectors" on a disk.  This value should be equal to the
  364.       number of sectors per track.
  365.       
  366.                         Changing MBR
  367.  
  368.     One other condition that DISKSECURE cannot cope with is that 
  369. a very small number of disk controllers write directly to the MBR at 
  370. intervals. This has only been observed on early XT hard disk units, 
  371. however the integrity of a DISKSECUREd disk's MBR must be maintained. 
  372. If discovered at load time, the installation process will issue a warning
  373. and the installation will abort. If this should occur during a boot,
  374. the  MATCH ERROR termination will occur and the recovery disk should
  375. be used to restore the disk. Re-installation should not occur until the
  376. cause (viral or otherwise) has been determined.
  377.  
  378.         Appendix C - Other files
  379.  
  380. DSINSTAL.BAT - a batch file to be used when installing DISKSECURE
  381.                from a floppy disk. It will create a directory \DS
  382.                on the C: drive, copy the files from the floppy
  383.                into that directory, patch the AUTOEXEC.BAT file
  384.                to include  verification of DISKSECURE in memory on
  385.                boot (recommended but may be omitted), and invoke
  386.                the main program for installation.
  387.  
  388. DS.B         - Batch file commands to be added to AUTOEXEC.BAT for
  389.                checking referred to in DSINSTAL.BAT
  390.  
  391. ASK.COM      - 10 byte file for making .BATch files interactive. ASK
  392.                will wait for a keystroke and return an errorlevel
  393.                that may be used by an "IF ERRORLEVEL" construct.
  394.  
  395.  
  396.