home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / pc / virus / virass.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  3.3 KB  |  72 lines

  1. AREA:COMP.VIRUS
  2. From: p1@arkham.wimsey.bc.ca (Rob Slade)
  3. Newsgroups: comp.virus
  4. Subject: Viral code association
  5.  
  6. FUNPIV4.CVP   911020
  7.  
  8.                    Viral code "association"
  9.  
  10. The simplest way for a viral program to avoid the detection that
  11. results from modifying the code of an existing program is not to
  12. modify the original program.  This is an elementary solution,
  13. but would seem to have the drawback that, unless you do change
  14. the file in some way, the virus will never be called.
  15.  
  16. There is a "solution" to this problem, and (if I may be allowed
  17. some enthusiasm for the concept, if not the reprehensible act) a
  18. rather elegant one at that.
  19.  
  20. In a given situation, computers may be presented with a number
  21. of possible courses of action.  The action taken first is
  22. decided by pre-programmed precedence.  A number of programs may
  23. have very similar names, leading to potential confusion about
  24. which one is to be run in a given invocation.  In the case of
  25. MS-DOS, for example, SET.COM, SET.EXE and SET.BAT are all
  26. "executable" files.  In the normal course of events, any one
  27. could be invoked by giving the command "SET".  If all three
  28. files exist, which one is to be run?
  29.  
  30. The precedence of program invocation under MS-DOS is that .COM
  31. files are first, .EXE second and .BAT last.  If three files of
  32. the same name do exist, this does not imply that all three will
  33. be run in that sequence, but rather that giving the command
  34. "SET" will always invoke only the SET.COM file.
  35.  
  36. A certain class of viral programs; known variously as
  37. "companion", "spawning" or "precedence" viri; use this feature
  38. of the operating system.  They "infect" a file with an .EXE
  39. extension simply by creating another file with the same name,
  40. but a .COM extension.  Thus the .COM file is always executed in
  41. place of the original .EXE file.  The original file remains
  42. unchanged, and no manner of "change detection" will tell you any
  43. different.  (In order to further avoid detection the viral file
  44. will generally end with a very specific "call" to the original
  45. program, and the viral program has the "hidden" attribute set.
  46. In the Macintosh and other GUI operating systems, it is possible
  47. for a virus to take precendence by "overlaying" an existing icon
  48. with another which is either transparent or identical to the
  49. first.)
  50.  
  51. Fortunately, companion viri are by no means perfect.  For one
  52. thing, they are limited to those programs which are "lower" in
  53. the order of precedence.  For another, the "hidden" attribute is
  54. relatively easy to overcome (particularly in MS-DOS), and an
  55. alphabetical listing of files will quickly turn up the anomaly
  56. of identical names.  Of the antiviral packages tested so far, no
  57. change detector alerts to duplicate names, although many may
  58. alert the user by asking the user to "validate" a file that has
  59. been in use for some time.  It will probably not be long,
  60. however, before this is a common feature.
  61.  
  62. copyright Robert M. Slade, 1991   FUNPIV4.CVP   911020
  63.  
  64.  
  65. =============
  66. Vancouver          p1@arkham.wimsey.bc.ca   | "Power users think
  67. Institute for      Robert_Slade@mtsg.sfu.ca |  'Your PC is now
  68. Research into      CyberStore               |  Stoned' is part of
  69. User                (Datapac 3020 8530 1030)|  the DOS copyright
  70. Security           Canada V7K 2G6           |  line." R. Murnane
  71.  
  72.