Tomcat service penetration and security

Source: Internet
Author: User

Tomcat is a classic open-source middleware. It is widely used in production and has multiple instances and multiple ports for tomcat clusters. However, we need to pay attention to the security issues. Today we will give a simple demonstration of a case.

 

The first choice is to lock the target host: 192.168.1.3. Generally, the default tomcat port is 8080.

The default user name and password in the tomcat-users.xml are tomcat, tomcat

Log on to the tomcat GUI Management page.

Compress a webshell in jsp format into a zip file, and then compress it in war format without affecting File Execution.

12 zip -j shell.jsp shell.zip mv shell.zip shell.war

Select "Brower" to specify the shell. war file to upload and Deploy. Note that Undeploy can delete the file physically.

After the Desploy operation is successful, you can see that a directory named shell is automatically generated, and the status is true, which is started automatically.

Open the corresponding webshell page and enter the executed system command in the box below the page. The system information is displayed at a glance.

Cause analysis, the tomcat-users.xml has the following configuration

  <role rolename= "manager-gui" /> <user username= "tomcat"  password= "tomcat"  roles= "manager-gui" />

Comment out the configuration and restart the tomcat service to avoid security risks.

Article: http://laoxu.blog. 51 cto.com/4120547/1243308

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.