I have a Java Web App running on Tomcat on which I'm supposed to exploit Path traversal vulnerability. There is a section (in the App) at which I can upload a .zip file, which gets extracted in the server's /tmp
directory. The content of the .zip
file is not being checked, so basically I could put anything in it. I tried putting a .jsp
file in it and it extracts perfectly. My problem is that I don't know how to reach this file as a "normal" user from browser. I tried entering ../../../tmp/somepage.jsp
in the address bar, but Tomcat just strips the ../
and gives me http://localhost:8080/tmp/
resource not available.
Ideal would be if I could somehow encode ../ in the path of somepage.jsp
so that it gets extracted in the web riot directory of the Web App. Is this possible? Are there maybe any escape sequences that would translate to ../
after extracting?
Any ideas would be highly appreciated.
Note: This is a school project in a Security course where I'm supposed to locate vulnerabilities and correct them. Not trying to harm anyone...