home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / virus / 4999 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  3.7 KB

  1. Path: sparky!uunet!ukma!cs.widener.edu!dsinc!netnews.upenn.edu!netnews.cc.lehigh.edu!news
  2. From: eugene@kamis.msk.su (Eugene V. Kaspersky)
  3. Newsgroups: comp.virus
  4. Subject: Re: How to measure polymorphism?
  5. Message-ID: <0003.9301281842.AA17847@barnabas.cert.org>
  6. Date: 18 Jan 93 18:46:29 GMT
  7. Sender: virus-l@lehigh.edu
  8. Lines: 90
  9. Approved: news@netnews.cc.lehigh.edu
  10.  
  11. Hi all,
  12.  
  13. Vesselin Vladimirov Bontchev writes:
  14.  
  15. > There are already two polymorphic engines available (MtE and TPE) and
  16. > we are going to see more and more polymorphic viruses in the future.
  17. > An interesting question arises - how to determine how polymorphic a
  18. > virus is? How to determine which of two viruses is "more polymorphic"?
  19. > In other words - how to measure polymorphism in an objective way?
  20.  
  21. [skipped]
  22.  
  23. > This article is not meant to provide a solution of the problem. I am
  24. > trying just to explain the problem and am asking for solutions. Any
  25. > ideas are welcome - we really need an objective way to measure the
  26. > level of polymorphism...
  27.  
  28. I see three ways to detect polymorphic and encrypted viruses. The
  29. first way consist of analysis of decryption routine. If opcodes of
  30. this routine is satisfied to the specific conditions the object is
  31. detected as infected. On the second way the analyzer try to decrypt
  32. the virus body and detects the virus by *decrypted* mask. The third
  33. way is to use reduced masks for virus detection.
  34.  
  35. The polymorphic level for the same virus on the difference ways can be
  36. difference also. For example, the Phoenix virus is polymorphic, but
  37. the decryption routine has the constant length and the body of the
  38. virus is XORed with a key, so it's easy to decrypt this virus and it's
  39. difficult to analyze the decryptor opcodes.
  40.  
  41. You can use not only the virus mask, but the reduced mask also for
  42. this and other viruses. The file infected by Phoenix virus contains
  43. the encrypted code (s[0], s[1], s[2], s[3], ... , s[l]). The mask
  44. reduced by XOR instruction contains the bytes that are *constant* for
  45. all the infections: ( s[0] XOR s[1] , s[1] XOR s[2] , ... , s[l-1] XOR
  46. s[l] ).  On this way Phoenix virus is *not* polymorphic, because it
  47. has the constant reduced mask. You can use several reduced masks : XOR
  48. word, ADD word, ADD byte, ROL, etc.
  49.  
  50. > 2) The second idea is to divide the polymorphism is classes. Class 0
  51. > means no polymorphism, class 1 means variable encryption with constant
  52.  
  53. It's a good idea, but we can set the virus to several classes by
  54. several criterion also. It will be a vector of classes: ( class on
  55. condition_1, class on condition_2, ... ).
  56.  
  57. I see several conditions:
  58.  
  59. 1) number of possible encryption algorithms: 0 - if the virus not
  60. encrypted (Commander Bomber), 1 - for Cascade and Phoenix, 4 - for
  61. Girafe (XOR word, XOR byte, ADD word, ADD byte), ? - for MtE.
  62.  
  63. 2) the diapason of length of decryption routine;
  64.  
  65. 3) the number of different decryption routines;
  66.  
  67. 4) the number of different opcodes used by decryption routine, it
  68. doesn't matter if the number of different decryption routines is small
  69. (Whale);
  70.  
  71. 5) the diapason of number of control transferring except decryption
  72. loop opcode (for Girafe and Bomber).
  73.  
  74. So, the polymorphic vector for
  75. Cascade is (1,0,1,1,-,0),
  76. for MtE is (?,512,?,*,0),  * means that I don't know, but it's easy to analyze.
  77.  
  78. The polymorphism of virus can be defined as the vector length:
  79. 1) + 2) + 3) +4) +5).
  80.  
  81. That's all.
  82.  
  83.  
  84. Note:
  85.  
  86. > criterium, the MtE-based viruses have polymorphism 1 - because all
  87. > decryptors contain only a single constant byte (the JNZ instruction),
  88. > which does not appear at a constant place.
  89.  
  90. MtE generator can produce decryption routine *without* decryption
  91. loop, i.e. the body of virus *not* encrypted and JNZ instruction not
  92. present.
  93.  
  94. Best regards,
  95.  
  96. Eugene
  97.  
  98. - -- 
  99. - --  Eugene Kaspersky, KAMI Group, Moscow, Russia  
  100. - --  eugene@kamis.msk.su, +7 (095) 499-1500
  101.