home *** CD-ROM | disk | FTP | other *** search
/ The Party 1994: Try This At Home / disk_image.bin / fprot / scan.doc < prev    next >
Text File  |  1994-09-12  |  9KB  |  168 lines

  1.                 Virus scanning - how, why and when ?
  2.  
  3. F-PROT is able to find practically all known viruses, by a method known as
  4. "scanning".  This involves searching for a virus pattern, or a "search
  5. string", a sequence of bytes which is very unlikely to be found anywhere
  6. but in this particular virus.
  7.  
  8. The search strings are stored in a file named SIGN.DEF, which must be
  9. present in the current directory or the same directory as F-PROT.EXE.  The
  10. number of search strings contained in this file is not an indication of the
  11. number of viruses F-PROT is able to detect, however - as most new viruses
  12. are created by making small changes to older viruses, the same search
  13. string can often be used to detect many different viruses.
  14.  
  15.                       Secure Scan or Heuristic Analysis ?
  16.  
  17. F-PROT can use two different methods when scanning for viruses.  The first
  18. method ("Secure Scan") uses two different search strings for each virus. 
  19. It will also search in a large block of data - usually (but not always)
  20. located either at the beginning or the end of the file.  This improves the
  21. chances of detecting any virus which might have been created by modifying
  22. an older one - any change might cause a search string to be located at a
  23. different position within the virus, or it might even corrupt the string
  24. itself, but the chances of a single change invalidating both of the
  25. strings are very low.
  26.  
  27. The second method first does a "Secure Scan", and then attempts to analyse
  28. the file, using a set of rules, instead of a database of search strings. 
  29. It is still only experimental, but its purpose is to detect suspicious
  30. code.  It is not foolproof - it will not detect all viruses and may easily
  31. produce false alarms, so it should be used with care - not recommended for
  32. the casual user.  However - unlike the other method, it is not limited
  33. to existing viruses or variants of them - it is equally effective against
  34. new viruses.  For further information on this method see ANALYSE.DOC
  35.  
  36. When you select "Scan" from the initial menu, a new menu will appear,
  37. where you can select what to scan for and where to scan.
  38.  
  39. To change the setup you simply use the arrow keys to move to the option you
  40. want to change and press Enter.  A window will then appear showing the
  41. available possibilities, and you select one of them.
  42.  
  43. The first option, "Method" is uses to select which search method to use,
  44. with "Secure" as the default.
  45.  
  46. The second option, "Search" is used to select on which drives and
  47. directories F-PROT should search for viruses.  The possibilities are
  48. "Hard disk", "Diskette drive" and "Network", which should be self-explanatory,
  49. and finally "User-specified".  The last possibility applies if you only
  50. want to scan a single directory, or perhaps just a single file.  If a
  51. directory is specified, all subdirectories below it will be searched as
  52. well.  The difference between selecting "Diskette drive A:" and selecting
  53. "User-specified", and entering "A:" is that in the former case it is
  54. assumed you might want to scan multiple diskettes, so after scanning each 
  55. diskette a report is given and you are prompted for the next diskette.
  56. One note: If "Network" is selected, all network drives from C: to Z: will
  57. be searched, so if several drive letters have been mapped to the same
  58. physical directory, the same files might be scanned several times.  The
  59. default is to search the hard disk.
  60.  
  61. The third option, "Action" is used to specify what action should be taken
  62. when a virus is found.  The default operation is just to list the names of
  63. any infected files, but F-PROT can also disinfect almost all viruses.  If
  64. you want disinfection, it can either be fully automatic, or F-PROT can
  65. prompt you before it attempts to disinfect any given file. Sometimes
  66. an infection cannot be removed, for example if the virus just overwrites
  67. and destroys any file it infects, or in the case of a "first-generation"
  68. sample.
  69.  
  70. A "first-generation" sample is the author's original copy of the virus,
  71. and can only exist if the file has been obtained directly or indirectly
  72. from him.  Such samples are generally not found in the "real world", only
  73. in large virus collections.
  74.  
  75. In those cases the only effective disinfection is to delete the file.  It
  76. is always safer to delete infected programs than to disinfect, so F-PROT
  77. offers deletion as well - any infected file will first be overwritten
  78. several times (just to make sure) and then deleted.  You can select
  79. automatic deletion or have F-PROT prompt you before it deletes a file. 
  80. Finally, an infected file can be renamed, and given the extension
  81. .VOM or .VXE, so it will not be executed by accident, but you will still have
  82. it around to study.
  83.  
  84. The fourth option, "Targets" is used to select the types of viruses to
  85. search for.  Normally one would like to search for all known viruses, but
  86. in certain circumstances you might want to exclude boot sector viruses or
  87. program viruses.  For example, if you are cleaning up after an attack by
  88. a specific boot sector virus, you might not want to search for program
  89. viruses on every single diskette.  You can also instruct F-PROT to search
  90. for special user-defined search strings, but this will slow the scanning
  91. down considerably.
  92.  
  93. The fifth option, "Files" is used to select in which files F-PROT should
  94. search for viruses.  Most viruses will only infect normal executable
  95. files, (.EXE, .COM and possibly .APP and .PGM files) although some may
  96. infect overlay files (.OV?) and device driver files (.SYS) as well.  The
  97. default operation of F-PROT is just to scan those types of files, but it is
  98. also possible to select "All files" - this is advisable if you are cleaning
  99. up after a virus attack - just to make sure the virus is not hiding in some
  100. obscure overlay file.  However, as this is quite time-consuming, it is not
  101. recommended, unless you have actually found a virus when scanning just the
  102. regular executable files.  It is also possible to specify a set of file
  103. extensions - for example adding .BIN to the default list.
  104.  
  105. If any of the options are changed from their default values, F-PROT will
  106. ask if the changed values should be saved when you exit from the program.
  107. If so, a file named SETUP.F2 will be created.  This does not work if the
  108. program is run from a write-protected diskette, however.
  109.  
  110.                          Starting the virus scan
  111.  
  112. When you have selected the correct options, you may start the scanning by
  113. selecting "Begin Scan" at the top of the menu, either by moving the cursor
  114. there, or just by pressing "B".
  115.  
  116. The small window at the bottom will display the name of the last file
  117. scanned.
  118.  
  119. The scanning can be aborted at any time simply by pressing the ESC key.
  120.  
  121. When the scanning is finished, a summary is displayed.  If no viruses or
  122. suspicious programs were found, it simply says so, but otherwise a
  123. detailed listing is produced when ENTER is pressed.  This listing can be
  124. saved to a disk or sent to the printer.
  125.  
  126. This report may say that a file has been packed by a program such as 
  127. KVETCH, PGMPAK, SHRINK or CRUNCH and can not be scanned.  This is
  128. generally not a cause for alarm, although a virus can be hidden in a
  129. program by infecting it, and then running one of those file-packing
  130. programs, which create a program which will unpack itself in memory when
  131. executed.  Some virus writers use this method to distribute their viruses,
  132. but generally this only works for the first generation - second (and
  133. later) generation samples of the same virus will not be packed.  F-PROT
  134. can scan inside most PKLITE, LZEXE, ICE, DIET and EXEPACK compressed files,
  135. and support for the remaining compression program will be added in the near
  136. future, if necessary.  Please keep in mind that if a file is infected after
  137. compression, the virus is always detected normally.  Finally, F-PROT will
  138. not scan inside self-unpacking archives, or .ZIP, .ARJ or similar files.
  139. We will add this feature in the future, but currently you have to unpack
  140. those files and scan the individual files.
  141.  
  142.  
  143.                           A note on disinfection
  144.  
  145. When a file has been disinfected it has usually been restored to its
  146. original state before infection.  In many cases the disinfected program
  147. will have 1-16 additional garbage bytes at the end.  Those bytes are added
  148. by viruses, in order to make the length of the program a multiple of 16
  149. bytes, before infection.  As the number of those extra bytes cannot be
  150. determined, they cannot be removed.  Normally they will not have any effect,
  151. unless the program checks its current length.  In those cases it will
  152. report an incorrect length after disinfection, and will have to be restored
  153. from a backup.
  154.  
  155.                         Skipping the memory scan
  156.  
  157. Normally F-PROT will search the memory for viruses, and refuse to
  158. operate if any search strings are found in memory.  However, a false alarm
  159. is possible, for example if an infected file has just been copied, and
  160. portions of it are in an unused disk buffer.   A false positive can also
  161. happen if you have run another, incompatible anti-virus program before,
  162. that does not encrypt its search strings.  Most anti-virus programs are
  163. well-behaved in this respect, and only MSAV and CPAV cause this problem
  164. regularly.
  165.  
  166. To skip the memory scan, run the program with the /NOMEM command-line
  167. switch.  
  168.