home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / virus / virus.prt < prev    next >
Internet Message Format  |  1989-03-21  |  3KB

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