home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / virus / delouse1.zip / DELOUSE.DOC < prev    next >
Text File  |  1988-03-03  |  18KB  |  381 lines

  1.  
  2.  
  3.  
  4.         *****************************************************************
  5.         **                      DELOUSE  V1.0                          **
  6.         **                         3/2/88                              **
  7.         **                      Documentation                          **
  8.         **                                                             **
  9.         **          "When everyone really is out to get you            **
  10.         **           then paranoid is just proper thinking."           **
  11.         **                                                             **
  12.         **   A program to assist in the detection of disk damage by    **
  13.         **   Trojan or Virus programs.  Designed by and for those of   **
  14.         **   us who are especially paranoid.                           **
  15.         *****************************************************************
  16.  
  17.         Program:       DELOUSE
  18.         Version level: 1.0  
  19.         Type:          Automated File comparison utility
  20.         Language:      Turbo Pascal v4.0 and above.
  21.         Dependencies:  MsDos/PCDos 2.0 and above.
  22.         Author:        Phillip M. Nickell
  23.                        Longmont, Colorado.
  24.         Date:          March 2, 1988
  25.         Ownership:     Public domain release. Author retains no rights.
  26.  
  27.                      
  28.                        Beta-Test Sites:
  29.  
  30.                        Many thanks to the folks who tested and commented 
  31.                        on the eficacy of this program.
  32.  
  33.                        Metamorphosis PCBoard BBS - Longmont Colorado.
  34.                         Tony Ferris - Sysop.  (303) 772-7229
  35.                        Twin Peaks PCBoard BBS    - Longmont Colorado.
  36.                         Ken Krueger - Sysop   (303) 651-0225
  37.  
  38.                        All comments and suggestions are welcome. Bug 
  39.                        reports are tolerated. Leave a message for Phil 
  40.                        Nickell.
  41.  
  42.         NOTE: 
  43.  
  44.              DELOUSE is distributed with the source code. If the copy you      
  45.              receive is without source code then perhaps you should be      
  46.              suspicious of what the .exe file contains.  The .exe file      
  47.              should be 11776 bytes in length for release v0.9 (beta)
  48.              and xxxxx for release 1.0.
  49.  
  50.  
  51.         PURPOSE:
  52.  
  53.              This program is written in response to the threat by trojan      
  54.              and virus program and the damage that they can cause to a      
  55.              persons hard disk.  This program will NOT prevent damage nor      
  56.              does it attempt to detect the actual presence of trojan      
  57.              programs.  This program will ASSIST the user in determining      
  58.              that damage MAY HAVE OCCURRED and will thus allow the user 
  59.  
  60.  
  61.  
  62.              to take what steps may be necessary to eradicate the bug.  
  63.  
  64.              Just because some damage occured doesn't mean that a trojan      
  65.              got you. There are many 'normal' ways for files to get 
  66.              damaged. Errors occur, programs crash, disk drives drop a 
  67.              bit or two, power lines spike and cosmic rays can toggle a 
  68.              bit in memory to lock things up. Some programs even write 
  69.              configuration changes into their own .com or .exe files 
  70.              (Dumb - but that's another story) which could make you think 
  71.              that something untoward occured. There are, however, some 
  72.              real trojan and virus programs out there just waiting for 
  73.              the unwary.
  74.  
  75.              Most trojan and virus programs do their dark deeds by 
  76.              modifying existing system files that exist on most MSDos and 
  77.              PCDos machines. DELOUSE allows you to build a list of 
  78.              critical system files that are normally subject to attack 
  79.              and check them periodically for changes.  If any changes 
  80.              have occurred, and if you have not make any changes in those 
  81.              files yourself, then PERHAPS something else made those 
  82.              changes for you without your knowledge. You can then 
  83.              investigate and attempt to find out why the changes 
  84.              occurred. There is no free lunch or magic potion here.  This 
  85.              program is a tool to be used by the concerned and 
  86.              knowledgeable computer user. It will not help you if you 
  87.              don't use it, and like any tool it will not work properly if 
  88.              it is not used properly. If you are not familiar with files, 
  89.              directories and drive designators then you should probably 
  90.              get some assistance from an experienced computer user, as 
  91.              this program will cause more worry for you than solace.
  92.  
  93.  
  94.  
  95.         FILES IN THE ARCHIVE:
  96.  
  97.              DELOUSE.EXE         The program.
  98.  
  99.              DELOUSE.DOC         This documentation.
  100.  
  101.              DELOUSE.DAT         is a list of files that you wish to test
  102.                                  for errors. This file is just an example 
  103.                                  of what you might want to set up. You 
  104.                                  should make your own copy with a text 
  105.                                  editor. Don't use a word processor.
  106.  
  107.              DELOUSE.CHK         is a file that is built and maintained 
  108.                                  by DELOUSE. It contains information 
  109.                                  about the various files and the checksum 
  110.                                  method used. You should know of this 
  111.                                  file but you should not modify it unless 
  112.                                  you are confident of what you are doing.
  113.  
  114.              DELOUSE.OLD         not distributed, is a backup copy of 
  115.                                  delouse.chk that is created by the 
  116.                                  delouse MAKE operation by renaming the 
  117.  
  118.  
  119.  
  120.                                  existing copy of delouse.chk to 
  121.                                  delouse.old and creating a new 
  122.                                  delouse.chk file.
  123.  
  124.              DELOUSE.PAS         This is the Turbo Pascal source code 
  125.                                  file. In this day of trojan programs, it 
  126.                                  is really nice to have the source code 
  127.                                  so that you can be sure of the program 
  128.                                  and how it works.  You must have Turbo 
  129.                                  Pascal v4.0 to properly compile this 
  130.                                  code.
  131.              
  132.  
  133.         OPERATING DELOUSE:
  134.  
  135.              Syntax:   DELOUSE  { Make | Check } [ METHOD=n ]
  136.          
  137.              Examples: DELOUSE MAKE
  138.                        DELOUSE CHECK
  139.                        DELOUSE MAKE METHOD=2
  140.                        DELOUSE CHECK >PRN
  141.  
  142.                        You must specify either MAKE or CHECK on the 
  143.                        command line.  The make option causes DELOUSE to 
  144.                        build a new DELOUSE.CHK file which is used later 
  145.                        to check up on the files.
  146.  
  147.                        You can optionally specify  METHOD=N where N is 1, 
  148.                        2 or 3. The method number is used by the MAKE 
  149.                        operation and is ignored by the CHECK function. 
  150.                        Read theory of operation for more information.
  151.                        
  152.                        The last example above shows the check option 
  153.                        screen output being re-directed to the printer.
  154.  
  155.                        Delouse requires approximately 90k of ram memory 
  156.                        to run. If you don't have enough memory it will 
  157.                        tell you how much more it needs to run properly.
  158.  
  159.  
  160.  
  161.         INSTALLING & RUNNING DELOUSE.
  162.  
  163.              If you will be using DELOUSE on a hard disk you should 
  164.              preferably make a separate subdirectory for it. You can also 
  165.              run it from any floppy drive and test files on a hard disk 
  166.              if you wish. Copy DELOUSE.EXE into the subdirectory. You 
  167.              might wish to copy DELOUSE.DAT into the subdirectory also. 
  168.              Edit DELOUSE.DAT with a text editor (edlin, qedit, brief, 
  169.              etc.) so that it lists all of the system files that you wish 
  170.              to check on.  The distribution copy of DELOUSE.DAT contains 
  171.              a list of most all the file names that you might want to 
  172.              check on. Use it to guide your efforts.
  173.  
  174.              After you get the files set up, run DELOUSE MAKE from the 
  175.  
  176.  
  177.  
  178.              directory or disk where you installed it.  DELOUSE expects 
  179.              to find the DELOUSE.DAT file in the current subdirectory and 
  180.              it will create DELOUSE.CHK in the same current directory.  
  181.              During the make operation, DELOUSE will echo the data that 
  182.              it is writing into the DELOUSE.CHK file. It will also warn 
  183.              you of any files listed in the DELOUSE.DAT file that it was 
  184.              unable to open and do a checksum calculation on.  You should 
  185.              modify the DELOUSE.DAT file to correct any problems and run 
  186.              the make option again. After the make operation has been 
  187.              completed the DELOUSE.DAT file is not required as it is only 
  188.              used during the make phase. 
  189.  
  190.              Now you can run DELOUSE CHECK at any time to check on those 
  191.              files that you are trying to protect.  Move to the 
  192.              subdirectory where you have DELOUSE installed. Run DELOUSE 
  193.              CHECK.  DELOUSE will read the DELOUSE.CHK file and compare 
  194.              the data against the files named there. If a file has been 
  195.              changed, DELOUSE will report that something has changed.  If 
  196.              one of the files is missing, DELOUSE will report that also.  
  197.              If you have gone ahead and modified the DELOUSE.CHK file 
  198.              against all warnings and messed it up, then DELOUSE will 
  199.              attempt to warn you about that also.
  200.  
  201.              DELOUSE can be run from a batch file.  DELOUSE will set the 
  202.              dos ERRORLEVEL to 1 or 2 for various problems. Errorlevel 2 
  203.              overrides errorlevel 1.
  204.  
  205.              ERRORLEVEL 1    No command line options found
  206.                              No DAT file (make)
  207.                              No CHK file (check)
  208.                              Errors in DAT file such as files not found
  209.                               during MAKE
  210.                              Errors in CHK file such as format errors.
  211.  
  212.              ERRORLEVEL 2    Target file checksum mismatch during CHECK
  213.                              Target file missing during CHECK
  214.  
  215.  
  216.              EXAMPLE BATCH FILE:
  217.  
  218.                ECHO OFF
  219.                DELOUSE CHECK >PRN
  220.                IF NOT ERRORLEVEL 2 GOTO ENDIT2
  221.                  ECHO A FILE DID NOT PASS THE CHECKSUM TEST OR A>PRN
  222.                  ECHO FILE WAS FOUND MISSING FOR THE CHECKSUM TEST >PRN
  223.                  GOTO ENDIT0
  224.                :ENDIT2
  225.                IF NOT ERRORLEVEL 1 GOTO ENDIT1
  226.                  ECHO DELOUSE FAILED TO RUN PROPERLY >PRN
  227.                  ECHO PLEASE CHECK IT OUT >PRN
  228.                  GOTO ENDIT0
  229.                :ENDIT1
  230.                  ECHO THERE WERE NO DELOUSE ERRORS >PRN
  231.                :ENDIT0
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.         CAUTIONARY NOTE:
  239.  
  240.              It has occured to me, and it will eventually occur to some 
  241.              warphead, that the DELOUSE.DAT and DELOUSE.CHK files provide 
  242.              a perfect roadmap to all of the files on your system that 
  243.              you believe are critical to your operation.  It is probably 
  244.              a good idea to keep delouse on floppy disks and run it from 
  245.              there.  That way the roadmap is not accessible during normal 
  246.              day-to-day operations.  If you keep those files on your 
  247.              hard disk then for goodness sakes keep them away from the 
  248.              root directory where everyone would know to look for 'neat 
  249.              stuff'. Put 'em about 6 directory levels down where they 
  250.              would be more difficult to locate.  
  251.  
  252.              I have decided to distribute the source code, so encrypting 
  253.              the DELOUSE.DAT and DELOUSE.CHK files would be a futile 
  254.              exercise. When the source code is available any encryption 
  255.              scheme (other than long prime number public key 
  256.              cryptography) is mostly wasted. Anyone wanting to crack the 
  257.              system is able to read the code. I believe that it is better 
  258.              that the source code be available so that users can feel 
  259.              more comfortable about the program. 
  260.  
  261.  
  262.         THEORY OF OPERATION:
  263.  
  264.              DELOUSE uses simple checksumming methods to detect changes 
  265.              in the target files. This is not very sophisticated, but is 
  266.              good enough for what is being done here. We are just trying 
  267.              to detect that a change took place, not trying to transfer 
  268.              error-free data across the phones.
  269.  
  270.              DELOUSE actually uses three different checksum algorithms. 
  271.              All are simple but slightly different in the way they 
  272.              calculate the checksum. The checksum method is usually 
  273.              chosen at random when the MAKE option us used. The method 
  274.              number is recorded in the DELOUSE.CHK file to allow the 
  275.              proper method to be used when checking the files.  You can, 
  276.              if you wish, force DELOUSE to use one of checksum methods by 
  277.              putting METHOD=N on the command line, where N is 1, 2 or 3.  
  278.              This would allow you to manually compare the DELOUSE.CHK 
  279.              file against an earlier copy of DELOUSE.CHK where the same 
  280.              checksum method was used. This would be a good method to use 
  281.              to check for changes several days or weeks apart. Just 
  282.              remember that the DELOUSE.CHK file is rotated into the 
  283.              DELOUSE.OLD file when you run the MAKE option. If you want 
  284.              to save a copy of the DELOUSE.OLD file make sure you do so 
  285.              before you run make again.
  286.  
  287.              Why, might you ask, does DELOUSE use random selection of 
  288.              checksum method?  There is a possibility that one of the 
  289.              Trojan/Virus programmers would attempt to work around any 
  290.              one simple checksum method of testing files. The random 
  291.  
  292.  
  293.  
  294.              selection of checksum methods will just make it a bit more 
  295.              difficult for them.
  296.  
  297.              DELOUSE is designed to read any system and hidden files. 
  298.              This includes IBMBIO.COM and IBMDOS.COM.  DELOUSE goes to 
  299.              special efforts to make sure that the files are only read 
  300.              and never written into - safety comes first here!
  301.  
  302.              DELOUSE uses normal DOS services to read all files. There is 
  303.              no direct disk access taking place. The distribution copy of 
  304.              DELOUSE.EXE should pass Check4Bomb tests and any other 
  305.              Virus/Trojan detection program. If it does not then you 
  306.              should be wary.
  307.  
  308.  
  309.         FILE FORMATS:
  310.  
  311.            DELOUSE.DAT - This is the file YOU create or modify.
  312.  
  313.              Each line contains a full path name to a file that you want 
  314.              to check. Comment lines are allowed - They must start with 
  315.              the word !NOTE (5 characters). Blank lines are ignored.
  316.  
  317.            Example DELOUSE.DAT file.
  318.  
  319.              !note - always check on your command.com files
  320.              C:\COMMAND.COM
  321.              C:\DOS\COMMAND.COM
  322.          
  323.              !note - IBM PCdos system files are good targets.
  324.              c:\ibmbio.com
  325.              c:\ibmdos.com
  326.  
  327.              !note - MSDos system files are good targets
  328.              c:\io.sys
  329.              c:\msdos.sys
  330.  
  331.              !note - device drivers are potential targets
  332.              c:\dos\driver.sys
  333.              c:\dos\ansi.sys
  334.              c:\dos\vdisk.sys
  335.  
  336.              !note - you might want to check on your memory resident
  337.              !note   programs like CED or SideKick
  338.              c:\util\ced.com
  339.              c:\sk\sk.com
  340.  
  341.              !note - you can also check files on different drives
  342.              a:autoexec.bat
  343.              a:command.com
  344.              a:config.sys
  345.  
  346.              !note - and how about the more popular major application
  347.              !note   programs?  Dbase-3, Lotus-123, Qmodem etc.
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.            DELOUSE.CHK - this is the file that is created by DELOUSE and
  355.                          should not be modified.
  356.  
  357.              The first field is a character which describes the checksum 
  358.              method used for checksumming the file. It will be 1, 2 or 3. 
  359.              The second field is the calculated checksum itself. The 
  360.              third field is the full path name of the file.
  361.  
  362.  
  363.            Typical DELOUSE.CHK file:
  364.  
  365.  
  366.              !NOTE - This file created by DELOUSE. DON'T MODIFY.
  367.              1     1075880 C:\COMMAND.COM
  368.              1     1075880 C:\DOS\COMMAND.COM
  369.              1      904824 C:\IBMBIO.COM
  370.              1     1449251 C:\IBMDOS.COM
  371.              1       54968 C:\DOS\DRIVER.SYS
  372.              1       71679 C:\DOS\ANSI.SYS
  373.              1      140431 C:\DOS\VDISK.SYS
  374.              1      267197 C:\UTIL\CED.COM
  375.              1     2132698 C:\SK\SK.COM
  376.              1         256 A:AUTOEXEC.BAT
  377.              1     1075880 A:COMMAND.COM
  378.  
  379.  
  380.         END OF DELOUSE DOCUMENTATION.
  381.