home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersguides-&-software / 40hex-10.zip / 40HEX-10.001 < prev    next >
Text File  |  1993-03-13  |  13KB  |  233 lines

  1. 40Hex Issue 10 Volume 3 Number 1                                      File 001
  2.  
  3. The following is a cursory examination of virus construction toolkits.
  4. While hardly comprehensive, it includes the basic elements of each
  5. toolkit described.  For further information, consult appendix A of
  6. the Phalcon/Skism G² code generator.
  7. ---------------------------------------------------------------------------
  8.  VIRUS CONSTRUCTION KITS, Revision 2.0  13 February 1993
  9.  
  10. Virus construction kits are  computer  programs  which  allow people
  11. with little or no programming experience to  produce new variants of
  12. computer viruses.
  13.  
  14. Two popular methods are used in  virus construction kits.  The first
  15. uses a menu driven user interface where the user is  lead through  a
  16. series of menus where he 'designs' the replication method, infection
  17. criteria  and  payload (what the virus does  when it activates). The
  18. second method uses  a skeleton  configuration  file  (ASCII  file in
  19. which virus configurations are placed) and  running a 'generator' to
  20. produce the virus.
  21.  
  22. There is an  important  factor  to  consider. First generation virus
  23. construction kits only produce assembled or compiled viruses without
  24. source  code. Second  generation  kits  produce  virus  source  code
  25. (sometimes even  commented) that can be changed and assembled by the
  26. user. The danger in second generation kits is that someone with very
  27. limited  programming  experience  can   potentially  produce  a  new
  28. computer virus without knowing anything about  the internal workings
  29. of a virus.
  30.  
  31. I would like to  stress that because virus construction kits to date
  32. use  a fair amount  of constant code (instructions),  they  pose  no
  33. threat  to  standard  virus  detection  techniques.  However, should
  34. future kits make use of  mutation  engine principles, this situation
  35. could change.
  36.  
  37.  
  38.  
  39. The following are descriptions of  virus construction kits  to date.
  40. This is a factual description as the author has access to all of the
  41. kits listed below :
  42.  
  43.  
  44. GENVIR
  45.  
  46. GENVIR was the first attempt to release a  virus construction kit for
  47. profit.  It is a  first  generation  virus construction  kit  which a
  48. menu-driven interface. GENVIR is a French program  written in 1990 by
  49. J.Struss  of Lochwiller, France. It is a  'Crippleware' program  that
  50. lets you go through  all the  motions of creating  a virus, but stops
  51. short of the compilation stage. To  receive a  working copy, one must
  52. license the software  for a fee of 120 Frances. The latest version is
  53. 1.0 and it is believed that GENVIR was never released as a functional
  54. virus construction kit.
  55.  
  56.  
  57. VCS (Virus Construction Set)
  58.  
  59. VCS is a first generation virus kit written in 1991 by a German group
  60. called  VDV  (Verband  Deutscher Virenliebhaber). VCS is a  primitive
  61. program that requires a text file  of  maximum  512  bytes length and
  62. incorporates this text into  a simple .COM file virus infector. After
  63. a specified number  of replications, the  virus will display the text
  64. message and delete AUTOEXEC.BAT and CONFIG.SYS. The latest release is
  65. version 1.0. The program text is in German,although there is a hacked
  66. version in English.
  67.  
  68.  
  69. VCL (Virus Construction Laboratory)
  70.  
  71. VCL is a complex, second generation, menu  driven  virus construction
  72. kit  written in  1992  by  Nowhere  Man  and  [NuKE] WaReZ. It allows
  73. multiple, user selectable modules to be incorporated into the  virus,
  74. together with the option of creating commented ASM (assembler) source
  75. code files that can be manually modified. The danger with this option
  76. is that a virus writer can create the  virus  kernel (without knowing
  77. much about  the  internal workings of viruses) using VCL and then add
  78. his own,custom code into the virus.The latest release is version 1.0.
  79.  
  80.  
  81. PS-MPC (Phalcon / Skism - Mass Produced Code Generator)
  82.  
  83. PS-MPC is a second generation virus construction kit, written by Dark
  84. Angel in July 1992. It is based heavily on the VCL virus construction
  85. kit. It  was  distributed  including  source  code in the C language.
  86. Although it is not  menu driven, (it uses a user  definable  skeleton
  87. configuration file to produce viruses) it creates more compact,neater
  88. commented ASM source code than VCL does. Two versions exist,the first
  89. being version 0.90beta  released  together with 40Hex (an underground
  90. electronic magazine) on 7 July 1992, and version 0.91beta released on
  91. 17 August 1992.  According to the  history  file in this release, the
  92. following as been added to the second release : a) rudimentary memory
  93. resident viruses may  be  created, b) improved optimization  of code,
  94. c) fixed minor quirks and d) got rid of "unsigned  char" requirement.
  95.  
  96.  
  97. IVP (Instant Virus Production Kit)
  98.  
  99. IVP is a second generation virus construction kit, written in 1992 by
  100. Admiral Bailey a  member  of  the  YAM  (Youngsters  Against  McAfee)
  101. underground group. According to the documentation, it was  written in
  102. Turbo Pascal version 7.0. IVP  uses a skeleton configuration approach
  103. and produces commented  source code. It  was the following features :
  104. a) .EXE  and .COM file infection,  b) Trojan  support,  c)  Directory
  105. changing, d) encryption, e) error handling, f) COMMAND.COM infection,
  106. g) overwriting option and h) random nop generator. The latest release
  107. is version 1.0.
  108.  
  109.  
  110. G2 (G Squared)
  111.  
  112. G2 is a  second generation virus construction kit, written in 1993 by
  113. Dark Angel of the Phalcon/Skism underground group.(Dark Angel is also
  114. the author of the PS-MPC virus construction  kit). This kit makes use
  115. of the skeleton configuration approach  and produces commented source
  116. code.   According  to   Dark  Angel's  documentation,  G2  is  not  a
  117. modification of the Phalcon/Skism PS-MPC kit, but a complete rewrite.
  118. It  differs from other  virus construction kits in  that it  produces
  119. easily upgradable and semi-polymorphic routines.  The  latest release
  120. is version 0.70beta, dated January 1, 1993.
  121.  
  122.  
  123.  
  124. Oliver Steudler, DYNAMIC SOLUTIONS
  125. Authorized McAfee Associates Anti Virus Agent
  126. Mail       : P.O.Box 4397, Cape Town, 8000, South Africa
  127. Internet   : Oliver.Steudler@f110.n7102.z5.fidonet.ORG
  128.              or 100075.0200@compuserve.COM
  129. Fidonet    : 5:7102/110
  130. CompuServe : 100075,0200
  131. Phone      : +27 (21) 24-9504 (GMT +2)
  132. Fax        : +27 (21) 26-1911
  133. BBS:       : +27 (21) 24-2208 [1200-14,400 bps]
  134. ---------------------------------------------------------------------------
  135. Virus construction tools are cropping up at the rate of one roughly every
  136. two months.  Additionally, new polymorphic "engines" such as the MtE, TPE,
  137. etc. are begining to emerge.  But how real is the threat from viruses
  138. generated with such tools and has this threat been exaggerated by the
  139. media?
  140.  
  141. The discussion will center on the so-called "second generation" toolkits.
  142. Perhaps the most prolific of these is Nowhere Man's VCL.  It has the most
  143. attractive interface of all the recent virus development tools and allows for
  144. a variety of activation routines; something which has been conspicuously
  145. absent from the Phalcon/Skism code generators.  However, VCL is also perhaps
  146. the least dangerous of all the toolkits, hampered by the dependance upon only
  147. one encryption/decryption routine and single, constant code base.  YAM's IVP
  148. ameliorates the problem, albeit in a highly limited and somewhat useless
  149. fashion, with the random NOP placement.  Of course, its code is based heavily
  150. upon the PS-MPC, which is also nonrandom, so it, too, is hampered.  The
  151. PS-MPC, as mentioned earlier, has but a single code base.  In short, these
  152. three toolkits are of limited utility in terms of creating nonscannable
  153. viruses "out of the box."  The generated code typically needs to be modified
  154. for the viruses to be unscannable.
  155.  
  156. So perhaps the solution lies in relying not upon a single code base, but
  157. multiple code bases and allowing for random (not the same as haphazard)
  158. placement of individual lines of code.  This is the approach of G².  G²
  159. allows for multiple code packages which accomplish a certain goal.  The
  160. program selects one of the packages for inclusion in a given virus.  In
  161. this manner, variability may be ensured.  G² further allows for the order
  162. of statements to be scrambled in the source file.  However, all G² viruses
  163. share the same structure as well as having certain bits of code in common.
  164. So, while an improvement, it is hardly the final step in the evolution of
  165. virus creation toolkits.  G² could become much more powerful with multiple
  166. virus structures as well as improved code packages.
  167.  
  168. The article above suggested that the toolkits would be much more powerful
  169. should they incorporate "mutation engine principles."  In other words, the
  170. toolkits should be able to mutate the generated code.  The IVP currently
  171. uses such an approach, albeit only with simple NOPs liberally scattered in the
  172. decryption and delta offset calculation routines.  Such code, however, should
  173. not be a goal of the authors of such toolkits.  It is simply not appropriate
  174. for a virus creator to function in such a manner.  A virus toolkit which
  175. simply spews out the same code in various forms is merely an overblown hack
  176. generator.  Toolkits exist as _aids_ in writing a virus, not as replacements.
  177. Surely including such mutation routines would result in larger viruses as well
  178. as illegible code.  A novice utilising the toolkit would not be able to learn
  179. from such unoptimised code.  Tight code which doesn't sacrifice legibility
  180. should always be the goal of virus generators.
  181.  
  182. Another aid in writing viruses is the "encryptor-in-a-box," a product such
  183. as MtE or TPE.  Such modules allow all viruses to incorporate polymorphic
  184. routines.  Yet how dangerous are such polymorphers?  As they currently exist,
  185. they pose very little threat.  Scanners have adapted not only to catch current
  186. MtE-using viruses reliably, but also to find new viruses which use decryptors
  187. created with MtE.  Certainly the TPE and any new polymorphic routines will meet
  188. the same fate.  Constant revisions of these engines, while being temporary
  189. solutions, remain just that: temporary.  Once the anti-virus industry receives
  190. a copy of the new version, the engine is once again useless.
  191.  
  192. The virus community should look beyond such "easy fixes" as virus creation
  193. toolkits and polymorphic "engines."  The simplest way to get a nonscannable
  194. virus is to write it yourself.  Not only is there the benefit of satisfaction
  195. with the work, but you gain expertise and intimate understanding of both
  196. viruses and the operating system.  Such knowledge comes only with writing
  197. several viruses on your own.  The best way for a beginner to learn how to
  198. write viruses is to figure it out on his own _without_ any examples.  Once a
  199. virus has been written in this manner, then it is appropriate to look at
  200. current virus samples to find out the various tried and true techniques.
  201.  
  202. But polymorphic engines are difficult to write, the novice virus writer
  203. protests; using MtE will vastly improve the virus.  Rubbish.  Firstly, it is
  204. a fact that scanners will be able to detect the virus, be it encrypted with a
  205. simple XOR loop or with MtE.  Writing your own encryption will be far better
  206. in terms of learning.  Secondly, polymorphic engines are _not_ terribly
  207. difficult to create.  A few hours of thinking will be sufficient to lay down
  208. the framework of a polymorphic engine.  An additional few days is enough for
  209. coding.  Even the MtE and TPE, while requiring bit-level knowledge of the
  210. opcodes, could have been written by a person with only a few years of
  211. experience programming assembly.  The advantages of writing your own
  212. polymorphic engine are obvious; anti-virus developers will have to spend much
  213. time (and space in their products) analysing and developing scanners for each
  214. individual engine; and simply adding a few extra garbling instructions should
  215. be sufficient to throw these scanners off in a future virus.
  216.  
  217. So what purpose do these tools serve?  The ultimate aim of those producing the
  218. virus creation tools should be not to enable people to go around creating new,
  219. unscannable viruses and trashing every hard drive in the world, but to allow
  220. novices to break into the field of virus writing.  It is not difficult to
  221. write a virus, but these tools certainly ease the initial pain.  Polymorphic
  222. engines are useful as examples for your own polymorphic routines.
  223.  
  224. I encourage all novice programmers to pick up a copy of Phalcon/Skism's G² and
  225. VCL, the two most prolific code generation toolkits.  Run them a few times with
  226. various parameters and analyse the code carefully.  Print out the code and look
  227. it over.  The basic principles of virus creation will be apparent after some
  228. inspection.  Learn from it and then sit down and write your own virus from
  229. scratch.
  230.  
  231.                                         Dark Angel
  232.                                         Phalcon/Skism 1993
  233.