Chapter 14: Tomcat Security Removing JSP and Servlet
Monday, August 17th, 2009Chapter 14: Tomcat Security Removing JSP and Servlet Examples While neither of these JSP or servlet examples presents any known security risks (other than providing obvious targets for Denial of Service attacks), it s a good idea to delete them. They provide no useful functionality, and the possibility exists that attackers can exploit them. They are located in the following location: $CATALINA_HOME/webapps/examples Deleting the examples application is as simple as removing the examples directory and everything under it. Changing the SHUTDOWN Command By default, the Tomcat SHUTDOWN command works by connecting to a special Tomcat socket on port 8005 and sending the following character sequence: SHUTDOWN Tomcat provides no authentication mechanism to restrict clients from connecting to Tomcat, sending these characters, and shutting down Tomcat. You can try it yourself by using Telnet. The easiest way to prevent unauthorized use of this functionality is by blocking port 8005 with a firewall. If this is not possible for whatever reason, the system administrator should change the port and the SHUTDOWNcharacter sequence by editing the following line of the TOMCAT_INSTALLATION/conf/ server.xmlfile:
For high quality website hosting services please check tomcat web hosting website.