Tomcat Vulnerability--execution via put remote code

Source: Internet
Author: User

Original link: http://www.dubby.cn/detail.html?id=9034

This article is only for technology sharing, any use of technology in the conduct of the article is irrelevant.

This is one of the vulnerabilities that Tomcat released on 2017.9.19 Day:

According to the message description, we have the Windows version of Tomcat 7.0.79, after the installation is successful, we need to allow Tomcat to put operations, that is, modify/conf/web.xml:

<servlet>
        <servlet-name>default</servlet-name>
        <servlet-class> org.apache.catalina.servlets.defaultservlet</servlet-class>
        <init-param>
            <param-name >debug</param-name>
            <param-value>0</param-value>
        </init-param>
        < init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value >
        </init-param>
        <init-param>
            <param-name>readonly</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</ Load-on-startup>
</servlet>

The new additions include:

<init-param>
            <param-name>readonly</param-name>
            <param-value>false</ Param-value>
</init-param>

Then start Tomcat and use postman to send a put request:

And then in the browser normal access to http://localhost:8080/helloworld.jsp:

Note: localhost:8080/helloworld.jsp/can also be replaced with LOCALHOST:8080/HELLOWORLD.JSP%20, because under Windows,%20 (spaces) and/are illegal file naming, will be removed.

Finally go to Tomcat's directory Webapps\root to see:

This is just a bug added to the file, OK, this is Tomcat put loopholes, the solution, the simplest is the upgrade.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.