home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / virus / viruspro.inf < prev    next >
Internet Message Format  |  1994-03-07  |  3KB

  1. Date: Sunday, 19 March 1989  17:18-MST
  2. From: dhesi at bsu-cs.bsu.edu (Rahul Dhesi)
  3. Newsgroups: comp.sys.ibm.pc
  4. Re:   Boot-time anti-viral measures
  5.  
  6.          HOW TO PROTECT YOUR MS-DOS MICROCOMPUTER FROM VIRUSES
  7.  
  8. My method is simple, and guarantees that when my system boots there is
  9. no virus active.  It doesn't guarantee that a virus won't get activated
  10. later when I execute a user program.
  11.  
  12. 1. Always boot from a floppy disk.  Keep this floppy disk write-
  13. protected.  A virus can do *absolutely nothing* to override a
  14. write-protect tab on a floppy disk unless the drive is defective.  On
  15. the boot disk, have a clean copy of the operating system copied from
  16. your original MS-DOS distribution disk.  My CONFIG.SYS file on the
  17. floppy looks contains this line:
  18.  
  19.    shell = c:\COMMAND.COM c:\ /e:2000 /p
  20.  
  21. This tells MS-DOS to always load the command interpreter from drive C:
  22. from now on, so that after the boot is completed, I won't need the boot
  23. disk in drive A: any more.  (It also increases the available
  24. environment space at the same time, something you probably need to do
  25. anyway.)  This didn't work properly with MS-DOS 2.x, but it does work
  26. with MS-DOS 3.x.
  27.  
  28. 2.   In autoexec.bat on drive A:, I have lines like this:
  29.  
  30.      c:
  31.      bincmp /COMMAND.COM /bin/XXXXX.COM
  32.  
  33. The first line changes the current drive to C:.  The second runs a
  34. program that does a straight byte-by-byte comparison of the files
  35. /COMMAND.COM and /bin/XXXXX.COM (which is just an extra copy of
  36. COMMAND.COM) and reports any discrepancy.  It takes but an instant.
  37. (By the way, I have changed the names to "bincmp" and "/bin/XXXXX.COM"
  38. so no virus author can recognize them easily and write a virus to
  39. attack them.  Even if somebody did, I would know by simply checking to
  40. make sure XXXXX.COM had not changed relative to COMMAND.COM on the boot
  41. disk.)
  42.  
  43. So long as the boot disk and COMMAND.COM on drive C: are not corrupted,
  44. there is no virus active at boot time.  I don't care about the system
  45. files (IBMDOS.COM and IBMBIO.COM) on drive C: because they are not used
  46. at all.
  47.  
  48. If COMMAND.COM ever changes, bincmp will report an error unless the
  49. virus was smart enough to figure out which the file /bin/XXXXX.COM was
  50. and changed it identically, or if it was smart enough to figure out
  51. which the bincmp program was and change that.  This is very, very
  52. unlikely.
  53.  
  54. Keeping the system immune to a virus *after* you boot is harder, since
  55. you may execute programs that have a virus attached to them.  But if I
  56. ever suspect something fishy is active in memory I simply have to
  57. switch the system off and back on and I know it's not in memory any
  58. more.
  59.  
  60. P.S.  I set my switchar to -, so I can use / in pathnames.  If you
  61. don't do this, just use \ instead in pathnames.
  62. --
  63. Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee}!bsu-cs!dhesi
  64.                     ARPA:  dhesi@bsu-cs.bsu.edu
  65.