home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / trojanpr / condom.arc / CONDOM.DOC < prev    next >
Encoding:
Text File  |  1988-02-28  |  13.1 KB  |  397 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.         
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                     CONDOM
  18.  
  19.  
  20.                           A Virus Protection Package
  21.  
  22.                   Prophylatics for Insidious Software Trojans
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                            Created, and Offered by:
  39.  
  40.                                  Charlie Ros5e
  41.                                Boulder, Colorado
  42.  
  43.                                       and
  44.  
  45.                                 Gerry Williams
  46.                             Albuquerque, New Mexico
  47.  
  48.                                 Date: 88.02.28
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                                     Page 1                              
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.                       CONDOM: A Virus Protection Package                
  70.  
  71.  
  72.            What The CONDOM Package Does
  73.            What The CONDOM Package Does
  74.        1.  What The CONDOM Package Does
  75.  
  76.        The  collection  of programs contained in the CONDOM package work
  77.        in concert to allow the user to easily  check  if  tampering  has
  78.        occurred  on certain specified files. It is primarily intended to
  79.        be  used  to  validate  the  integrity  of  the   system   files,
  80.        COMMAND.COM,  IBMBIO.COM, and IBMDOS.COM, which the recent plague
  81.        of 'virus programs' tends to infect. The package is  not  limited
  82.        to these files, however.
  83.  
  84.  
  85.  
  86.            Why The CONDOM Package Was Written
  87.            Why The CONDOM Package Was Written
  88.        2.  Why The CONDOM Package Was Written
  89.  
  90.        Of  late, there have been reports of a proliferation of programs,
  91.        termed 'Viruses',  which  insidiously  transmit  themselves  from
  92.        computer  system to computer system through certain Public Domain
  93.        programs  obtained  from  Bulletin  Board  Systems.  When   these
  94.        programs  are  executed,  they  modify  some of the user's system
  95.        files in a way which causes those programs to propagate the Virus
  96.        Program to other files, some of which eventually find  their  way
  97.        onto  other  BBSs, and the cycle repeats. It is not until a Virus
  98.        has lived in a host computer for some  time  that  it  begins  to
  99.        affect that system adversely.
  100.  
  101.        These  Virus  Programs  are written by extraordinarily competent,
  102.        clever, and knowledgeable people who are,  nevertheless,  shallow
  103.        and  myopic  individuals. They have absolutely *no* clue that the
  104.        means they have at their disposal  which  permit  them  to  wreak
  105.        their  havoc  has  been  provided through the creative efforts of
  106.        people working  to  *increase*  and  *enhance*  our  standard  of
  107.        living.  Were it not for this long line constructive individuals,
  108.        our pathetic Virus Writers would still be living  in  hovels  and
  109.        caves,  breaking  their  bodies  trying  to eke out an existence,
  110.        those bodies being wracked with debilitating pestilence, and with
  111.        organic viruses snuffing out their miserable  lives  before  they
  112.        reached the age of forty.
  113.  
  114.        We,  as  a species, have progressed from such a wretched state to
  115.        our current, relatively luxurious one, through the *constructive*
  116.        efforts of people; not the *destructive* ones. Our Virus  Writers
  117.        are  of the same ilk as Dr. Josef Goebbels (the propaganda minis-
  118.        ter of Germany's Third Reich  under  Hitler;  i.e.,  the  Nazis).
  119.        Goebbels  was a highly educated and brilliant man, but that's not
  120.        enough. There are three things  a  person  can  do  with  his/her
  121.        talents;  use  them  for  constructive purposes, ignore and waste
  122.        them, or use them to destroy  that  which  has  been  created  by
  123.        others.  Of  these  choices,  only  the first two are acceptable.
  124.        Those who take the third option reduce themselves to the level of
  125.        vermin who infest our clothing.
  126.  
  127.  
  128.  
  129.                                     Page 2                              
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.                       CONDOM: A Virus Protection Package                
  140.  
  141.  
  142.        But there may be a bright side to all of this. In  our  years  of
  143.        observing  the Human Drama, we have never seen an instance of one
  144.        person's destructive efforts which did not prompt another  person
  145.        to  turn  those efforts into something of benefit. At least, this
  146.        has been true in the scientific and technical arena. I'm not sure
  147.        our politicians learned anything from  the  National  Socialists.
  148.        But that's grist for another rant another day.
  149.  
  150.        The  CONDOM  package is a first, halting, and feeble step towards
  151.        salvaging something of benefit from the putrid slough created  by
  152.        the  vermin. One of the authors, Gerry Williams, came up with the
  153.        initial idea; make a reference copy of COMMAND.COM that is  known
  154.        to  be  virus  free.  Name it COMMAND.REF or something, and peri-
  155.        odically compare it to the working COMMAND.COM using  the  MS-DOS
  156.        utility  COMP.  This scheme worked, by required user interaction,
  157.        and this was an annoyance.  Furthermore,  COMP  does  not  return
  158.        error  codes  which  can  be  acted  upon  by batch files, so the
  159.        process could not be automated.
  160.  
  161.        To circumvent these shortcomings of COMP, Charlie Ros5e  wrote  a
  162.        very  simple minded program (in C) which would compare two files,
  163.        byte for byte, and return an error code depending  upon  what  it
  164.        found. Since a reference copy of each system file was needed, and
  165.        since the COPY command cannot even *see* the hidden system files,
  166.        Ros5e  wrote  a  file  copier  that  is  not limited in this way.
  167.        Finally, he put together a batch file which shows how the  system
  168.        can be used.
  169.  
  170.        We  hope  that  1),  this  package  will  be of use in protecting
  171.        people's systems, and of help in containing this  nastiness,  and
  172.        2),  it will spur interest in developing even more sophisticated,
  173.        comprehensive, and faster prophylaxes.
  174.  
  175.  
  176.        Signed:
  177.                Charlie Ros5e
  178.                        Boulder, Colorado
  179.                        BBS Fido Node 104/23
  180.                        Account Name: Charlie Rose
  181.  
  182.                Gerry Williams
  183.                        Albuquerque, New Mexico
  184.                        BBS Fido Node 15/1001
  185.  
  186.  
  187.  
  188.            How To Use CONDOM
  189.            How To Use CONDOM
  190.        3.  How To Use CONDOM
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.                                     Page 3                              
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.                       CONDOM: A Virus Protection Package                
  208.  
  209.  
  210.             ______________________________
  211.  
  212.        3.1  Files Contained In The Package
  213.  
  214.        The two programs contained in this package, DIF.C and CPY.C  were
  215.        written in C under the following compiler:
  216.  
  217.                        Aztec C86  Version 3.40b
  218.                        Manx Software Systems
  219.                        P.O. Box 55
  220.                        Shrewsbury, New Jersey, 07701
  221.  
  222.        Both  source and executable modules are supplied, so the user may
  223.        be convinced of the cleanliness of the system, and  so  s/he  may
  224.        make whatever modifications might be desired.
  225.  
  226.  
  227.               CONDOM.DOC.
  228.               CONDOM.DOC.
  229.        3.1.1  CONDOM.DOC.  This is the document you are now reading.
  230.  
  231.  
  232.               CPY.*.
  233.               CPY.*.
  234.        3.1.2  CPY.*.  This  program  copies  a  file,  regardless of its
  235.        attributes. It can be hidden, a system file, or flagged as  read-
  236.        only. The calling sequence is:
  237.  
  238.                         CPY  from-filename  to-filename
  239.  
  240.        CPY.C contains the Aztec Compiler specific function; scr_clear().
  241.        It  clears  (erases)  the CRT, and is there for cosmetic purposes
  242.        only. If you are going to recompile this  program  under  a  dif-
  243.        ferent  compiler,  either  delete  this  statement altogether, or
  244.        replace it with something equivalent.
  245.  
  246.        Two functions are used in the appended function named filesize().
  247.        These are
  248.  
  249.                        access()        Determines if the specified
  250.                                        file exists.
  251.  
  252.                        stat()          Loads pertinent information
  253.                                        about the specified file into
  254.                                        the structure having a template
  255.                                        called 'stat', which is defined
  256.                                        within the header file, stat.h
  257.  
  258.        These are  crucial  functions,  especially  stat()  since  it  is
  259.        through  this function that file sizes are obtained. Since we are
  260.        working with binary files which have no End of File mark, we need
  261.        the exact file size to know how many bytes to copy  and  compare.
  262.        If  you  have no access() function, you can get the job done with
  263.        fopen() just as well, but if you have no stat() function, we have
  264.        no suggestions for you.
  265.  
  266.  
  267.  
  268.  
  269.                                     Page 4                              
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.                       CONDOM: A Virus Protection Package                
  280.  
  281.  
  282.               DIF.*.
  283.               DIF.*.
  284.        3.1.3  DIF.*.  This program  compares  two  specified  files.  It
  285.        returns  one  of  five  error  codes (numbered 0 through 5) which
  286.        indicates what happened when the program  was  run.  The  calling
  287.        sequence is:
  288.  
  289.                  DIF  [d:][path]filename1  [d:][path]filename2
  290.  
  291.        The error codes are defined as follows:
  292.  
  293.                4  Invalid command line syntax. This means that there
  294.                   were either too many or two few arguments on the
  295.                   command line. There *must* be two, as described
  296.                   above.
  297.  
  298.                3  At least one of the specified files does not exist.
  299.  
  300.                2  The two files are not of the same size. In this case,
  301.                   no further comparisons are made.
  302.  
  303.                1  The two files failed to match at some point. This is
  304.                   all the information that is given.
  305.  
  306.                0  The two files matched perfectly.
  307.  
  308.        The  comments  regarding  the  functions  access() and stat() ex-
  309.        pressed in the section on CPY.* apply to DIF.C as well.
  310.  
  311.  
  312.               CONDOM.BAT.
  313.               CONDOM.BAT.
  314.        3.1.4  CONDOM.BAT.  This is merely an  example  of  how  the  DIF
  315.        program  might  be  embedded  in  an  automated batch file. It is
  316.        certainly not offered as the last word in how to use  the  CONDOM
  317.        package.
  318.  
  319.        CONDOM.BAT  has essentially the same calling sequence as does the
  320.        DIF program.
  321.  
  322.                CONDOM  [d:][path]filename1  [d:][path]filename2
  323.  
  324.        The batch file hands the two files specified on the command  line
  325.        to  DIF,  and  then  branches  appropriately to display a message
  326.        which informs the user as to what happened.
  327.  
  328.        Much more spiff batch files can be wrapped  around  DIF,  and  we
  329.        leave it to you, Dear, Gentle, and Esteemed Reader, to think them
  330.        up. We're not spoon-feeding you here; just providing the means by
  331.        which you can tailor a system that pleases *you*.
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.                                     Page 5                              
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.                       CONDOM: A Virus Protection Package                
  350.  
  351.  
  352.             ______________________________
  353.  
  354.        3.2  Nitty-Gritties of Using CONDOM
  355.  
  356.  
  357.         1. Use CPY to make copies of those files you will be validating.
  358.            We  suggest  that  you  watch  COMMAND.COM,  IBMBIO.COM,  and
  359.            IBMDOS.COM. Since these files are (most likely) in your  root
  360.            directory,  we  further  suggest that you place the reference
  361.            copies there also. Thus, you might well issue  the  following
  362.            commands:
  363.  
  364.                    CPY  COMMAND.COM  COMMAND.REF
  365.                    CPY  IBMBIO.COM   IBMBIO.REF
  366.                    CPY  IBMDOS.COM   IBMDOS.REF
  367.  
  368.            Note: CPY does *not* recognize wildcards, so you cannot say
  369.  
  370.                    CPY  *.COM  *.REF
  371.            You  only  have to perform this step once. Once you have your
  372.            reference files, in place, protect and cherish them.
  373.  
  374.         2. Whenever you feel the need for a health  check  (e.g.,  after
  375.            you've  downloaded  *and  executed*,  from some BBS, a Lovely
  376.            that seems almost too good to  be  true),  execute  your  DIF
  377.            exerciser. In the case of the CONDOM.BAT we've supplied here,
  378.            do the following:
  379.  
  380.                    CONDOM  COMMAND.COM  COMMAND.REF
  381.                    CONDOM  IBMBIO.COM   IBMBIO.REF
  382.                    CONDOM  IBMDOS.COM   IBMDOS.REF
  383.  
  384.            If ever this process produces anything besides the message
  385.  
  386.                         Everything seems to be just ducky!
  387.  
  388.            for  each invocation of CONDOM.BAT as shown above, there is a
  389.            good chance you've been infected. But, at least, you'll  have
  390.            a fairly good idea of who the carrier was.
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.                                     Page 6                              
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.