home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / VIRUS / CHKVIR21.ZIP / VIRUSCHK.DOC < prev    next >
Encoding:
Text File  |  1991-08-16  |  20.0 KB  |  661 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                       Viruschk
  8.                                      Version 2.1
  9.                                SSgt Jon Freivald, USMC
  10.                                     TurboC++ 1.0
  11.                       Copyright 1991, 1st Marine Corps District
  12.                                 All Rights Reserved.
  13.  
  14.  
  15.           LICENSING INFORMATION:
  16.  
  17.  
  18.           Viruschk is distributed as freeware.  It may be distributed
  19.           freely as long as there is no fee charged for it or it's
  20.           distribution.  Viruschk must be distributed as a complete
  21.           package, containing all of the files contained in the file
  22.           readme.1st.  Viruschk may not be distributed as a feature with
  23.           any other software package without the prior written permission
  24.           of 1st Marine Corps District.  There is no fee for registration,
  25.           however, if you register as a user, you will be placed on
  26.           distribution for future updates.  Refer to the notes section for
  27.           further information on how to register.
  28.  
  29.  
  30.           WHAT IT IS:
  31.  
  32.  
  33.           The use of McAfee's Viruscan (scan.exe) on all USMC systems is
  34.           mandated by CMC/CCI msg R 220032Z OCT 90 ZY3. Viruschk is a
  35.           "shell" or "watchdog" for McAfee's scan.exe. It also displays the
  36.                                                               1
  37.           warning screen mandated by USMC security regulations .  If a
  38.           virus condition is found, it will lock up the user's system and
  39.           with a loud tone and unmistakable screen, alert them to the
  40.           infected condition!  It is highly recommended that you also use
  41.           the Vshield program (also by McAfee) - especially if you use the
  42.           option to limit scanning to once a week.  Please refer to the
  43.           referenced message for further guidance regarding use of the
  44.           McAfee virus prevention software.  This documentation does not
  45.           cover all policy set forth in the message, nor does it intend to
  46.           be taken as a statement of policy.
  47.  
  48.  
  49.           SYSTEM REQUIREMENTS:
  50.  
  51.  
  52.               o  IBM PC, PC/XT, PC/AT, PS/2 or 100% compatible computer
  53.  
  54.           _________________________________________________________________
  55.  
  56.           1. For non USMC users, you can make this a welcome screen,
  57.              display a corporate message, etc, or you can eliminate it all
  58.              together.  The content of the screen file is irrelevant to the
  59.              operation of the program.  The file should only be one screen
  60.              long, or it will scroll before the first part can be read.
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.               o  384K RAM
  74.  
  75.               o  a hard disk with one or more DOS partitions
  76.  
  77.               o  DOS version 2.0 or higher
  78.  
  79.               o  DOS version 3.0 or higher for the integrity self-check
  80.  
  81.               o  McAfee & Associates Viruscan (scan.exe) version 7.2V77 or
  82.                  higher.
  83.  
  84.  
  85.           HOW TO INSTALL IT:
  86.  
  87.  
  88.           To install Viruschk, proceed as follows:
  89.  
  90.           Make a directory on the c: drive named "security" (this is CMC
  91.           mandated and hard-coded into Viruschk).
  92.  
  93.           Copy the following files into c:\security:
  94.  
  95.           viruschk.com
  96.  
  97.           scan.exe       (This should be the latest version supplied
  98.                          through official channels.  It *MUST* be version
  99.                          7.2V77 or higher.)
  100.  
  101.           warning        (This screen may be modified to suit your
  102.                          organization with any ANSI editor such as
  103.                          "TheDraw", or you can substitute it with any
  104.                          ANSI/ASCII screen of your choice, as long as it is
  105.                          named "warning".  If you are not a USMC user, it
  106.                          may be omitted all together.)
  107.  
  108.           Add the line "c:\security\viruschk" to the beginning of the
  109.           user's autoexec.bat file.  This line should normally be the first
  110.                                   2
  111.           line of the autoexec.bat  & should ALWAYS be before the user can
  112.           login to the network.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.           _________________________________________________________________
  119.  
  120.           2. If you use Zenith DOS with manual partition assignment, make
  121.              sure that you place the asgnpart command BEFORE Viruschk or
  122.              the additional partitions will not get scanned!
  123.  
  124.              If your system does not have an internal clock/calendar, the
  125.              DOS date command should be in the autoexec.bat prior to the
  126.              viruschk line.
  127.  
  128.  
  129.  
  130.                                         - 2 -
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           WHAT IT DOES:
  140.  
  141.  
  142.           Viruschk first checks the DOS version being run on the machine.
  143.           If it is version 3.0 or higher, it performs an integrity check on
  144.           itself.  ANY modification (manual tampering, "pklite"
  145.           compression, a virus, etc) will cause the virus warning screen to
  146.           display and the system to lock up.  If the DOS is less than
  147.           version 3.0, a message is  displayed stating that the self-check
  148.           cannot be performed.
  149.  
  150.           It then checks the command line.  The following command line
  151.           options are valid:
  152.  
  153.           display        shows the "lockup" screen & plays a snippet of the
  154.                          warning tones - no scan is performed and the
  155.                          warning screen is not displayed (this is included
  156.                          for demo purposes only!)
  157.  
  158.           Mon            Executes scan.exe on Monday only
  159.  
  160.           Tue            Executes scan.exe on Tuesday only
  161.  
  162.           Wed            Executes scan.exe on Wednesday only
  163.  
  164.           Thu            Executes scan.exe on Thursday only
  165.  
  166.           Fri            Executes scan.exe on Friday only
  167.  
  168.           Sat            * Executes scan.exe on Saturday only
  169.  
  170.           Sun            * Executes scan.exe on Sunday only
  171.  
  172.                          * = NOT ALLOWED ON USMC SYSTEMS - these options
  173.                          are only included for those who wish to use this
  174.                          program on their private systems.
  175.  
  176.           If no command line (or one not listed above) argument is given,
  177.           scan.exe will be executed every day.  The command line arguments
  178.           MUST be typed exactly as they are above (i.e., "mon" is not
  179.           equivalent to "Mon").
  180.  
  181.           If scan.exe is to be executed, Viruschk will then build a table
  182.           of all valid hard drives for the system.  It will then execute
  183.           scan.exe with the proper parameters to scan all the drives.  If
  184.           scan.exe is not to be executed that day, this step will be
  185.           skipped.
  186.  
  187.           If scan.exe is to be executed, and this is the first time for
  188.           this particular day, scan will be executed with the "/NOBREAK"
  189.           parameter - this will force a complete scan at least once each
  190.           (selected) day.  If this is a subsequent run, the "/NOBREAK"
  191.           parameter will be omitted, allowing the user to press <Ctrl><C>
  192.           or <Ctrl><Break> to bypass the scanning process.  The first run
  193.  
  194.  
  195.  
  196.                                         - 3 -
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.           force is controlled by a control file.  This is a 4 byte file
  206.           named "c:\security\viruschk.lrd".  This file will be created the
  207.           first time the program is run and will be re-created
  208.           automatically if it is deleted.
  209.  
  210.           The control file is updated to reflect the current date AFTER the
  211.           forced scan.  If the system is rebooted during the scan, the scan
  212.           will again be forced.  This will continue until the scan
  213.           completes and the control file is updated.
  214.  
  215.           Viruschk will then display the file "warning" for a period of 30
  216.           seconds if it exists.  You will only get this far if one of the
  217.           following two conditions are met:
  218.  
  219.                   1.  scan.exe is not to be run that day
  220.                   2.  scan.exe ran successfully and did not find any
  221.           viruses
  222.  
  223.           After the 30 second delay, control will release back to DOS and
  224.           the user's system can continue running it's autoexec.bat file.
  225.           The user can bypass the delay by pressing a key.  A countdown
  226.           timer informs you of how much longer you have to wait if you
  227.           don't press a key.  The warning screen will display every day,
  228.           regardless of command line arguments (except "display" which is
  229.           not for general use anyway...).  If the file c:\security\warning
  230.           does not exist, nothing will be displayed, and there will be no
  231.           delay before the program exits.
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                                         - 4 -
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           WHAT WILL TRIGGER IT:
  272.  
  273.  
  274.           One of five conditions will cause viruschk to lock up the user's
  275.           system:
  276.  
  277.                   1. Viruschk.exe finds any type of modification has
  278.           occurred to itself (indicating either manual tampering or a
  279.           virus).
  280.                   2. Scan.exe was not in the c:\security directory or could
  281.           not be executed.
  282.                   3. Scan.exe found viruses present on the system.
  283.                   4. Scan.exe exited with an error code.
  284.                   5. Your version of scan.exe is not at least 7.2V77.
  285.  
  286.           Given any of the 5 conditions, we do not want the user to be able
  287.           to proceed and use his system (possibly spreading a virus..!), so
  288.           viruschk sounds a warning tone on the PC's speaker & displays a
  289.           screen leaving the user no doubt about the fact that a virus has
  290.           been encountered (even though that is but one of five possible
  291.           exit codes).  The user's system will now be locked - the only
  292.           keystrokes that will have any effect is <Ctrl><Alt><Del> and (if
  293.           you have a Zenith system) <Ctrl><Alt><Ins> (so that you can boot
  294.           from a write protected floppy disk and remedy the problem).
  295.  
  296.           For a demo of the warning screen type:
  297.  
  298.                   viruschk display
  299.  
  300.           when display is on the command line, scan will not be executed,
  301.           nor will warning be displayed - this is for admin demo use only.
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                         - 5 -
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.           RETURN CODES:
  338.  
  339.  
  340.           Viruschk will set the DOS errorlevel upon exit.  You can use the
  341.           DOS batch command "if errorlevel" to check these codes and take
  342.           conditional action if desired.  The following is a list of the
  343.           codes & their significance:
  344.  
  345.           0              Viruschk ran uninterrupted to completion of the
  346.                          delay countdown or the "display" command line
  347.                          option was used.
  348.  
  349.           1              A keystroke was pressed to bypass the delay.
  350.  
  351.           2              The file c:\security\warning was not found
  352.                          (therefore no display or delay).
  353.  
  354.           3              Warning was present, but the program was unable to
  355.                                    3
  356.                          display it .
  357.  
  358.           100            You errantly obtained a copy of the program that
  359.                          does not have the anti-virus information imbedded
  360.                          in it.  This copy should not have been distributed
  361.                          and will not run with DOS 3.0 or higher.
  362.  
  363.           255            The DOS version being run is less than version
  364.                          2.0.  Viruschk requires at least version 2.0 to
  365.                          run and at least 3.0 to perform it's self-check.
  366.  
  367.  
  368.           COMMON PROBLEMS/REMEDIES:
  369.  
  370.  
  371.              1.  Scan.exe cannot execute - Viruschk locks up system -
  372.                  scan.exe will execute when invoked manually.
  373.  
  374.                     a.  Memory - scan.exe requires 256K of RAM.  Adding the
  375.                         overhead of Viruschk brings system requirements up
  376.                         to 384K. It doesn't actually require that much, but
  377.                         that is the next step up from 256K.
  378.  
  379.                     b.  Location - scan.exe MUST be located in C:\SECURITY.
  380.                         Because this location was mandated by CMC, it has
  381.                         been hard-coded into Viruschk.  If it cannot
  382.                         execute the program c:\security\scan.exe, it is
  383.                         considered an error & the lock up is initiated on
  384.                         purpose.  This prevents a virus from planting a
  385.  
  386.           _________________________________________________________________
  387.  
  388.           3. This condition should *NEVER* happen!  If it does, please
  389.              contact me because I'm interested in knowing if this can
  390.              actually happen.
  391.  
  392.  
  393.  
  394.                                         - 6 -
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                         trojan "scan" elsewhere in your path and having it
  404.                         executed by Viruschk.
  405.  
  406.                     c.  Version - starting with Viruschk version 2.01c,
  407.                         Viruscan (scan.exe) 7.2V77 is the minimum version
  408.                         required.
  409.  
  410.              2.  My warning screen comes out looking like a bunch of
  411.                  jumbled garbage.
  412.  
  413.                     a.  Most likely your screen was done in ANSI graphics
  414.                         and you do not have ansi.sys loaded.  Insure that
  415.                         your config.sys file contains a line something to
  416.                         the effect of "device=c:\dos\ansi.sys".  If it does
  417.                         not, add the line (make sure you give the correct
  418.                         path to ansi.sys), then reboot your system.
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                                         - 7 -
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.           NETWORKS AND POLICY ENFORCEMENT:
  470.  
  471.  
  472.                   As a network administrator myself, I have become quite
  473.           accustomed to users ignoring policy and doing exactly what they
  474.           pleased on "their" PCs.  In light of this, the "Enforcer" program
  475.           has evolved.  You should have received "enforcer.zip" as part of
  476.                                    4
  477.           your distribution package .  This file is a compressed library
  478.           containing the enforcer executable files and documentation.
  479.           Using the enforcer, all systems must be scanned with the Viruschk
  480.           - Viruscan combination before access to the network will be
  481.           allowed.
  482.  
  483.                   Currently supported networks are Banyan VINES 3.xx &
  484.           4.xx.
  485.  
  486.                   If you do not see your network listed please feel free to
  487.           contact the author.  It is the intent of the author to support
  488.           all DOS based networks eventually.
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.           _________________________________________________________________
  520.  
  521.           4. PKUnzip (PKWare) version 1.10 is required to extract the
  522.              contents of this file.
  523.  
  524.  
  525.  
  526.                                         - 8 -
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.           NOTES:
  536.  
  537.  
  538.                   The author can be contacted to register or for support in
  539.           the following ways:
  540.  
  541.           Commanding Officer
  542.           Headquarters, 1st Marine Corps District (ISMO)
  543.           605 Stewart Avenue
  544.           Garden City, NY 11530
  545.                   ATTN: SSgt Freivald
  546.  
  547.           Commercial phone - (516) 228-5635
  548.           Autovon phone - 994-5635
  549.           ELMS/MCDN - bk1md4:gisnad05
  550.           Compuserve - 70274,666
  551.           Internet - 70274.666@compuserve.com
  552.           Prodigy - ktfp55a
  553.           BBS - (516) 483-5841 (8,N,1 - 300-2400,9600 HST)
  554.  
  555.                   I wrote this program to take care of two CMC mandates for
  556.           the users of our network as transparently as possible.  It has
  557.           also been implemented on all of our remote/stand-alone systems.
  558.           Those mandates are the access warning screen on system startup
  559.           and the scanning of all hard drives at least once a week.
  560.  
  561.                   Please contact me ASAP if you have any problems with this
  562.           program.  We have tested it on over 90 systems here at 1st
  563.           District, but our configurations are pretty standard, so I can't
  564.           GUARANTEE that it will run properly on ALL systems (although I
  565.           believe it will).
  566.  
  567.                   I am also open to comments and suggestions for
  568.           improvements.  Having reached this stage, updates are not very
  569.           high on the priority list, but I will definitely entertain them.
  570.           I may also be willing to produce custom versions for specific
  571.           requirements.  This will depend on what they are (the amount of
  572.           work involved), requested delivery deadlines, and my current
  573.           workload here at 1st District.
  574.  
  575.                   If you would like to be placed on distribution for any
  576.           future updates, simply drop me a message (either US Mail or
  577.           Electronic Mail) with your name, unit, address (E-Mail!?), etc...
  578.           Be sure to mention Viruschk, as I maintain distribution lists for
  579.           a number of programs & want to be sure to get you on the right
  580.           list..!  Also, please mention the version that you currently
  581.           have.
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.                                         - 9 -
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.           REVISION HISTORY:
  602.  
  603.  
  604.           2.1            Implemented the Banyan VINES version of
  605.                          "Enforcer".
  606.  
  607.                          Cleaned up the formatting of the disk found
  608.                          line(s).
  609.  
  610.           2.03           Fixed a bug that would cause a divide error with
  611.                          program termination if a RAM Drive or hard disk
  612.                          partition was smaller than one meg or had less
  613.                          than one meg free.  Thanks to Aryeh Goretsky from
  614.                          McAfee Associates tech support for discovering it
  615.                          and bringing it to my attention.
  616.  
  617.           2.02           Added the feature of "/NOBREAK" being passed to
  618.                          scan.exe only on the first run of any given day.
  619.                          This added the requirement for a 4 byte control
  620.                          file, which is named "c:\security\viruschk.lrd"
  621.                          (lrd stands for "last run date").
  622.  
  623.           2.01c          Updated the code to invoke scan.exe with the "/M",
  624.                          "/NOPAUSE" and "/NOBREAK" options.  This update
  625.                          requires the use of Viruscan (scan.exe) version
  626.                          7.2V77 or higher.
  627.  
  628.           2.01b          Added (actually just made consistent & documented)
  629.                          DOS errorlevel exits.
  630.  
  631.           2.01a          Captured the keystroke if the delay was bypassed
  632.                          to prevent inadvertent input to the next program
  633.                          run.
  634.  
  635.           2.01           Added drive information display, changed 5 second
  636.                          delay to a 30 second delay bypassable with a
  637.                          keystroke, and made the warning screen optional.
  638.  
  639.           2.0            Added integrity (virus) self-check, system
  640.                          interrogation for drive table and option to run on
  641.                          a specific day of the week.  Converted from .exe
  642.                          to .com format.  Documentation written.  First
  643.                          general distribution.
  644.  
  645.           1.0            First release, not distributed beyond First
  646.                          District users.  Would only scan drive c:, had a
  647.                          fixed 5 second delay for the warning screen (which
  648.                          was required), and ran every day.
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.                                        - 10 -
  659.  
  660.  
  661.