home *** CD-ROM | disk | FTP | other *** search
/ PC Joker 1999 January / PCJ0199CD2.iso / GOODIES / F-PROT / VIRUS.TXT < prev    next >
Text File  |  1998-04-24  |  11KB  |  224 lines

  1.                          Computer Viruses: An Introduction
  2.  
  3. What is a computer virus ?
  4.  
  5. Well, the best definition we have been able to come up with is the
  6. following:
  7.  
  8.    #1 A virus is a program that is able to replicate, that is create
  9.       (possibly modified) copies of itself.
  10.  
  11.    #2 The replication is intentional, not just a side-effect.  
  12.  
  13.    #3 At least some of replicants in turn are also viruses by the same
  14.       definition.
  15.  
  16.    #4 A virus has to attach itself to a "host", in the sense that
  17.       execution of the host implies execution of the virus.  
  18.  
  19. #1 distinguishes viruses from non-replicating malware, such as ANSI bombs.
  20.  
  21. #2 distinguishes between viruses and programs such as DISKCOPY.COM
  22. that can replicate.
  23.  
  24. #3 is needed to exclude certain "intended viruses", that attempt to
  25. replicate, but fail - they simply do not qualify as "real" viruses.
  26.  
  27. #4 is necessary to distinguish between viruses and worms, which do not
  28. require a host.
  29.  
  30. A Trojan is a program that pretends to do something useful (or at least
  31. interesting), but when it is run, it may have some harmful effect, like
  32. scrambling your FAT (File Allocation Table), formatting the hard disk or
  33. releasing a virus.
  34.  
  35. Viruses and Trojans may contain a "time-bomb", intended to destroy
  36. programs or data on a specific date or when some condition has been
  37. fulfilled.
  38.  
  39. A time bomb is often designed to be harmful, maybe doing something like
  40. formatting the hard disk.  Sometimes it is relatively harmless, perhaps 
  41. slowing the computer down every Friday or making a ball bounce around the
  42. screen.  However, there is really no such thing as a harmless virus.  Even if
  43. a virus has been intended to cause no damage, it may do so in certain cases,
  44. often due to the incompetence of the virus writer or unexpected hardware
  45. or software revisions.
  46.  
  47. A virus may be modified, either by the original author or someone else, so
  48. that a more harmful version of it appears.  It is also possible that the
  49. modification produces a less harmful virus, but that has only rarely
  50. happened.
  51.  
  52. The damage caused by a virus may consist of the deletion of data or
  53. programs, maybe even reformatting of the hard disk, but more subtle damage
  54. is also possible.  Some viruses may modify data or introduce typing errors
  55. into text.  Other viruses may have no intentional effects other than just
  56. replicating.
  57.  
  58. The major groups of viruses on PCs are boot sector viruses (BSV), program
  59. viruses and application viruses.
  60.  
  61. A BSV infects boot sectors on diskettes and/or hard disks.  On diskettes, 
  62. the boot sector normally contains code to load the operating system files. 
  63. The BSV replaces the original boot sector with itself and stores the
  64. original boot sector somewhere else on the diskette or simply replaces it
  65. totally.  When a computer is then later booted from this diskette, the
  66. virus takes control and hides in RAM.  It will then load and execute the
  67. original boot sector, and from then on everything will be as usual. 
  68. Except, of course, that every diskette inserted in the computer will be
  69. infected with the virus, unless it is write-protected.
  70.  
  71. A BSV will usually hide at the top of memory, reducing the amount of
  72. memory that the DOS sees.  For example, a computer with 640K might appear
  73. to have only 639K.
  74.  
  75. Most BSVs are also able to infect hard disks, where the process is similar
  76. to that described above, although they usually infect the master boot
  77. record instead of the DOS boot record.
  78.  
  79. Program viruses, the second type of computer viruses, infect executable
  80. programs, usually .COM and .EXE files, but they sometimes also infect
  81. overlay files, device drivers or even object files.
  82.  
  83. An infected program will contain a copy of the virus, usually at the end,
  84. in some cases at the beginning of the original program, and in a few cases
  85. the virus is inserted in the middle of the original program.
  86.  
  87. When an infected program is run, the virus may stay resident in memory
  88. and infect every program run.  Viruses using this method to spread the
  89. infection are called "Resident Viruses".
  90.  
  91. Other viruses may search for a new file to infect, when an infected
  92. program is executed.  The virus then transfers control to the original
  93. program.  Viruses using this method to spread the infection are
  94. called "Direct Action Viruses".  It is possible for a virus to use both
  95. methods of infection.
  96.  
  97. Most viruses try to recognize existing infections, so they do not infect
  98. what has already been infected.  This makes it possible to inoculate
  99. against specific viruses, by making the "victim" appear to be infected.
  100. However, this method is useless as a general defense, as it is not 
  101. possible to inoculate the same program against multiple viruses.
  102.  
  103. The third type of viruses are application viruses, which do not infect
  104. normal programs, but instead spread as "macros" in various types of files,
  105. typically word-processor documents or spreadsheets.  This type of viruses
  106. can easily spread through E-mail, when users unknowingly exchange infected
  107. documents.
  108.  
  109. In general, viruses are just program - rather unusual programs perhaps,
  110. but written just like any other program.  It does not take a genius to
  111. write one - many ten year old kids can easily create viruses.
  112.  
  113. Now - to correct some common misconceptions, here are a few bits of
  114. information about what viruses cannot do.
  115.  
  116.         A virus cannot appear all by itself, it has to be written, just
  117.         like any other program.
  118.         
  119.         Not all viruses are intentionally harmful - some may only cause
  120.         minor damage as a side effect - however, there is no such thing
  121.         as a "harmless" virus.
  122.  
  123.         Reading plain data from an infected diskette cannot cause an
  124.         infection.  (However, it is not trivial to determine what
  125.         "plain data" is)
  126.  
  127.         A write-protected diskette cannot become infected, if the
  128.         hardware is working properly.
  129.  
  130. It used to be the case that a virus could not infect a computer unless it
  131. was booted from an infected diskette or an infected program was run on it,
  132. but alas, this is no longer true.  It is possible for a virus infection to
  133. spread, just by the act of reading an infected Microsoft Word document,
  134. for example, or through use of Lotus Notes, to name two well-known
  135. applications.
  136.  
  137. It also used to be the case that a virus could not infect data files or
  138. spread from one type of computer to another - a virus designed to infect
  139. Macintosh computers could not infect PCs or vice versa, but with the
  140. appearance of application viruses this has changed as well - there are now
  141. a few viruses that can infect WinWord as well as MacWord.
  142.  
  143. Apart from using anti-virus programs, there are several ways to protect
  144. your computer from viruses:
  145.  
  146.         Rule #1 is: MAKE BACKUPS!!!  Keep good backups (more than one) of
  147.         everything you do not want to lose.  This will not only protect you
  148.         from serious damage caused by viruses, but is also necessary in the
  149.         case of a serious hardware failure.
  150.  
  151.         Never boot a computer with a hard disk from a diskette because that
  152.         is the only way the hard disk could become infected with a boot
  153.         sector virus.  (Well, strictly speaking, it can happen if you run
  154.         a "dropper" program too, but that happens extremely rarely).
  155.  
  156.         If your BIOS allows you to change the boot sequence to "C: A:",
  157.         do it. This will give you very good protection against boot
  158.         sector virus infections.
  159.  
  160.         Should you, by accident, have left a non-bootable diskette in
  161.         drive A: when you turn the computer on, the message
  162.  
  163.                         Not a system disk.
  164.  
  165.         may appear.  If the diskette was infected with a virus, it will now
  166.         be active, but may not have infected the hard disk yet (Most
  167.         boot sector viruses will do it right away, however).  If this
  168.         happens, remove the diskette from the A: drive and turn the computer
  169.         off (or press the reset button).  It is important to note that
  170.         pressing Ctrl-Alt-Del is not sufficient, as a few viruses can
  171.         survive that.
  172.  
  173.         Keep all diskettes write-protected unless you need to write to them.
  174.         When you obtain new software on a diskette, write-protect the
  175.         diskette before you make a backup copy of it.  If it is not possible
  176.         to make a backup of the diskette, because of some idiotic
  177.         copy-protection, I do not recommend using the software.
  178.  
  179.         Be really careful regarding your sources of software.  In general,
  180.         shrink-wrapped commercial software should be "clean", but there
  181.         have been a few documented cases of infected commercial software
  182.         and even Microsoft has occasionally distributed infected files.
  183.         Public-Domain, Freeware and Shareware packages do not have to be
  184.         any more dangerous than "regular" commercial programs - it all
  185.         depends on the source.  If you obtain software from a BBS, check
  186.         what precautions the SysOp takes against viruses.  If he does not
  187.         screen the software made available for downloading, you should find
  188.         another source.
  189.  
  190.         Check all new software for infection before you run it for the
  191.         first time.  It may even be advisable to use a couple of scanners
  192.         from different manufacturers, as no single scanner is able to
  193.         detect all viruses.
  194.  
  195.         Obtain Shareware, Freeware and Public-Domain software from the
  196.         original author or reliable distribution sites, if at all possible.  
  197.  
  198.         Look out for any "unusual" behavior on your computer, like:
  199.  
  200.                 Does it take longer than usually to load programs ?
  201.                 Do unusual error messages appear ?
  202.                 Does the memory size seem to have decreased ?
  203.                 Do the disk lights stay on longer than they used to ?
  204.                 Do files just disappear ?
  205.  
  206. Anything like this might indicate a virus infection (or just that Windows
  207. is misbehaving).
  208.  
  209. If your computer is infected with a virus - DON'T PANIC!  Sometimes a
  210. badly thought out attempt to remove a virus will do much more damage
  211. than the virus could have done.  If you are not sure what to do, leave
  212. your computer turned off until you find someone to remove the virus for
  213. you.
  214.  
  215. Finally, remember that some viruses may interfere with the disinfection
  216. operation if they are active in memory at that time, so before attempting
  217. to disinfect you MUST boot the computer from a CLEAN system diskette -
  218. preferaply one that has been kept write-protected since it was originally
  219. created.
  220.  
  221. It is also a good idea to boot from a clean system diskette before
  222. scanning for viruses, as several "stealth" viruses are very difficult do
  223. detect if they are active in memory during virus scanning.
  224.