Directory Traversal 01
So, our task is to exploit the directory traversal vulnerability and get the key that solves the lab
Navigate to the webpage,
Our first task will be to identify the path for directory traversal.
Checking the page source,
Lets try to access that image
Well, to test for directory traversal, we can start out by trying to view the content /etc/passwd, so we can start with the filepath ../../../../../../etc/passwd
Nice, we were able to read the /etc/passwd file.
Now, lets retrieve the key from file path /pentesterlab.key. So, we’ll have something like this ../../../../../../pentesterlab.key
submitting the key,
We have succesfully completed this lab😎
Directory Traversal 02
So, our task is to exploit the directory traversal vulnerability and get the key that solves the lab
Navigate to the webpage
Checking the source page,
Lets try to view the image
This application transmits the full file path via a request parameter, and validates that the supplied path starts with the expected folder. So to solve this we’ll include the required base folder followed by suitable traversal sequences
So, to view the content of the /etc/passwd file, we’ll have something like this /var/www/../../../../../../etc/passwd
cool stuff, we were able to view the content of the /etc/passwd file, now lets read the content of the file /pentesterlab.key
Submitting the key,
We have successfully completed the exercise
Directory Traversal 03
So, our task is to exploit the directory traversal vulnerability and get the key that solves the lab
Navigate to the webpage,
Checking the page source,
Click on that path to view it’s content
Now, lets try to read the /etc/passwd file, to do that we’ll be using NULL BYTE to get rid of any suffix added by the server-side code.
So, we’ll have something like this ../../../etc/passwd%00
cool it worked. Lets go ahead and get the key that solves this lab for us.
To get the key ../../../pentesterlab.key%00
Submitting the key,
We have successfully completed this exercise😎
That will be all for today
Back To Home