On a new installation of Tomcat (default config files), you'll notice that your server.xml file is set up with a shutdown port of 8005, and shutdown="SHUTDOWN". What does this mean?
It means that anyone who contacts the server locally on port 8005 and send it the words SHUTDOWN can cause Tomcat to close out all its web applications and shut down cleanly. Yikes - is this a security hole of what?
It could be. Fortunatly , you'll notice that I said it's a LOCAL connection to the port that causes a shutdown, so it no-one can ssh or telnet in, nor log in from the keyboard unless they're an admin, it might not be a problem ....
If your Tomcat server allows anyone except the administrator to log in with a shell, then I strongly suggest you change shutdown="SHUTDOWN" to shutdown="waSS-I41tis" so that at least it won't be a string that any hacker can guess. You might like to change the port number too. Alas, it would be unwise to disable the facility completely, since catalina.sh and shutdown.sh use the port (details read from the config file) as part of their processing. At least server.xml is neither group nor world readable.
waSS-I41tis => "
what
a STUPID
SYSTEM -
I for one think
it's
silly"
(written 2006-08-18 19:12:05)
Associated topics are indexed under
A652 - Web Application Deployment - Tomcat -Sourcing, Installing and Initial Testing [2088] Changing the 404 - file not found - page in Tomcat - (2009-03-18)
[1550] Java (JSP and Servlet examples) live on our server - (2008-02-23)
[1049] Java 6, Apache Tomcat 6. - (2007-01-21)
A654 - Web Application Deployment - Configuring and Controlling Tomcat [2652] Reading and writing cookies in Java Servlets and JSPs - (2010-02-26)
[2163] CATALINA_OPTS v JAVA_OPTS - What is the difference? - (2009-05-09)
[2061] Tomcat 6 - Annotated Sample Configuration Files - (2009-03-01)
[2039] The Invoker - (2009-02-13)
[1994] tomcat-users.xml; what a difference a space made - (2009-01-16)
[1943] Port and Glasses - (2008-12-14)
[1762] WEB-INF (Tomcat) and .htaccess (httpd) - (2008-08-20)
[1553] Automatic startup and shutdown of Tomcat - (2008-02-24)
[1503] Web page (http) error status 405 - (2008-01-12)
[1370] Apache Tomcat Performance Tuning - (2007-09-29)
[1351] Compressing web pages sent out from server. Is it worth it? - (2007-09-14)
[914] A practical example of roles - (2006-11-04)
[907] Browser -> httpd -> Tomcat -> MySQL. Restarting. - (2006-10-28)
Some other Articles
Forum help - a push in the right directionComputers, Brides and Cream TeasReporting on the 10 largest files or 10 top scoresTalking about other training companies.Tomcat - Shutdown portBuild on what you already have with OOPython - when to use the in operatorPython makes University ChallengeOld Wardour CastleDisplaying data at 5 items per line on a web page