home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR14 / VL6_084.ZIP / VL6084.DIG
Text File  |  1993-05-25  |  43KB  |  644 lines

  1. VIRUS-L Digest   Tuesday, 25 May 1993    Volume 6 : Issue 84
  2.  
  3. Today's Topics:
  4.  
  5. The Anti-Viral Software of MS-DOS 6 (PC)
  6.  
  7. VIRUS-L is a moderated, digested mail forum for discussing computer
  8. virus issues; comp.virus is a non-digested Usenet counterpart.
  9. Discussions are not limited to any one hardware/software platform -
  10. diversity is welcomed.  Contributions should be relevant, concise,
  11. polite, etc.  (The complete set of posting guidelines is available by
  12. FTP on cert.org or upon request.) Please sign submissions with your
  13. real name.  Send contributions to VIRUS-L@LEHIGH.EDU.  Information on
  14. accessing anti-virus, documentation, and back-issue archives is
  15. distributed periodically on the list.  A FAQ (Frequently Asked
  16. Questions) document and all of the back-issues are available by
  17. anonymous FTP on cert.org (192.88.209.5).  Administrative mail
  18. (comments, suggestions, and so forth) should be sent to me at:
  19. <krvw@Agarne.IMS.DISA.MIL>.
  20.  
  21.    Ken van Wyk
  22.  
  23. ------------------------------------------------------------
  24.  
  25. Date:    Tue, 25 May 93 12:31:12 -0400
  26. >From:    Y. Radai <RADAI@vms.huji.ac.il>
  27. Subject: The Anti-Viral Software of MS-DOS 6 (PC)
  28.  
  29.   I do not often write evaluations of AV products.  The reason I have chosen
  30. to do so in the case of the AV software of MS-DOS 6 is mainly that, being
  31. included with DOS, its importance, potential widespread use, and potential for
  32. being specifically targetted by virus writers far exceed those of ordinary AV
  33. software.
  34.   I'll also admit that my review is a sort of reaction to the superficial
  35. evaluations of AV software which I've read in places like PC Magazine, and I
  36. thought this would be a good chance to point out the things they miss.  (I'm
  37. referring, of course, to the *type* of things missed, such as security holes,
  38. and not to the number of details which are missed.)
  39.  
  40.   The evaluation is rather long, and I thank Ken for agreeing to publish it in
  41. full despite its length.  There's nothing particularly revolutionary in the
  42. first half (although I suspect that even those who are familiar with the
  43. product may learn a few things that they didn't know).  In any case, those who
  44. don't have the patience to read it all are strongly advised to skip to the more
  45. interesting sections in the second half, particularly that on Security Holes.
  46. (The section on Bugs and the Conclusions are also important, and if you're
  47. looking for some amusement, try the section Peculiarities in the Documentation.
  48. )
  49.  
  50.                                              Y. Radai
  51.  
  52. [Moderator's note: As Yisrael points out, I don't normally accept
  53. such large postings; I prefer to post abstracts and to put the full
  54. text on the archive sites.  However, given the potential widespread
  55. interest in this topic at this time, I felt that it was worth posting
  56. in full.  Thanks to Yisrael for his continuing efforts!]
  57.  
  58.  ------------------------------------------------------------------------------
  59.  
  60.                        The Anti-Viral Software of MS-DOS 6
  61.                                    Y. Radai
  62.                        Hebrew Univ. of Jerusalem, Israel
  63.                           E-mail: RADAI@VMS.HUJI.AC.IL
  64.  
  65.   Microsoft recently released its long-awaited Version 6 of MS-DOS, and for the
  66. first time DOS comes with Anti-Viral software.  The very fact that such soft-
  67. ware is supplied with DOS makes it likely that it will become one of the most
  68. widely used AV packages in the world and the de facto standard, regardless of
  69. its quality.  And precisely for this reason, it will be specifically targetted
  70. by virus writers.  If there are any weaknesses whatsoever in the software, they
  71. will be ruthlessly exploited by these people.  Partly for this reason, and
  72. partly because many reviewers of AV products seem to be quite unaware of weak-
  73. nesses due to security holes, much greater emphasis will be placed on such
  74. loopholes in this evaluation than is customary in most AV product evaluations.
  75.  
  76.   Microsoft's Anti-Virus software for MS-DOS (this review will not cover Anti-
  77. Virus for Windows, even though it is included in the software and manual for
  78. MS-DOS) consists of two programs, MSAV and VSafe.  Anyone familiar with Central
  79. Point's AV programs, CPAV and VSafe, will immediately see the resemblance, and
  80. this resemblance is by no means coincidental.  (In fact, this is not the se-
  81. cond, but the third incarnation of what is essentially the same software, the
  82. original being Turbo Anti-Virus of Carmel Software Engineering, Israel.)
  83. Actually, Microsoft's AV software lacks several important features of Central
  84. Point's, such as the BootSafe program, and MSAV is not quite CPAV, but basi-
  85. cally we are dealing with the same software, and except where otherwise noted,
  86. almost everything written below about Microsoft's software applies equally well
  87. to Central Point's.
  88.   Together the two programs perform the most common AV functions: (1) scanning
  89. for known viruses, (2) removal of known viruses, (3) integrity checking, and
  90. (4) generic monitoring of program execution for suspicious activity.
  91.   VSafe is a resident program, while MSAV is not; thus function (4) can be
  92. performed only by VSafe.  On the other hand, only MSAV performs function (2).
  93. The other two functions are performed by both programs.  The main difference is
  94. that MSAV performs them on many files at a time, but only when specifically
  95. requested, whereas after VSafe is loaded, it performs them automatically on
  96. each program which is about to be executed.
  97.  
  98. MSAV
  99. ====
  100.   As stated above, MSAV is a non-resident program which scans for known viruses
  101. and disinfects infected files if desired.  Optionally, it also creates and
  102. verifies checksums (both options being on by default).  MSAV can be activated
  103. either interactively (via a menu) or in batch mode (via command-line parame-
  104. ters).  If it is activated without parameters, the interactive interface is
  105. used, although this can be suppressed, if desired, by means of the parameter
  106. /P.  Moreover, in interactive mode MSAV can scan only entire drives (this is in
  107. contrast to CPAV, with its graphic directory tree).  However, one can limit the
  108. scan to a desired directory or file by specifying it as a parameter of MSAV:
  109.                    MSAV [drive:][path]filename [options]
  110. Note: Although this is not mentioned explicitly, wildcard notation within the
  111. filename is *not* recognized.  (This fact is connected with a serious bug which
  112. will be described below.)
  113.   When used interactively, MSAV displays a simple and pleasant-looking menu
  114. containing five choices: Detect, Detect & Clean, Select new drive, Options, and
  115. Exit.  There are 9 options which can be enabled or disabled, of which the most
  116. important are: Create New Checksums, Verify Integrity, Anti-Stealth, and Check
  117. All Files.  If the user changes any of them (or if he even *enters* the main
  118. menu!), he will be asked, when he tries to exit MSAV, whether he wishes to save
  119. the new configuration.  If so, a 248-byte file named MSAV.INI will be created
  120. or modified accordingly.  (In addition to the nine interactive options, this
  121. file also includes Fast Detection, Auto Save, and Detection Only.  The last
  122. mentioned prevents the user from selecting the Detect & Clean option from the
  123. Options menu, but the other two seem to have no effect.)  Some of the options
  124. (e.g. Create New Checksums and Verify Integrity) refer to VSafe as well as to
  125. MSAV.
  126.  
  127.   How good is MSAV'S scanner?  Naturally, scanning percentages have only
  128. recently begun to appear for MSAV, but it would seem natural to suppose that it
  129. would score at least as well as CPAV Ver. 1.4.  Curiously, MSAV (as shipped,
  130. without updates) scores lower than CPAV!  The May 1993 issue of the Virus
  131. Bulletin reports that whereas CPAV 1.4 detected 98.1% out of a certain rela-
  132. tively small suite, MSAV detects only 95.3% of the same suite.  Using a much
  133. larger (2,015-virus) suite, the VSUM "certification" of April 28, 1993 shows
  134. that CPAV 1.4 detected 59.4% and MSAV only 53.1% (9th and 10th places in a
  135. field of 10, in which the leader detected 93.2%).
  136.   Unfortunately, scanner comparisons such as this must be taken with a grain of
  137. salt, since if one developer has access to the test suite used in a given com-
  138. parison, his product will have an unfair advantage over the competition.  Also,
  139. some such comparisons do not use the latest version of the scan patterns in the
  140. case of all the scanners, creating another source of unfairness.  One should
  141. therefore never rely on a single comparison alone.  In another comparison
  142. (Virus Bulletin of January 1993), CPAV 1.4 detected 97.7% of its "In The Wild"
  143. suite (12-13th place out of 18 scanners) and 90.0% of its "Enlarged" suite
  144. (14th out of 18).  (These test suites comprised 128 and 783 viruses, resp.)  It
  145. is clear that MSAV would have scored even lower.
  146.   Similarly, preliminary results of the Virus Test Center in Hamburg show that
  147. MSAV detects only 61% of a suite of 2,300 viruses, compared to three other
  148. scanners which scored 99%, 98% and 90% (these figures are only approximate),
  149. and that detection is sometimes inconsistent, e.g. MSAV detects some, but not
  150. all, infections by V2P6 and Anthrax).
  151.   Not only are these results rather disappointing, but it should also be noted
  152. that unlike several other scanners, MSAV does not detect viruses in executable
  153. files which were subsequently compressed (e.g. by LZEXE or PKLite).
  154.  
  155.   Speed:  Before starting its file scan, MSAV scans memory (except if asked to
  156. scan only a single file).  I found that this took 27 seconds on a 386SX com-
  157. puter.  (Another scanner which I use requires only 7 seconds for this, yet
  158. seems to be no less reliable.)  In my opinion this is unacceptably slow.  After
  159. the memory scan finished, I found that it took an additional 18.8 minutes to
  160. scan 40 Mb of files (with Create New Checksums and Verify Integrity both dis-
  161. abled).  This also seems a bit slow.  I'm quite sure that the great majority of
  162. users who choose to insert the line MSAV /P in their AUTOEXEC.BAT file (as sug-
  163. gested on p. 69 of the Upgrade manual) will soon remove it.
  164.  
  165.   In general, it's quite important which setting of each option has been selec-
  166. ted by the developers of any product as the default, since that is the setting
  167. which most (unsophisticated) users will continue to use.  The Create New Check-
  168. sums and Verify Integrity options are on by default, a reasonable decision.
  169. However, the reasoning behind the defaults Anti-Stealth = Off and Check All
  170. Files = On is quite beyond my comprehension.
  171.   According to the documentation, the Anti-Stealth option causes MSAV to use
  172. low-level techniques to detect changes to files when integrity verification is
  173. performed.  Since presence of an unknown stealth virus in memory when integrity
  174. checking is performed could distort the results, it seems essential to enable
  175. this option when booting is performed from the hard disk, as it usually is.
  176. Yet by default, this option is off.  According to the on-line help, this choice
  177. of default is to avoid "a small performance penalty".  But when I tested it
  178. (with the Verify Integrity option enabled), I found that turning Anti-Stealth
  179. on actually *reduced* the file scanning time by 20 to 33%!  Perhaps there
  180. exists some configuration for which there is some performance penalty, but if
  181. so, I have been unable to find it.  Therefore, assuming that enabling this
  182. option actually produces the effect that it claims, it is difficult for me to
  183. understand why it should *ever* be disabled, let alone be disabled by default.
  184.   Turning now to the Check All Files option, turning it off means that only
  185. files with specific extensions (EXE, COM, and six others; the list is not
  186. customizable by the user) will be checked.  On a directory or drive with many
  187. non-executable files, this will save a great deal of time.  It is therefore a
  188. mystery to me why the default for this option is On.  It is true that there are
  189. a few viruses, such as Frodo, which infect certain types of non-executable
  190. files.  However, it wouldn't be hard to program the scanner to check such types
  191. of files in the special case of *those few viruses*, thus adding very little
  192. time to the scan.
  193.   To summarize, the default for the Anti-Stealth option is Off, at great risk,
  194. in order (supposedly) to save a little time, while the default for the Check
  195. All Files option is On, thus increasing the time by a large factor, even though
  196. this adds practically no security.
  197.  
  198.   Unfortunately, if one wants to alter any of the options, this cannot be done
  199. from the command line.  What, then, is the user to do if he wants to temporari-
  200. ly alter one of the options when anything less than an entire drive is to be
  201. scanned (i.e. a directory or file, which, as mentioned above, can be requested
  202. *only* as a command-line parameter)?   One way is to activate MSAV interactive-
  203. ly, change options, save them, exit MSAV, then call MSAV with a path or file
  204. specification, and finally re-enter MSAV interactively and reset the options.
  205. Fortunately, there is a slightly less tedious way of doing this: The above
  206. mentioned file MSAV.INI is a normal ASCII file.  The user can therefore edit it
  207. before and after executing MSAV.  Although this is somewhat simpler, providing
  208. these options on the command line would be still more convenient.
  209.  
  210.   When used in interactive mode, MSAV provides function keys for partially
  211. context-sensitive help in hypertext form (F1), and a list of viruses which MSAV
  212. recognizes (F9).
  213.   The current version of MSAV requires about 418K of memory in order to run at
  214. all, and about 27K more if you wish to use the Help option or see the list of
  215. recognized viruses.  The MSAV.EXE file is currently about 168K in size (after
  216. compression by LZEXE).
  217.  
  218.   No scanner is worth very much if its list of scan patterns is not frequently
  219. updated to detect newly written viruses and new variants of old viruses.  Thus
  220. Microsoft had to arrange for some means of obtaining updates for MSAV and
  221. VSafe.  According to the manual, a user can obtain "signatures" of new viruses
  222. for MSAV by downloading them from a certain BBS, which turns out, unsurprising-
  223. ly, to be Central Point's.  However, this allows only *detection* of new vi-
  224. ruses, not their removal.  In order to be able to remove them, it is necessary
  225. to update the software.  The manual contains two coupons for obtaining Virus
  226. Protection Updates (one to be shipped at once, the other in 3-4 months) at a
  227. cost of $9.95 each for U.S. residents, much more for others.  Just how much
  228. *subsequent* updates will cost, or how often new versions will be made
  229. available, is not stated.  My guess is that the great majority of Microsoft's
  230. users will find it too inconvenient and/or too expensive to obtain updates
  231. regularly.  (To appreciate what failure to update implies, it has been estima-
  232. ted that close to ten companies released shrink-wrapped software infected with
  233. the Michelangelo virus simply because they hadn't bothered to update their AV
  234. software.)
  235.   As with any other known-virus scanner, even if updates are obtained regular-
  236. ly, there will necessarily be an interval of several months between the time
  237. that a new virus (or a sufficiently modified variant of an old one) appears and
  238. the time that users can obtain the update necessary to detect and remove it.
  239. That is one reason why *generic* detection is so important in an AV package.
  240. The most common generic techniques are integrity checking, resident monitoring,
  241. and heuristic scanning.  Microsoft supplies software for the first two mea-
  242. sures, and it is to these that we now turn.
  243.  
  244. VSAFE
  245. =====
  246.   VSafe is a resident program which checks for several types of suspicious
  247. activities:
  248. 1. Warns of attempts to low-level format the hard disk
  249. 2. Warns of attempts to stay resident (by standard DOS methods)
  250. 3. Warns of attempts to write to the hard disk
  251. 4. Checks executable files for known viruses when such a file is opened
  252.    (by DOS) and prevents execution if found
  253. 5. Checks diskettes for known boot-sector viruses whenever a diskette is
  254.    accessed, and warns the user
  255. 6. Warns of attempts to write to the hard-disk boot sector or MBR
  256. 7. Warns of attempts to write to a diskette's boot sector
  257. 8. Warns of attempts to modify executable files.
  258.  
  259. By default, (1), (4), (5) and (6) are on; the other options are off.
  260.   Regardless of the settings of the above 8 options, the program also scans
  261. each program which is about to be executed for known viruses (although this is
  262. performed in a faster and less sophisticated manner than in MSAV; in particu-
  263. lar, it does not use any anti-stealth techniques), scans the boot sector of the
  264. diskette in drive A: when Ctrl-Alt-Del is pressed, checks the hard-disk boot
  265. sector and the Master Boot Record when VSafe is loaded, and (optionally) per-
  266. forms integrity checking.
  267.   When VSafe finds reason to sound an alarm, it usually gives the user a choice
  268. between Continue, Stop, or Boot.
  269.   Ordinarily, VSafe will be invoked from the AUTOEXEC.BAT file.  It is customi-
  270. zable, i.e. the command may contain parameters to indicate changes from the
  271. above 8 defaults and/or to indicate additional choices such as disabling check-
  272. sum creation.  For example, if one wanted to add options (2) and (8) to the
  273. defaults, to turn option (6) off, and to disable checksum creation, he would
  274. write
  275.                             VSAFE /2+ /8+ /6- /D
  276. After VSafe goes resident, its menu can be called up at any time by pressing
  277. Alt-V.  (The hot key can be changed to any other Ctrl or Alt combination.)  Any
  278. of the above 8 options can be toggled on or off at that time, making this one
  279. of the most convenient and flexible monitoring programs available.  However, I
  280. find it most unfortunate that this toggling is not available for checksum
  281. creation and integrity checking also.  If the user wishes to unload the program
  282. at any time, he either presses Alt-U when the menu is up or types VSAFE /U at
  283. the command line.
  284.   It should be noted that if MSAV is activated while VSafe is resident, MSAV
  285. turns off the eight VSafe options (in order to prevent double scanning).  When
  286. MSAV finishes, it restores the original options.  (Actually, it does not
  287. *always* restore them; see the section Bugs below.)
  288.  
  289.   In order to test the generic features of VSafe without "interference" from
  290. its known-virus scanner, it would ordinarily be necessary to restrict oneself
  291. to new viruses for which scan strings have not yet been included.  I took a
  292. different approach.  Many of the test viruses which I used were known, but I
  293. simulated unknown viruses by first zeroing out all the scan strings inside of
  294. VSAFE.COM.  Option 2 turned out to be quite successful; it was able to detect
  295. all attempts to go resident by the viruses at my disposal (even though the
  296. mechanism used to detect this seems to be interrupt interception rather than
  297. actual memory residence).  Option 8, on the other hand, performed rather
  298. poorly; there were several situations in which it failed to note that an
  299. executable had been modified.  In particular, when I deliberately allowed the
  300. Frodo virus (which MSAV calls the "100 Years" virus) to go resident, VSafe
  301. did not detect subsequent infections of files.  Due to time constraints, I was
  302. unable to test the other options thoroughly, but it is safe to assume that all
  303. options of VSafe (in fact, those of all other generic monitoring programs as
  304. well) can be bypassed by sufficiently clever viruses.
  305.  
  306.   As in the case of MSAV, I question the choice of default options.  Why are
  307. Options 2, 7 and 8 off by default?  True, false alarms will be sounded by
  308. Option 2 if the user activates a legitimate resident program after VSafe has
  309. been loaded, by Option 7 if he tries to format a diskette, and by Option 8
  310. under some other conditions (e.g. whenever I tried to download an executable
  311. file to my PC by means of FTP, VSafe told me that "File xxxxxxx.xxx is about
  312. to be changed", even though there was no such file by that name before the
  313. download).  However, in my experience such false alarms were rare.  Moreover,
  314. if a program which is about to be executed is infected by a virus which is
  315. unknown to VSafe, there is no possibility of preventing it from going resident,
  316. of infecting another file, or of infecting a diskette's boot sector without
  317. Option 2, 8 (or 3), and 7, resp.  In my opinion, the best way to handle such a
  318. conflict is to reduce the frequency of the false alarms by making further
  319. checks wherever possible, and to set the defaults for such options to On.
  320. However, the program developers chose Off as the default settings of these
  321. options, apparently considering the risk of viral infection to be less than the
  322. annoyance of false alarms.
  323.  
  324.   If expanded memory is available, VSafe will load itself there (7K of conven-
  325. tional memory plus 64K of EMS memory); otherwise in extended memory (23K of
  326. conventional plus 23K of XMS); otherwise entirely in conventional memory
  327. (44K).  There are parameters to prevent loading in EMS or XMS memory if the
  328. user so desires.
  329.   Usually the additional time required for VSafe to perform its checks is not
  330. noticed by the user.  I did notice a delay, however, whenever I pressed
  331. Ctrl-Alt-Del, in which case VSafe requires a few seconds to check the boot
  332. sector of the diskette in drive A:, but this is probably unavoidable.
  333.  
  334. INTEGRITY CHECKING
  335. ==================
  336.   Integrity checking means detection of modifications in files and boot re-
  337. cords.  In principle, implementation of such a technique should catch subse-
  338. quent infections due to almost any type of virus, known or unknown.  In MSAV
  339. and VSafe, integrity checking is optional, but enabled by default.  It can be
  340. controlled by the Create New Checksums and the Verify Integrity options of MSAV
  341. and the /D option of VSafe.  For any given file, the information recorded and
  342. checked by either of these programs consists of the date, time, attributes and
  343. size of the file, and a 16-bit checksum for it.  This information is stored in
  344. a database named CHKLIST.MS, 27 bytes per file (12 bytes for the name, 2 for
  345. the file checksum, and 13 for the other information, including a special
  346. checksum on the rest of the entry), in the directory in which the file resides.
  347. (In the following description, I will often speak only of MSAV even though
  348. something similar usually applies to VSafe also.)
  349.   If the Verify Integrity option is on and the above information already exists
  350. in the database, the program computes a checksum of each file in its present
  351. form and compares the new information against the recorded information.  If a
  352. mismatch is found by MSAV, an alarm is sounded and the user is given a choice
  353. between Update, Delete, Continue and Stop, provided MSAV is used interactively.
  354.   If the Verify Integrity option is on, the program performs known-virus
  355. scanning only if the checksums do not match, or if no checksum is stored for
  356. the file in question (except that if the date of the CHKLIST.MS file is older
  357. than the date of the MSAV.EXE file, the checksums in CHKLIST.MS are ignored,
  358. and re-created if Create New Checksums is on).  As a result, not only does
  359. integrity checking protect against unknown viruses, but checking usually re-
  360. quires much *less* time when Verify Integrity is on than when it is turned off.
  361. It would seem, then, that there is never any reason to disable integrity
  362. checking.
  363.   MSAV's implementation is such, however, that this conclusion is not entirely
  364. true.  One reason is the relatively large amount of disk space which the data-
  365. bases take up due to the unfortunate design decision to have a separate one for
  366. each directory.  For example, if a user has 150 directories on his disk, the
  367. databases will take up a minimum of 300K.  Another reason is that in practice,
  368. MSAV/VSafe's checksumming is not completely secure (see below), so that the
  369. software might erroneously decide that there is no mismatch and therefore skip
  370. the known-virus scan.
  371.   Because of the first reason, MSAV has a command Delete Checksums, available
  372. when the menu is up, by means of a function key (F7).  This deletes all the
  373. checksum databases on the current drive in order to save disk space, at the
  374. expense of losing the integrity checking.
  375.   Another MSAV option is called "Create Checksums on Floppy".  The description
  376. goes as follows: "When this option is selected along with Create New Checksums,
  377. a CHKLIST.MS file is created for each directory on a floppy disk as it is
  378. scanned.  This option is useful for creating checksums ... of files on floppy
  379. disks before write-protecting the disk."  While it is clear that the databases
  380. are to be created on a diskette, it is not entirely clear whether the files
  381. which are to be checksummed are those on the hard disk or those on that disk-
  382. ette.  Some reviewers of CPAV have assumed, apparently without bothering to
  383. test it, that the former is the intended interpretation (this could greatly
  384. enhance security).  However, in actuality, it is the latter which is the true
  385. intent.
  386.   Note that when a modification is detected by MSAV or VSafe, the user is left
  387. to decide for himself whether or not the modification is due to a virus.  There
  388. are other integrity checkers which apply heuristics in order to help the user
  389. to decide this.
  390.  
  391. PECULIARITIES IN THE DOCUMENTATION
  392. ==================================
  393.   Concerning the Delete Checksums command of MSAV, the on-line help contains an
  394. extremely curious passage: "For maximum confidence, delete the checklist files
  395. periodically"!  The "periodically" part makes sense only if the user keeps the
  396. Create New Checksums option on (something which the on-line help advises him
  397. *not* to do).  In that case, the databases will be built anew, except that
  398. meanwhile some of the files might become infected, so that the next time the
  399. checksums will be based on *infected* files instead of uninfected ones. How can
  400. *deleting the databases* possibly contribute to *confidence*?!?
  401.   MSAV's on-line glossary defines a checksum as "a value derived from the exe-
  402. cutable file's size, attributes, date, and time."  This is *not* the way the
  403. term is normally used.  Ordinarily, a checksum is derived from the *content*
  404. of the file.  In actuality, MSAV's checksums are functions of the content also
  405. (albeit of only a small part of it; see below).
  406.   The Upgrade manual (p. 64) defines computer viruses as "programs designed to
  407. replicate and spread".  On p. 65, viruses are divided into three types: boot
  408. sector viruses, file infectors, and ... "Trojan horse viruses".  The last type
  409. is defined as a type of virus that "is disguised as a legitimate program.  ....
  410. Trojan horse viruses are much more likely to destroy files or damage disks than
  411. other viruses."
  412.   Aside from the unusual description of Trojan horses as a subset of the
  413. viruses, there are several very confusing (if not dangerous) consequences of
  414. such a definition and classification: (1) It follows from this definition of a
  415. Trojan horse and that of a virus that all Trojan horses replicate (this is
  416. incorrect by any accepted definition of a Trojan horse; on the contrary, many
  417. people reserve this term precisely for malicious programs which do *not* re-
  418. plicate); (2) the reader is left with the erroneous impression that Trojan
  419. horses do not reside in either files or boot sectors (where *do* they reside?),
  420. and (3) that file and boot-sector viruses, as opposed to Trojan horses, do
  421. little or no damage.  (As other people use these terms, both of these types of
  422. viruses can do *a great deal* of damage.)
  423.  
  424. BUGS
  425. ====
  426.   MSAV displays the message "Invalid option" in certain cases where it is not
  427. at all appropriate, one example occurring if the user specifies the name of a
  428. non-existent file on the command line.
  429.   A much more serious bug is the following:  We mentioned above that if MSAV is
  430. activated while VSafe is resident, MSAV turns off the eight VSafe options and
  431. later restores them ... or rather, is *supposed* to restore them.  We also
  432. mentioned that while MSAV allows limiting the scan to a specified file, it does
  433. not support wildcard notation.  But since this shortcoming is not mentioned
  434. specifically in the documentation, it is natural for the user to assume that
  435. MSAV does support such notation.  Yet if he activates MSAV with an asterisk
  436. within the file specification on the command line, and the non-asterisked part
  437. matches at least one existing file, MSAV will display the message "Access
  438. denied" and return to the DOS prompt without performing any action.  But mean-
  439. while, MSAV has turned off the eight VSafe options.  The bug consists in the
  440. fact that in this case, MSAV *fails to turn the VSafe options back on again*,
  441. so that although VSafe is still resident, *the user is left without the pro-
  442. tection of these options*!
  443.   Finally, it seems there are bugs in detection of MtE-encrypted viruses.  The
  444. Virus Bulletin reports that MSAV consistently locks up after detecting 255
  445. samples of such viruses.  Also, Vesselin Bontchev of the VTC has found a file,
  446. created during generation of MtE replicants, scanning of which causes MSAV to
  447. hang.
  448.  
  449. SECURTTY HOLES
  450. ==============
  451.   By a "security hole" is meant a way of circumventing the protection which a
  452. program is supposed to provide against attacks.  I am aware of the following
  453. security holes in the generic features of VSafe and MSAV:
  454.  
  455. 1. It's trivial for a virus to disable VSafe.  All it has to do is load certain
  456.    values into the AX and DX registers and call a certain interrupt (in fact,
  457.    any one of three interrupts will do), and voila, VSafe either has all its
  458.    options disabled or it is completely unloaded from memory (depending on the
  459.    value loaded into AX), without the user being aware that his protection has
  460.    disappeared!  This trick (in its option-disabling form) is used by the
  461.    Tremor virus.  By their very nature, resident programs are more vulnerable
  462.    than non-resident ones, but to make the protection unloadable by a mere 8
  463.    bytes of code is making the job absurdly simple for the virus writers.
  464.    It's probably only a matter of time until this and several other tricks
  465.    mentioned below get incorporated into the various virus construction kits
  466.    available in the virus "underground".
  467.  
  468. 2. While VSafe's generic monitoring detects most viral modifications to already
  469.    existing executable files, it does not detect creation of a new executable
  470.    file (important for detecting companion viruses), modifications made to a
  471.    file with a *non*-executable extension, or renaming of files.  Thus a virus
  472.    could alter the extension of an executable file, infect it, then rename it
  473.    back.  Or it could create an infected file under a different name, delete
  474.    the original file, and rename the infected file to the original name.  The
  475.    Suriv viruses use this technique.
  476.  
  477. 3. Since the earliest that Microsoft's VSafe can be loaded is at the beginning
  478.    of execution of AUTOEXEC.BAT (in Central Point's software, VSafe can be
  479.    loaded as a device driver), it cannot be effective when the code in the
  480.    Master Boot Record, the DOS boot sector, COMMAND.COM, the other system
  481.    files, or device drivers is executed, hence it cannot prevent viruses in
  482.    these regions from loading themselves into memory.  (Almost all of this is
  483.    true of other generic monitoring programs as well.)  This would not be so
  484.    bad if MSAV could checksum the DOS boot sector and the Master Boot Record,
  485.    but it does not.  In Central Point's software, there is a program called
  486.    "BootSafe" which compares these two regions against previously created
  487.    copies.  However, for some peculiar reason, this program is not included in
  488.    MS-DOS 6.  As a result, *there is no protection in Microsoft's software
  489.    against unknown boot-record infectors*.
  490.  
  491. 4. Although VSafe seems capable of detecting most attempts of viruses to stay
  492.    resident, there are ways in which a virus could gain as much control as a
  493.    resident program without hooking interrupts in any sense of the term.
  494.    Monitoring programs such as VSafe do not prevent these.
  495.  
  496. 5. Since the MSAV.INI file is unencrypted and not normally checked for integri-
  497.    ty, a virus could modify it so as to disable options such as Verify Integri-
  498.    ty and Anti-Stealth.  (Since the file name is fixed, it would not be hard to
  499.    find the file, regardless of what directory it's located in.)
  500.  
  501. 6. Companion viruses (e.g. Aids-II, Twin-351, Mithrandir) do not modify exist-
  502.    ing files, but create new ones which get executed before the target program.
  503.    The integrity checking of MSAV and VSafe does not detect infection by this
  504.    type of virus.  (As mentioned above, the generic monitoring feature does
  505.    not detect it either.)
  506.  
  507. 7. A simple way for a virus to defeat the integrity checking is to alter the
  508.    checksum database, deleting the entry (name and information) for a file just
  509.    before infecting it.  An even simpler way is to delete the entire checksum
  510.    database.  The user will notice nothing unusual since if a database is de-
  511.    leted (and the Create New Checksums option is on), MSAV will simply start
  512.    creating the database anew as if one never existed, this time using the
  513.    *infected* files as a basis for future comparison instead of the original
  514.    ones!  Viruses which exploit this weakness are the Peach, Groove, and
  515.    Encroacher viruses.  (The Peach and Encroacher viruses are directed specifi-
  516.    cally against CPAV, while the Groove virus targets checksum databases of
  517.    certain other programs as well, but in the case of some of these programs,
  518.    the user will *notice* that something unusual has happened.)  It is only
  519.    necessary to add the name of MSAV's checksum database to make them effective
  520.    against MSAV also.
  521.  
  522. 8. A good checksum algorithm for AV use will be based on different (unknown)
  523.    keys (or passwords) for different users.  MSAV/VSafe's algorithm does not do
  524.    this.  Thus even if it were impossible to delete the checksum database or
  525.    any of its entries, it would still be possible for a virus writer to incor-
  526.    porate the checksumming code from MSAV.EXE or VSAFE.COM into his virus, so
  527.    that after infecting a file, it could compute the checksum of the infected
  528.    file and modify the checksum and file length in the database according to
  529.    the new values.
  530.  
  531. 9. In order to increase speed, MSAV and VSafe do not checksum the entire file,
  532.    but only its first 63 bytes.  Thus a virus which alters only other parts
  533.    of the file and preserves the first 63 bytes, the file size, date/time, and
  534.    attributes will not be detected by the integrity checking of MSAV or VSafe.
  535.    Almost all viruses preserve the date, time and attributes, there are viruses
  536.    (e.g. ZeroHunt) which preserve the file length (this is possible also by
  537.    other tricks not used in any current virus), and there are viruses (e.g.
  538.    LeapFrog) which avoid modifying the beginning of files.  Thus while I do not
  539.    know of any current virus which preserves *all* of these things together
  540.    (without depending on stealth techniques), there is no doubt that such a
  541.    virus can (and therefore probably will) be written.
  542.  
  543. 10. Even if it were made impossible to modify the checksum database, the fact
  544.    that the checksumming algorithm does not employ a user-dependent key is
  545.    still a weakness if the algorithm is a relatively trivial one, for in that
  546.    case it might be easy to "forge" checksums: i.e. after the virus modifies
  547.    a file F into a file F' it may be able to adjust some data area within F'
  548.    so that the result has the same checksum as the original file F.  (And even
  549.    if the virus writer cannot find a simple method of doing this, the fact that
  550.    the checksums of MSAV/VSafe are only 16 bits long may make it feasible to
  551.    use trial and error to find a suitable adjustment to F'.)
  552.  
  553.   I do not wish to give the impression that Microsoft's (and Central Point's)
  554. is the only AV software having such security holes.  Nevertheless, the fact is
  555. that these holes could have been blocked had the software developers given
  556. sufficient thought to the matter.  (That this is possible is shown by the fact
  557. that there is at least one product whose integrity checker is almost completely
  558. free of the relevant security holes mentioned above.)
  559.   Note in particular that keeping a separate database for each directory not
  560. only uses up a lot of disk space, but also makes it very difficult to block
  561. some of these holes.  For example, were there only a single database for the
  562. entire drive, it would be very simple to store the checksums for the hard disk
  563. on a diskette, which could then be write-protected.  (Similarly, MSAV could
  564. give the user the choice of where to locate the database on the drive, making
  565. it more difficult for the virus to find the database, especially if the name of
  566. the database were also selectable by the user.)
  567.   Note also that I am not revealing any deep secrets by mentioning these
  568. security holes.  Most are well known to many virus writers, as is evidenced by
  569. the examples of existing viruses cited above which exploit them.  In fact,
  570. sometimes one gets the impression that the only people who *don't* know of
  571. these holes are the AV product developers and reviewers of AV software!  In the
  572. case of the former group, perhaps many of them are indeed aware of some of
  573. these holes, but apparently either they think that such holes are too "theore-
  574. tical", obscure or product specific for anyone to exploit them, or else manage-
  575. ment priorities are such that the developers must devote their energies to the
  576. graphic interface and other features which make a good impression on the public
  577. and the reviewers rather than to genuine security.  In other words, here as in
  578. so many other fields, the driving force is often sales at the expense of
  579. quality.
  580.  
  581. CONCLUSIONS AND CONJECTURES
  582. ===========================
  583.   KNOWN-VIRUS SCANNING.  This part of the software scores lower than most other
  584. scanners, in both percentage detected and speed.  Moreover, it cannot detect
  585. viruses within compressed executables.
  586.   GENERIC MONITORING.  VSafe supplies this in a manner which is more flexible
  587. than most other programs of this type.  However, there is considerable room for
  588. improvement in some of the monitoring capabilities, some viral tricks are com-
  589. pletely undetectable, and the monitoring can be completely disabled (see parti-
  590. cularly Security Holes 1 and 2 above).
  591.   INTEGRITY CHECKING.  Non-existent on boot sectors and the Master Boot Record.
  592.  On files, it is easily bypassed in many ways (see Security Holes 6-10 above).
  593. The decision to maintain a separate database for each directory is a poor one,
  594. not only because of the waste of disk space, but also because it greatly hin-
  595. ders the blocking of some of the security holes.
  596.  
  597.   One of the things which differentiates a good AV program from a mediocre one
  598. is in whether the developers concern themselves with guessing what types of
  599. tricks a virus writer might adopt in order to bypass the various types of pro-
  600. tection, and modify their software accordingly.  Some developers have done this
  601. to a greater or less extent.  Most of them, including the developers of
  602. MSAV/VSafe, have evidently not made a sufficient effort in this direction.
  603.   Because of these security holes and the fact that Microsoft's software will
  604. probably become the de facto standard, I predict that during 1993 virus writers
  605. will turn more and more to viruses which target specific weaknesses of the
  606. generic part of the software.
  607.   Will the software be modified to correct these problems?  Minor bugs, probab-
  608. ly yes.  However, blocking some of the security holes would require such a
  609. radical redesign of the whole system that this is highly unlikely.  Moreover,
  610. if past experience is any guide, even the problems with less drastic solutions
  611. will take years to be corrected, if at all.  For years users complained that
  612. they could not use any other scanner after CPAV, since it did not bother to
  613. encrypt its scan strings, thus causing other scanners to detect its strings in
  614. memory buffers or in the CPAV.EXE and VSAFE.COM files themselves, and producing
  615. false alarms.  My tests indicate that this problem has finally been corrected,
  616. but it has taken much too long.
  617.   Despite suggestions to Microsoft that it include validation and/or protection
  618. as part of the operating system, it seems to have chosen the easy path.  In my
  619. opinion, it was a poor choice on Microsoft's part to adopt Central Point's AV
  620. software, and probably a mistake on their part to include add-on AV software at
  621. all.  True, many people who had never before installed AV software will now do
  622. so, and this seems to be a benefit.  However, they will be under the false
  623. impression that they are well protected.  Microsoft may shrug its collective
  624. shoulders; after all, since when has MS-DOS been noted for high quality?  But
  625. just as the software will be a tempting target for virus writers, so Microsoft
  626. may become a tempting target for lawsuits.  If McAfee Associates could be sued
  627. by Imageline for a false alarm, what is to be expected when the responsible
  628. party is Microsoft?
  629.  
  630. ACKNOWLEDGMENTS
  631. ===============
  632.   Every effort has been made to make this evaluation as accurate as possible.
  633. I wish to express my thanks to Yuval Sherman, head of the Israeli team develop-
  634. ing this software, for supplying answers to my many questions, and to Vesselin
  635. Bontchev of the Virus Test Center in Hamburg for his comments on an earlier
  636. version of this paper.  Needless to say, all opinions expressed herein (and
  637. errors, if any) are mine alone.
  638.  
  639. ------------------------------
  640.  
  641. End of VIRUS-L Digest [Volume 6 Issue 84]
  642. *****************************************
  643.