home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / +ORC / Orc pac 3 / FILEZ.ZIP / MONKEY.ZIP / MONKEY.TXT < prev    next >
Encoding:
Text File  |  1997-03-04  |  12.6 KB  |  274 lines

  1. NEW COMPUTER VIRUS THREAT                   Posted: July 9, 1992
  2.  
  3. MONKEY VIRUSES ON PCs
  4.  
  5. The Monkey viruses are main boot record/boot sector infectors,
  6. derived from the Empire D virus. Two variants of the Monkey virus
  7. have been identified. Of particular concern is the fact these
  8. viruses can infect computers protected by the Disk Secure program,
  9. while causing no noticeable changes. Symptoms of infection for
  10. those computers without Disk Secure include memory reduction and
  11. hard drive partitions which are not accessible when booting up
  12. with a floppy disk. When the viruses are active on computers
  13. without Disk Secure, total memory will be reduced by 1,024 bytes.
  14.  
  15. Monkey viruses destroy partition table data. If an infected system
  16. is booted up from a clean boot disk, DOS claims to be unable to
  17. access the hard drive partitions. A DIR C: command will return the
  18. message, "Invalid drive specification."
  19.  
  20. Detection
  21.  
  22. The simplest method of detection involves recognizing a 1K
  23. decrease in memory. The DOS commands CHKDSK and MEM will return 1K
  24. less "total conventional memory" than is normal.
  25.  
  26. Of the popular virus scanning products, only F-PROT version 2.04A
  27. finds the Monkey viruses, calling them a "New variant of Stoned."
  28. It will identify the virus in memory as well. The F-PROT Virstop
  29. driver does not recognize the Monkey viruses on boot-up.
  30.  
  31. Disk Secure version 1.15a (ds115a.zip) has a version of the CHKSEC
  32. program that will notice the presence of the Monkey viruses. Note
  33. that Disk Secure itself will not detect the infection: it is
  34. important that the CHKSEC command be called from the autoexec.bat
  35. file.
  36.  
  37. As well, a special program to find and remove the Monkey viruses,
  38. called KILLMONK, has been written at the University of Alberta.
  39.  
  40. Removal
  41.  
  42. To clean a hard disk: If you have previously saved a copy of the
  43. clean main boot record (MBR), then this can be restored. (Many
  44. anti-virus products have an automated way of doing this.) If you
  45. don't have a copy of the original MBR, and don't know what values
  46. your partition table should have, then the KILLMONK program will
  47. restore the partition table for you.
  48.  
  49. To restore diskettes: Use the KILLMONK program.
  50.  
  51. The newest version of F-PROT (version 2.04A) and the KILLMONK
  52. program, are both available, free of charge, from Computing and
  53. Network Services. Bring a formatted diskette to the Microcomputer
  54. Demonstration Centre (MDC), in the basement of the Bookstore, or a
  55. ready-made diskette can be purchased for $2.00 from the CNS User
  56. Support Centre at 302 General Services Building. These programs
  57. can also be downloaded from the MTS account VIR.
  58.  
  59. ;From: martin@cs.ualberta.ca (Tim Martin; FSO; Soil Sciences)
  60. Subject: WARNING - new viruses, Monkey.1 and Monkey.2 (PC)
  61. Date: 20 Jul 92 09:10:09 GMT
  62.  
  63. Virus Name:  MONKEY.1, MONKEY.2  (Empire variants)
  64. V Status:    New
  65. Discovery:   February, 1992
  66. Symptoms:    Memory reduction, hard drive partitions not accessible on
  67.              floppy bootup.
  68. Origin:      Alberta, Canada
  69. Eff. Length: 512 bytes
  70. Type Code:   BPRtS (Boot and Partition table infector - Resident TOM -
  71.              Stealth)
  72. Detection:   CHKDSK, F-PROT 2.04, CHKSEC from Disk Secure 1.15, KILLMONK
  73. Removal:     Cold boot from clean, write-protected floppy, replace MBR
  74. (hard
  75.              disk) or Boot Sector (floppy).
  76.  
  77. General Comments:
  78. The Monkey viruses are Main Boot Record / Boot Sector infectors,
  79. derived from the Empire D virus.  Two variants of the Monkey virus
  80. have been identified: their most obvious difference is in the initial
  81. bytes at offset 0:
  82. Monkey.1:    E9 CD 01      (JMP 02D0)
  83. Monkey.2:    EB 1E 90      (JMP 0020 ; NOP)
  84.  
  85. Both variants keep the original sector's data at offset 03h - 1fh.  In
  86. boot sectors, this region contains data required to identify the
  87. diskette format.  This solves the problem noticed with earlier
  88. variants of Empire, whereby infected 720k diskettes were sometimes
  89. unreadable.
  90.  
  91. The Monkey viruses take 1k from the top of memory.  When active, total
  92. memory will be reduced by 1024 bytes.
  93.  
  94. The Monkey viruses use stealth to protect both the MBR and diskette
  95. boot sectors.  When active in memory, Int 13h calls cannot access the
  96. infected sector of either hard disks or floppies.
  97.  
  98. The Monkey viruses are not polimorphic.  They do not encode any of the
  99. virus, as was done by some of the earlier Empire variants.  But before
  100. saving the clean MBR or boot sector to a hiding place, the Monkey
  101. viruses do encode that sector, using an "XOR 2Eh".  This creates a
  102. problem for any disinfecting program that recover the initial boot
  103. sector or MBR by copying it from the hiding place.
  104.  
  105. When a hard disk is infected, the encoded MBR is put at side 0,
  106. cylinder 0, sector 3.
  107.  
  108. When a floppy diskette is infected, the original boot sector is placed
  109. in the bottom sector of the root directory.  This means directory
  110. entries will be lost only if the root directory is nearly full -- more
  111. than 96 entries on double density diskettes, or more than 208 entries
  112. on high density diskettes.  The virus is designed to identify only the
  113. four most common diskette formats.  If the diskette is not of a
  114. recognized format, the boot sector is put on side 1, sector 3.  I have
  115. no idea what would happen to a 2.88Mb diskette, but I suspect the
  116. virus would damage the File Allocation Table, causing loss of data.
  117.  
  118. The Monkey viruses do not put any messages to the screen at any time,
  119. but the virus code does contain, encrypted, the string "Monkey",
  120. followed by bytes 1992h.  It may be significant that the chinese Year
  121. of the Monkey began in February 1992.
  122.  
  123. The most remarkable characteristic of the Monkey viruses is that they
  124. were designed as an attack on Padgett Peterson's "Disk Secure"
  125. product.  When a computer is booted from an infected diskette, the
  126. virus first checks whether Disk Secure is on the hard disk.  If it is,
  127. the virus puts itself in sector 2, rather than sector 1, and slightly
  128. modifies Disk Secure, so that Disk Secure will load the virus after
  129. Disk Secure has checked the system and loaded itself.  The monkey
  130. viruses install themselves and above Disk Secure, in memory, at offset
  131. 200h.
  132.  
  133. The Monkey viruses do not save the partition table data in place, so
  134. if an infected system is booted from a clean boot disk, DOS claims to
  135. be unable to access the hard drive partitions.  A DIR C: command will
  136. return "Invalid drive specification".
  137.  
  138. Detection:
  139. Of the popular virus scanning products, only F-PROT 2.04 finds the
  140. Monkey viruses, calling them a "New variant of stoned".  It will
  141. identify the virus in memory as well.  The F-PROT Virstop driver does
  142. not recognise the Monkey viruses, on boot-up.
  143.  
  144. Disk Secure v. 1.15a (ds115a.zip) has a version of CHKSEC that will
  145. notice the presence of the Monkey viruses.  Notice that Disk Secure
  146. itself will not detect the infection: it is important that the CHKSEC
  147. command be called from the autoexec.bat file.
  148.  
  149. The simplest detection still involves recognizing a 1k decrease in
  150. memory.  CHKDSK and MEM will return 1k less "total conventional
  151. memory" than normal.
  152.  
  153. A special program to find and remove the Monkey viruses, called
  154. KILLMONK, has been written at the University of Alberta.  I hope to
  155. make this available to the anti-virus community shortly.
  156.  
  157. Removal:
  158. The undocumented /MBR option of FDISK does remove the Monkey virus
  159. from the MBR, provided the computer was booted from a clean floppy,
  160. but it does not restore the correct partition table values.  The
  161. problem is that the partition table is not in place in sector one: the
  162. table is encoded, in sector 3.
  163.  
  164. To clean a hard disk: If you have previously saved a copy of the clean
  165. MBR, then this can be restored.  (Many anti-virus products have an
  166. automated way of doing this.)  If you don't have a copy of the
  167. original MBR, and don't know what values your partition table should
  168. have, then the KILLMONK program may be what you need.
  169.  
  170. To restore diskettes: Padgett Peterson's FIXFBR works very well,
  171. though it doesn't recognize that the disk is infected.  Another
  172. alternative is the KILLMONK program.
  173.  
  174. Scan String:
  175. The following hexidecimal string is in both variants of Monkey.  It is
  176. from the code the virus uses to recognize itself.
  177.    26 81 bf fa 01 19 92 c3 26 81 bf 19 01 50 61
  178.  
  179. Tim
  180.  
  181.   ;   From F-PROT
  182.  
  183.  Name: Monkey
  184.  Type: Boot  MBR  Stealth
  185.  
  186.  The Monkey virus was first discovered in Edmonton, Canada, in the
  187.  year 1991. The virus spread quickly to USA, Australia and UK.
  188.  Monkey is one of the most common boot sector viruses.
  189.  
  190.  As the name indicates, Monkey is a distant relative of Stoned.
  191.  Its technical properties make it quite a remarkable virus,
  192.  however. The virus infects the Master Boot Records of hard disks
  193.  and the DOS boot records of diskettes, just like Stoned. Monkey
  194.  spreads only through diskettes.
  195.  
  196.  Monkey does not let the original partition table remain in its
  197.  proper place in the Master Boot Record, as Stoned does. Instead
  198.  it moves the whole Master Boot Record to the hard disk's third
  199.  sector, and replaces it with its own code. The hard disk is
  200.  inaccesible after a diskette boot, since the operating system
  201.  cannot find valid partition data in the Master Boot Record -
  202.  attempts to use the hard disk result in the DOS error message
  203.  "Invalid drive specification".
  204.  
  205.  When the computer is booted from the hard disk, the virus is
  206.  executed first, and the hard disk can thereafter be used
  207.  normally. The virus is not, therefore, easily noticeable, unless
  208.  the computer is booted from a diskette.
  209.  
  210.  The fact that Monkey encrypts the Master Boot Record besides
  211.  relocating it on the disk makes the virus still more difficult to
  212.  remove. The changes to the Master Boot Record cannot be detected
  213.  while the virus is active, since it rerouts the BIOS-level disk
  214.  calls through its own code. Upon inspection, the hard disk seems
  215.  to be in its original shape.
  216.  
  217.  The relocation and encryption of the partition table render two
  218.  often-used disinfection procedures unviable. One of these is the
  219.  MS-DOS command FDISK /MBR, capable of removing most viruses that
  220.  infect Master Boot Records. The other is using a disk editor to
  221.  restore the Master Boot Record back on the zero track. Although
  222.  both of these procedures destroy the actual virus code, the
  223.  computer cannot be booted from the hard disk afterwards.
  224.  
  225.  There are five different ways to remove the Monkey
  226.  virus:
  227.  o       The original Master Boot Record and partition table can
  228.          be restored from a backup taken before the infection.
  229.          Such a backup can be made by using, for example, the
  230.          MIRROR /PARTN command of MS-DOS 5.
  231.  
  232.  o       The hard disk can be repartitioned by using the FDISK
  233.          program, after which the logical disks must be formatted.
  234.          All data on the hard disk will consequently be lost,
  235.          however.
  236.  
  237.  o       The virus code can be overwritten by using FDISK/MBR, and
  238.          the partition table restored manually. In this case, the
  239.          partition values of the hard disk must be calculated and
  240.          inserted in the partition table with the help of a disk
  241.          editor. The method requires expert knowledge of the disk
  242.          structure, and its success is doubtful.
  243.  
  244.  o       It is possible to exploit Monkey's stealth capabilities
  245.          by taking a copy of the zero track while the virus is
  246.          active. Since the virus hides the changes it has made,
  247.          this copy will actually contain the original Master Boot
  248.          Record. This method is not recommendable, because the
  249.          diskettes used in the copying may well get infected.
  250.  
  251.  o       The original zero track can be located, decrypted and
  252.          moved back to its proper place. As a result, the hard
  253.          disk is restored to its exact original state. F-PROT uses
  254.          this method to disinfect the Monkey virus.
  255.  
  256.  It is difficult to spot the virus, since it does not activate in
  257.  any way.  A one-kilobyte reduction in DOS memory is the only
  258.  obvious sign of its presence. The memory can be checked with, for
  259.  instance, DOS's CHKDSK and MEM programs. However, even if MEM
  260.  reports that the computer has 639 kilobytes of basic memory
  261.  instead of the more common 640 kilobytes, it does not necessarily
  262.  mean that the computer is infected. In many computers, the BIOS
  263.  allocates one kilobyte of basic memory for its own use.
  264.  
  265.  The Monkey virus is quite compatible with different diskette
  266.  types. It carries a table containing data for the most common
  267.  diskettes. Using this table, the virus is able to move a
  268.  diskette's original boot record and a part of its own code to a
  269.  safe area on the diskette. Monkey does not recognize 2.88
  270.  megabyte ED diskettes, however, and partly overwrites their File
  271.  Allocation Tables.
  272.  
  273.  
  274.