home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / virus / fprot114.zip / VIRDOC.TXT < prev   
Text File  |  1990-01-06  |  9KB  |  195 lines

  1.  
  2.                          Computer Viruses: An Introduction
  3.  
  4. A very simple definition of computer viruses is:
  5.  
  6.         "A program that modifies other programs by placing a copy of 
  7.          itself inside them."
  8.  
  9. This definition is somewhat simplified, but is sufficient to show the
  10. major difference between viruses and so-called "Trojan" programs, which
  11. is that the virus replicates, but the Trojan does not.  
  12.  
  13. A Trojan is a program that pretends to do something useful (or at least
  14. interesting), but when it is run, it produces some harmful effect, like
  15. scrambling your FAT (File Allocation Table).
  16.  
  17. Viruses and Trojans may contain a "time-bomb", intended to destroy
  18. programs or data on a specific date or when some condition has been
  19. fulfilled.
  20.  
  21. A time bomb is often designed to be harmful, maybe doing something like
  22. formatting the hard disk.  Sometimes it is relatively harmless, perhaps 
  23. slowing the computer down every Friday or making a ball bounce around the
  24. screen.  However, there is really no such thing as a harmless virus.  Even if
  25. a virus has been intended to cause no damage, it may do so in certain cases,
  26. often due to the incompetence of the virus writer.  A virus may be modified,
  27. either by the original author or someone else, so that a more harmful version
  28. of it appears.  It is also possible that the modification produces a less
  29. harmful virus, but that has only rarely happened.
  30.  
  31. The damage caused by a virus may consist of the deletion of data or
  32. programs, maybe even reformatting of the hard disk, but more subtle damage
  33. is also possible.  Some viruses may modify data or introduce typing errors
  34. into text.  
  35.  
  36. Two different types of viruses occur on PCs, boot sector viruses (BSV)
  37. and program viruses.
  38.  
  39. A BSV infects the boot sector on a diskette.  Normally the boot sector
  40. contains code to load the operating system files.  The BSV replaces the
  41. original boot sector with itself and stores the original boot sector
  42. somewhere else on the diskette.  When a computer is then later booted from
  43. this diskette, the virus takes control and hides in RAM.  It will then load
  44. and execute the original boot sector, and from then on everything will
  45. be as usual.  Except, of course, that every diskette inserted in the
  46. computer will be infected with the virus, unless it is write-protected.
  47.  
  48. A BSV will usually hide at the top of memory, reducing the amount of
  49. memory that the DOS sees.  For example, a computer with 640K might appear
  50. to have only 639K.
  51.  
  52. Some BSVs are also able to infect hard disks, where the process is similar
  53. to that described above.
  54.  
  55. Program viruses, the second type of computer viruses, infect executable
  56. programs, usually .COM and .EXE files, but sometimes also overlay files.
  57. An infected program will contain a copy of the virus, usually at the end,
  58. but in some cases at the beginning of the original program.
  59.  
  60. When an infected program is run, the virus may stay resident in memory
  61. and infect every program run.  Viruses using this method to spread the
  62. infection are called "Resident Viruses".
  63.  
  64. Other viruses may search for a new file to infect, when an infected
  65. program is executed.  The virus then transfers control to the original
  66. program.  Viruses using this method to spread the infection are
  67. called "Direct Action Viruses".  It is possible for a virus to use both
  68. methods of infection.
  69.  
  70. Most viruses try to recognize existing infections, so they do not infect
  71. what has already been infected.  This makes it possible to inoculate
  72. against specific viruses, by making the "victim" appear to be infected.
  73.  
  74. In general, viruses are rather unusual programs, rather simple, but written
  75. just like any other program.  It does not take a genius to write one - any
  76. average assembly language programmer can easily do it.  Fortunately, few of
  77. them do.
  78.  
  79. Now - to correct some common misconceptions, here are a few bits of
  80. information about what viruses cannot do.
  81.  
  82.         A virus cannot spread from one type of computer to another.
  83.         For example, a virus designed to infect Macintosh computers cannot
  84.         infect PCs or vice versa.
  85.  
  86.         A virus cannot appear all by itself, it has to be written, just
  87.         like any other program.
  88.         
  89.         Not all viruses are harmful; some may only cause minor damage as
  90.         a side effect.
  91.  
  92.         A virus cannot infect a computer unless it is booted from an
  93.         infected diskette or an infected program is run on it.  Reading
  94.         data from an infected diskette cannot cause an infection.
  95.  
  96.         A write-protected diskette cannot become infected.
  97.  
  98.         There is no way a virus can attach itself to data files, so
  99.         viruses cannot be distributed with them.
  100.  
  101. The F-PROT package will provide protection against viruses, but there are
  102. other methods that also should be used.  Before I list them, I want to
  103. warn you against three methods that are of very limited use.
  104.  
  105. One anti-virus measure consists of making every executable file read-only,
  106. by issuing commands like
  107.  
  108.                         ATTRIB +R *.EXE
  109.  
  110. This is actually not a bad idea, but it will not provide much protection
  111. against viruses.  Most program viruses will remove this protection before
  112. they infect files, and restore it afterwards.  Making files read-only will
  113. of course have no effect on BSVs.  The main purpose of this method is actually
  114. to protect the user from his own mistakes, because this makes it harder to
  115. delete programs by mistake.  However, some viruses are stopped by this
  116. method, "Lehigh" and "South African" in particular.
  117.  
  118. Another method is to hide the COMMAND.COM file, by giving the following
  119. sequence of instructions:
  120.  
  121.         MKDIR C:\HIDDEN
  122.         COPY COMMAND.COM C:\HIDDEN
  123.         DEL COMMAND.COM
  124.  
  125.         add SHELL=C:\HIDDEN\COMMAND.COM /P to CONFIG.SYS
  126.         add SET COMSPEC=C:\HIDDEN\COMMAND.COM to AUTOEXEC.BAT
  127.  
  128. This method is quite useless, to say the least.  Few viruses infect
  129. COMMAND.COM, and some of them are able to do it, even if it has been
  130. hidden, using this method.
  131.  
  132. A third useless method is to change the name of COMMAND.COM and patch other
  133. programs so they use the new name.  Somebody who had only heard of the "Lehigh"
  134. virus got this "bright" idea.  Apparently he thought that all other viruses
  135. operated like it, so he wrote and distributed a program to do this
  136. automatically.  He thought it was a general cure for the virus problem, but
  137. he was wrong.
  138.  
  139. On the other hand, there are a number of ways to provide useful protection.
  140.  
  141.         Never boot a computer with a hard disk from a diskette because that
  142.         is the only way the hard disk could become infected with a BSV.
  143.  
  144.         Should you, by accident, have left a non-bootable diskette in
  145.         drive A: when you turn the computer on, the message
  146.  
  147.                         Not a system disk.
  148.  
  149.         may appear.  If this happens, turn the computer off at once.  If
  150.         the diskette was infected with a virus, it will now have infected
  151.         the computer.  It is important to note that pressing Ctrl-Alt-Del
  152.         will not be sufficient, since many viruses can survive that.
  153.  
  154.         If the computer has no hard disk, but is booted from a diskette,
  155.         you should always use the same diskette, and keep it write-protected.
  156.  
  157.         Keep good backups (more than one) of everything you do not want to
  158.         lose.  This will not only protect you from serious damage caused by
  159.         viruses, but is also necessary in the case of a serious hardware
  160.         failure.
  161.  
  162.         Keep all diskettes write-protected unless you need to write to them.
  163.         When you obtain new software on a diskette, write-protect the
  164.         diskette before you make a backup copy of it.  If it is not possible
  165.         to make a backup of the diskette, because of some idiotic
  166.         copy-protection, I do not recommend using the software.
  167.  
  168.         Be really careful regarding your sources of software.  In general,
  169.         shrink-wrapped commercial software should be "clean", but there
  170.         have been a few documented cases of infected commercial software.
  171.         Public-Domain, Freeware and Shareware packages do not have to be
  172.         any more dangerous - it all depends on the source.  If you obtain
  173.         software from a BBS, check what precautions the SysOp takes against
  174.         viruses.  If he does not screen the software made available for
  175.         downloading, you should find another source.
  176.  
  177.         Obtain Shareware, Freeware and Public-Domain software from the
  178.         original author, if at all possible.  
  179.  
  180.         Look out for any "unusual" behavior on your computer, like:
  181.  
  182.                 Does it take longer than usually to load programs ?
  183.                 Do unusual error messages appear ?
  184.                 Does the memory size seem to have decreased ?
  185.                 Do the disk lights stay on longer than they used to ?
  186.                 Do files just disappear ?
  187.  
  188. Anything like this might indicate a virus infection.
  189.  
  190. If your computer is infected with a virus - DON'T PANIC!  Sometimes a
  191. badly thought out attempt to remove a virus will do much more damage
  192. than the virus could have done.  If you are not sure what to do, leave
  193. your computer turned off until you find someone to remove the virus for
  194. you.
  195.