Web Server Attacks
Attacks on various servers like Apache, Nginx and Tomcat
Tomcat
Service Discovery
$ curl -s http://target/docs/ | grep Tomcat Generic structure of a Tomcat installation
โโโ bin
โโโ conf
โ โโโ catalina.policy
โ โโโ catalina.properties
โ โโโ context.xml
โ โโโ tomcat-users.xml <-- user credentials and roles
โ โโโ tomcat-users.xsd
โ โโโ web.xml
โโโ lib
โโโ logs
โโโ temp
โโโ webapps
โ โโโ manager
โ โ โโโ images
โ โ โโโ META-INF
โ โ โโโ WEB-INF
| | โโโ web.xml <-- describes routes and classes
โ โโโ ROOT
โ โโโ WEB-INF
โโโ work
โโโ Catalina
โโโ localhostImportant pages are /manger and /host-manager with default weak passwords like tomcat:tomcat or admin:admin
Bruteforcing
WAR backdoor upload
After logging into the manager console, upload backdoor cmd.jsp
Upload the file
Browse -> Deploy the war file, and execute commands with
Ghostcat
LFI vulnerability that can only read files within the web apps folder, so it can't access /etc/passwd
Last updated