home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CONDOM
-
-
- A Virus Protection Package
-
- Prophylatics for Insidious Software Trojans
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Created, and Offered by:
-
- Charlie Ros5e
- Boulder, Colorado
-
- and
-
- Gerry Williams
- Albuquerque, New Mexico
-
- Date: 88.02.28
-
-
-
-
-
-
-
-
-
-
- Page 1
-
-
-
-
-
-
-
-
-
- CONDOM: A Virus Protection Package
-
-
- What The CONDOM Package Does
- What The CONDOM Package Does
- 1. What The CONDOM Package Does
-
- The collection of programs contained in the CONDOM package work
- in concert to allow the user to easily check if tampering has
- occurred on certain specified files. It is primarily intended to
- be used to validate the integrity of the system files,
- COMMAND.COM, IBMBIO.COM, and IBMDOS.COM, which the recent plague
- of 'virus programs' tends to infect. The package is not limited
- to these files, however.
-
-
-
- Why The CONDOM Package Was Written
- Why The CONDOM Package Was Written
- 2. Why The CONDOM Package Was Written
-
- Of late, there have been reports of a proliferation of programs,
- termed 'Viruses', which insidiously transmit themselves from
- computer system to computer system through certain Public Domain
- programs obtained from Bulletin Board Systems. When these
- programs are executed, they modify some of the user's system
- files in a way which causes those programs to propagate the Virus
- Program to other files, some of which eventually find their way
- onto other BBSs, and the cycle repeats. It is not until a Virus
- has lived in a host computer for some time that it begins to
- affect that system adversely.
-
- These Virus Programs are written by extraordinarily competent,
- clever, and knowledgeable people who are, nevertheless, shallow
- and myopic individuals. They have absolutely *no* clue that the
- means they have at their disposal which permit them to wreak
- their havoc has been provided through the creative efforts of
- people working to *increase* and *enhance* our standard of
- living. Were it not for this long line constructive individuals,
- our pathetic Virus Writers would still be living in hovels and
- caves, breaking their bodies trying to eke out an existence,
- those bodies being wracked with debilitating pestilence, and with
- organic viruses snuffing out their miserable lives before they
- reached the age of forty.
-
- We, as a species, have progressed from such a wretched state to
- our current, relatively luxurious one, through the *constructive*
- efforts of people; not the *destructive* ones. Our Virus Writers
- are of the same ilk as Dr. Josef Goebbels (the propaganda minis-
- ter of Germany's Third Reich under Hitler; i.e., the Nazis).
- Goebbels was a highly educated and brilliant man, but that's not
- enough. There are three things a person can do with his/her
- talents; use them for constructive purposes, ignore and waste
- them, or use them to destroy that which has been created by
- others. Of these choices, only the first two are acceptable.
- Those who take the third option reduce themselves to the level of
- vermin who infest our clothing.
-
-
-
- Page 2
-
-
-
-
-
-
-
-
-
- CONDOM: A Virus Protection Package
-
-
- But there may be a bright side to all of this. In our years of
- observing the Human Drama, we have never seen an instance of one
- person's destructive efforts which did not prompt another person
- to turn those efforts into something of benefit. At least, this
- has been true in the scientific and technical arena. I'm not sure
- our politicians learned anything from the National Socialists.
- But that's grist for another rant another day.
-
- The CONDOM package is a first, halting, and feeble step towards
- salvaging something of benefit from the putrid slough created by
- the vermin. One of the authors, Gerry Williams, came up with the
- initial idea; make a reference copy of COMMAND.COM that is known
- to be virus free. Name it COMMAND.REF or something, and peri-
- odically compare it to the working COMMAND.COM using the MS-DOS
- utility COMP. This scheme worked, by required user interaction,
- and this was an annoyance. Furthermore, COMP does not return
- error codes which can be acted upon by batch files, so the
- process could not be automated.
-
- To circumvent these shortcomings of COMP, Charlie Ros5e wrote a
- very simple minded program (in C) which would compare two files,
- byte for byte, and return an error code depending upon what it
- found. Since a reference copy of each system file was needed, and
- since the COPY command cannot even *see* the hidden system files,
- Ros5e wrote a file copier that is not limited in this way.
- Finally, he put together a batch file which shows how the system
- can be used.
-
- We hope that 1), this package will be of use in protecting
- people's systems, and of help in containing this nastiness, and
- 2), it will spur interest in developing even more sophisticated,
- comprehensive, and faster prophylaxes.
-
-
- Signed:
- Charlie Ros5e
- Boulder, Colorado
- BBS Fido Node 104/23
- Account Name: Charlie Rose
-
- Gerry Williams
- Albuquerque, New Mexico
- BBS Fido Node 15/1001
-
-
-
- How To Use CONDOM
- How To Use CONDOM
- 3. How To Use CONDOM
-
-
-
-
-
-
- Page 3
-
-
-
-
-
-
-
-
-
- CONDOM: A Virus Protection Package
-
-
- ______________________________
-
- 3.1 Files Contained In The Package
-
- The two programs contained in this package, DIF.C and CPY.C were
- written in C under the following compiler:
-
- Aztec C86 Version 3.40b
- Manx Software Systems
- P.O. Box 55
- Shrewsbury, New Jersey, 07701
-
- Both source and executable modules are supplied, so the user may
- be convinced of the cleanliness of the system, and so s/he may
- make whatever modifications might be desired.
-
-
- CONDOM.DOC.
- CONDOM.DOC.
- 3.1.1 CONDOM.DOC. This is the document you are now reading.
-
-
- CPY.*.
- CPY.*.
- 3.1.2 CPY.*. This program copies a file, regardless of its
- attributes. It can be hidden, a system file, or flagged as read-
- only. The calling sequence is:
-
- CPY from-filename to-filename
-
- CPY.C contains the Aztec Compiler specific function; scr_clear().
- It clears (erases) the CRT, and is there for cosmetic purposes
- only. If you are going to recompile this program under a dif-
- ferent compiler, either delete this statement altogether, or
- replace it with something equivalent.
-
- Two functions are used in the appended function named filesize().
- These are
-
- access() Determines if the specified
- file exists.
-
- stat() Loads pertinent information
- about the specified file into
- the structure having a template
- called 'stat', which is defined
- within the header file, stat.h
-
- These are crucial functions, especially stat() since it is
- through this function that file sizes are obtained. Since we are
- working with binary files which have no End of File mark, we need
- the exact file size to know how many bytes to copy and compare.
- If you have no access() function, you can get the job done with
- fopen() just as well, but if you have no stat() function, we have
- no suggestions for you.
-
-
-
-
- Page 4
-
-
-
-
-
-
-
-
-
- CONDOM: A Virus Protection Package
-
-
- DIF.*.
- DIF.*.
- 3.1.3 DIF.*. This program compares two specified files. It
- returns one of five error codes (numbered 0 through 5) which
- indicates what happened when the program was run. The calling
- sequence is:
-
- DIF [d:][path]filename1 [d:][path]filename2
-
- The error codes are defined as follows:
-
- 4 Invalid command line syntax. This means that there
- were either too many or two few arguments on the
- command line. There *must* be two, as described
- above.
-
- 3 At least one of the specified files does not exist.
-
- 2 The two files are not of the same size. In this case,
- no further comparisons are made.
-
- 1 The two files failed to match at some point. This is
- all the information that is given.
-
- 0 The two files matched perfectly.
-
- The comments regarding the functions access() and stat() ex-
- pressed in the section on CPY.* apply to DIF.C as well.
-
-
- CONDOM.BAT.
- CONDOM.BAT.
- 3.1.4 CONDOM.BAT. This is merely an example of how the DIF
- program might be embedded in an automated batch file. It is
- certainly not offered as the last word in how to use the CONDOM
- package.
-
- CONDOM.BAT has essentially the same calling sequence as does the
- DIF program.
-
- CONDOM [d:][path]filename1 [d:][path]filename2
-
- The batch file hands the two files specified on the command line
- to DIF, and then branches appropriately to display a message
- which informs the user as to what happened.
-
- Much more spiff batch files can be wrapped around DIF, and we
- leave it to you, Dear, Gentle, and Esteemed Reader, to think them
- up. We're not spoon-feeding you here; just providing the means by
- which you can tailor a system that pleases *you*.
-
-
-
-
-
-
-
- Page 5
-
-
-
-
-
-
-
-
-
- CONDOM: A Virus Protection Package
-
-
- ______________________________
-
- 3.2 Nitty-Gritties of Using CONDOM
-
-
- 1. Use CPY to make copies of those files you will be validating.
- We suggest that you watch COMMAND.COM, IBMBIO.COM, and
- IBMDOS.COM. Since these files are (most likely) in your root
- directory, we further suggest that you place the reference
- copies there also. Thus, you might well issue the following
- commands:
-
- CPY COMMAND.COM COMMAND.REF
- CPY IBMBIO.COM IBMBIO.REF
- CPY IBMDOS.COM IBMDOS.REF
-
- Note: CPY does *not* recognize wildcards, so you cannot say
-
- CPY *.COM *.REF
- You only have to perform this step once. Once you have your
- reference files, in place, protect and cherish them.
-
- 2. Whenever you feel the need for a health check (e.g., after
- you've downloaded *and executed*, from some BBS, a Lovely
- that seems almost too good to be true), execute your DIF
- exerciser. In the case of the CONDOM.BAT we've supplied here,
- do the following:
-
- CONDOM COMMAND.COM COMMAND.REF
- CONDOM IBMBIO.COM IBMBIO.REF
- CONDOM IBMDOS.COM IBMDOS.REF
-
- If ever this process produces anything besides the message
-
- Everything seems to be just ducky!
-
- for each invocation of CONDOM.BAT as shown above, there is a
- good chance you've been infected. But, at least, you'll have
- a fairly good idea of who the carrier was.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 6
-
-
-
-
-
-
-
-