home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / CHECK15.ZIP / CHECK.DOC next >
Text File  |  1995-06-06  |  12KB  |  324 lines

  1.  
  2.  
  3.  
  4.                              CHECK version 1.5
  5.                - integrity checker -   
  6.                 Copyright (c) 1995, Venzislav Iliev      
  7.                        
  8.               Please read carefully before installing.
  9.  
  10.  
  11.  
  12.     Contents:
  13.  
  14.     1.INTRODUCTION
  15.     2.EASY INSTALLATION
  16.     3.CUSTOM INSTALLATION
  17.     4.USAGE
  18.     5.OPTIONS
  19.     6.EXAMPLES
  20.     7.REPAIR MANUAL
  21.  
  22.  
  23.         
  24.     1.INTRODUCTION:
  25.     CHECK is an utility which can help detecting viruses. It's
  26.     not a virus scanner -  it will not scan for viruses in the
  27.     memory or on  the disks. It  will try to detect suspisious
  28.     things like modified memory,files, boot records,interrupts,
  29.     etc. instead.
  30.  
  31.     CHECK is not a replacement for a virus scanner- you should
  32.     use a good scanner too.
  33.  
  34.     CHECK tests the integrity of the:
  35.  
  36.         Master Boot Record
  37.         Partition Tables
  38.         Boot Sectors
  39.         Interrupts
  40.         Memory
  41.         Upper Memory
  42.         BIOS
  43.         CMOS
  44.         Files (CRC and code checks)
  45.  
  46.  
  47.                 
  48.     2.EASY INSTALLATION:
  49.     For easy installation use the script INSTALL.BAT. You must
  50.     specify  path for the data files  and all your hard drives
  51.     on the command line,  then  reboot  your  computer and run
  52.     INSTALL.BAT again with the same command line. Example:
  53.         INSTALL c:\tmp\chkdata c: d:
  54.     This will place CHECK at the end of your AUTOEXEC.BAT.
  55.     
  56.     It's a good idea to make a CHECK boot disk as well and use
  57.     it to check your computer from time to time.This is needed
  58.     to improve  security  against stealth viruses which can be
  59.     detected only after clean boot. To create such disk make a
  60.     new system disk (use "format a:", "sys a:" ) and then  use
  61.     MAKEBOOT.BAT. You must specify all your hard drives on the
  62.     command line. Example:
  63.         MAKEBOOT c: d:
  64.     Using  such  a  boot  disk  together  with  CHECK  in your
  65.     AUTOEXEC.BAT  will  almost  sure  detect  the  presence of
  66.     viruses (no matter if  known or unknown)  and  you will be
  67.     able  to  recover your system  using  REPAIR  without  any
  68.     troubles.  If  you  have backups of all your files as well
  69.     you don't have to bother about the most viruses anymore. 
  70.  
  71.  
  72.     3.CUSTOM INSTALLATION:
  73.     The /Sx options  are the install options which will store
  74.     values to the data files.  You can  specify filenames for
  75.     the data files, or use the default names.
  76.     
  77.     The default installation  will  not include validating of
  78.     all your executables  -  you may wish to place such check
  79.     in your AUTOEXEC.BAT,  or  perform it manually  from  the
  80.     command line  from  time to time (I do not recommend that
  81.     you do that every time  you boot your computer because it
  82.     could be time consuming).
  83.  
  84.  
  85.     
  86.     4.USAGE:
  87.     check [options] [drives] ...
  88.     
  89.     Typing just 'check' or 'check /?' will display short usage
  90.     info.
  91.  
  92.  
  93.     
  94.     5.OPTIONS:
  95.     Here is a full list of all CHECK options. You can omit the
  96.     filenames - default filenames will be used instead.
  97.  
  98.     
  99.     /SI [file]    - save all interrupt vectors.                INTERRUPTS
  100.     /I  [file]      - compare  the  interrupt  vectors  to  the
  101.                       saved ones.
  102.     Depending  on the current configuration these values may be
  103.     different - but if you  run  CHECK always at the same place
  104.     in your    AUTOEXEC.BAT they must be always the same.  
  105.     
  106.     
  107.     /SO [file]      - save the BIOS data area.                   BIOS
  108.     /O  [file]      - compare the BIOS data area  to  the saved
  109.                       one.
  110.     The BIOS data area contains system information - it depends
  111.     again  on  the installed drivers,  other resident programs, 
  112.     etc. Not the whole BIOS data area will be checked  -  there 
  113.     is data used by the timer, display, etc. - these values are 
  114.     always different.
  115.         
  116.                 
  117.     /SC [file]      - save the CMOS.                             CMOS
  118.     /C  [file]      - compare the CMOS to the saved one.
  119.     
  120.     The CMOS is the battery powered storage. If the check fails
  121.     it's probably due to batteries powerdown, but a few viruses
  122.     can destroy the CMOS contents or use it to store data.
  123.     
  124.     
  125.     /SB [file]      - save the boot sector.                      BOOTSECTOR
  126.     /B  [file]      - compare the boot sector to the saved one.
  127.     
  128.     If CHECK detects that a boot sector was modified, it's  al-
  129.     most sure that a virus infection has occured. Use REPAIR to
  130.     remove the virus.
  131.     
  132.     
  133.     /SV [file]      - save checksums for the files on  the spe-  VALIDATE 
  134.                       cified drives.
  135.     /V  [file]      - compare the checksums for each validated
  136.                       file on the spec. drives
  137.     
  138.     It will detect modified files.
  139.     CHECK uses CRC algorithms for checksums. It  uses the same
  140.     polynoms as  the  McAfee VALIDATE and SCANV programs. Many
  141.     thanks to  Gary P. Mussar for the algorithms. The data  is
  142.     stored  in a text file, so you can view it simply  -  each
  143.     line  in  the file  consists  of  the filename,  the  both
  144.     checksums and the filesize.
  145.     
  146.  
  147.     /SJ [file]    - save some code information for the files  CODE CHECK
  148.                       on the specified drives
  149.     /J  [file]    - check the code of  the filenames  in the
  150.                       specified file
  151.     It will detect modifications in files.A virus cannot exist
  152.     without certain instructions - this option checks the code
  153.     of the executables for certain modified / new instructions.
  154.     This method is not as reliable as the validation, but it's
  155.     much faster and  gives you additional security.  Note that
  156.     this method will  discover viruses,  but possibly not dest-
  157.     royed or modified data.  Also,  note that unlike the /V op-
  158.     tion the /J option  doesn't require drives  to follow.  It
  159.     will just check the files on the drives you specified with
  160.     the /SJ option.
  161.     
  162.                              
  163.     /SR  [file]    - save the MBR of the default disk (0)      MBR 
  164.     /R   [file]    - compare the MBR to the saved one
  165.         /SR0 [file]    - same as SR0
  166.     /SR1 [file]    - same as /SR0 but for disk 1
  167.     /R1  [file]    - same as /R0 but for disk 1
  168.     
  169.     The MBR is the Master Boot Record  of your harddisk. Each
  170.     physical harddisk has only one MBR.  The MBR contains the
  171.     code to load the boot sector of the active (the bootable)
  172.     partition and the partition table. There can be more than
  173.     one partition table on your harddisk if you have extended
  174.     partitions. CHECK will save all partition tables, but you
  175.     should have only one  extended  partition  per  partition
  176.     table- the dos command FDISK will NOT allow you to create
  177.     second extended partition in the same table,  but theore- 
  178.         tically  it's possible  (suggest  -  another partitioning
  179.     programs, directly created with disk editor, ...).
  180.     
  181.                   
  182.     /SM [file]    - save the memory map                        MEMORY
  183.     /M  [file]      - compare...
  184.     
  185.     You  should  run  CHECK  with  this  option always at the
  186.     same  place.  When  you use /SM or if  the  memory map is
  187.     modified the map will be displayed - it has the following
  188.     format:
  189.     
  190.     Block Type Owner  Owner's-PSP   Env  Size       Name
  191.      xxxx  X   XXXX   (PSP xxxx:0)  Env  xxx bytes  nnnnnn
  192.     
  193.     Block is the segment address of a block, type should be
  194.     M or Z (Z means last block),  owner shows who owns this  
  195.     block, env shows if the block is used for program envi-
  196.     ronment, name is the name of the program taken from the
  197.     environment - note that programs are free to modify the
  198.     environment, so don't relay on this name.  Also, if you
  199.     start  a  protected mode application (like QEMM386)  it
  200.     could destroy the environment of some resident programs
  201.     (I  don't  know the reason for that),  and  COMMAND.COM
  202.     doesn't have a name.
  203.     
  204.     If you use an EMS-manager (such as EMM386.EXE) you will
  205.     see total amount of memory 16 bytes less than 640K  -
  206.     that's because the first UMB starts at 9FFF:0 (16 bytes
  207.     before the 640K limit).
  208.     If you don't use EMS  the total amount of memory should
  209.     be exactly 640K (655360 bytes).
  210.         
  211.     
  212.     /SU [file]      - save the upper memory map                  UPPER
  213.     /U  [file]      - compare...                                 MEMORY
  214.     
  215.     Just like /SM and /M but for the upper memory  (640K to
  216.     1 MB). Note that you need a driver (such as EMM386.EXE)
  217.     to use UMBs (upper memory blocks).  Without such driver
  218.     CHECK /SU and CHECK /U won't work.
  219.       
  220.     
  221.     /SD        - same as using the options /SR /SB /SI
  222.                       /SM /SO /SC
  223.     /D        - same as using the options /R /B /I /M
  224.               /O /C          
  225.     Some  important  files  like command.com and the system
  226.     drivers will be validated/checked as well.
  227.  
  228.  
  229.     /N        - warn about new files which are not
  230.               checked.
  231.     /A        - validate/check all files (not only the
  232.               executables). You shouldn't need that.
  233.     /L [file]    - log to file (write report).
  234.  
  235.                          
  236.     6.EXAMPLES:
  237.     The following will use the directory c:\tmp\check for the
  238.     default data files, will create a logfile in the same dir
  239.     named DDMMhhmm.LOG (day, month, hour, min) and will store
  240.     the MBR of the physical disk 0 and the bootsectors of the
  241.     logical drives C: and D: in default files:
  242.         CHECK /W c:\tmp\check /L /SR /SB c: d:
  243.  
  244.     This one will check all the files on the drives D: and E:
  245.     against the default file VALIDATE.DAT in C:\CHKDATA:
  246.         CHECK /W c:\chkdata /V d: e:
  247.     
  248.     The following will store the interrupts and the memory
  249.     map in the files c:\ints.dat and c:\mm.bin:
  250.         CHECK /SI c:\ints.dat /SO c:\mm.bin
  251.     
  252.  
  253.  
  254.                     
  255.                           REPAIR version 1.2                     
  256.     
  257.         REPAIR will restore values from files saved with CHECK.
  258.     CAUTION!  Before  using  REPAIR to restore  MBR or BOOT
  259.     SECTOR you should  boot  from  a clean, write-protected
  260.     diskette  ( REPAIR should be on a clean write-protected
  261.     diskette too)!  You  can  use the disk created with the
  262.     MAKEBOOT.BAT for that purpose.
  263.     
  264.     USAGE:  repair [options]
  265.  
  266.     Typing just 'repair' or 'repair /?'  will display short
  267.     usage info.
  268.     
  269.     OPTIONS:
  270.       
  271.     /C <file>       - restore the CMOS
  272.     /D <file>       - restore the BIOS data area
  273.     /I <file>       - restore the interrupt vectors
  274.     /F <hex>        - free the memory block at <hex>:0
  275.     
  276.     The options  /I  and  /F  can  be  used  to remove TSRs
  277.     (Terminate but Stay Resident programs)  from the memory
  278.     - some TSRs doesn't have an uninstall option,  but it's
  279.     very  unlikely  that  you  can  remove a resident virus
  280.     (Don't try it!). Example for removing a TSR:
  281.         
  282.         C:\USR>check /si intr.dat
  283.         C:\USR>mouse
  284.         C:\USR>check /sm mem.dat
  285.           ...
  286.               0900 M  App. (PSP 090B:0) Env      160 bytes   C:\DOS\MOUSE.COM
  287.               090A M  App. (PSP 090B:0)         8880 bytes   C:\DOS\MOUSE.COM
  288.               ...
  289.         C:\USR>repair /i intr.dat /f 0900 /f 090A
  290.        
  291.  
  292.          Other options:
  293.             
  294.      /B <file> <drive>   - restore the boot sector of <drive>
  295.                            Example: A:\>repair /B bs1.dat c:
  296.     
  297.      /M <file> <drv-num> - restore the MBR and all partition
  298.                            tables of <drv-num>. <drv-num> is
  299.                    again your physical harddisk - it
  300.                    must be 0 or 1.
  301.                    Example: A:\>repair /M mbr.dat 0
  302.  
  303.      REPAIR  doesn't  have  an option  to 'clean'  infected
  304.      files. If CHECK detects that  an executable  file  was
  305.      modified, and you're  sure  you have not modified this
  306.      file by yourself  (installing a new version, re-compi-
  307.      ling the sources, etc.) I recommend deleting the file.
  308.      A good virus scanner  could  reckognize and remove the
  309.      virus (if it's a known virus)  but  possibly could not
  310.      be able to restore the file to it's original state. It
  311.      can happen that  a scanner thinks  to have reckognized
  312.      one  virus but the file  is infected  with a different
  313.      virus or even a new version of the same virus and this
  314.      can  lead to  some  serious problems  (like, the virus
  315.      remains in the file).  That's  why it's reasonable  to
  316.      keep backups of all your files.
  317.       
  318.          Keep in  mind  that some programs  are  able to modify
  319.      itself or  other executables  -  for example  to write
  320.      configuration data,  some antivirus programs  add data
  321.      to the files, etc.
  322.      
  323.                                      
  324.