You are currently viewing File path traversal, traversal sequences blocked with absolute path bypass

File path traversal, traversal sequences blocked with absolute path bypass

Introduction

Hello, everyone! How are you all doing? In this article, we will cover PortSwigger Web Security Lab number 2, which focuses on File Path Traversal with traversal sequences blocked using absolute path bypass. We have already covered the 1st article, so let’s start this process step by step practically.

Lab Description

In this lab, we have file upload vulnerabilities in the product images. The application has implemented certain security measures that block traversal sequences. However, we can exploit it by using absolute paths.

To solve this lab, you need to retrieve the /etc/passwd file.

Lab Description

File path traversal, traversal sequences blocked with absolute path bypass

first, you need to access the lab. Open your Burp Suite and enable the proxy. Add the target URL to the scope so that we can filter the necessary traffic later.

File path traversal, traversal sequences blocked with absolute path bypass

Now, view any product in the application and refresh the page. You will see the results in Burp’s history. Assuming you have already added the application’s URL to the scope, go to the HTTP history and select “Show only in scope” and tick the “image” option. Apply the filter.

File path traversal, traversal sequences blocked with absolute path bypass

Once you have done this, send any .jpg request to the repeater tab. We will perform further testing on this tab.

File path traversal, traversal sequences blocked with absolute path bypass

You can see that when I used filename=../../../etc/passwd, nothing was shown. Now, let’s directly use /etc/passwd.

File path traversal, traversal sequences blocked with absolute path bypass

GET /image?filename=/etc/passwd

When I used /etc/passwd, I successfully retrieved the /etc/passwd file.

So, we have successfully solved the PortSwigger Web Security Lab’s File Path Traversal with traversal sequences blocked using absolute path bypass.

You can learn everything related to web security on our website. We upload the latest articles on web security topics on a daily basis, so stay with us.

To continue studying check out the next lab i.e. File Path Traversal, Traversal Sequences Stripped Non-Recursively, cover the current lab before visiting the next lab. Good Luck!

FAQS

What is web security?

Website security refers to protecting a website or web application from cyberattacks, unauthorized access, or other security threats.

What is web application security?

Web application security means protecting a website from cyberattacks. These attacks may include vulnerabilities such as SQL injection, XSS, file inclusion, and others.

Which of the following is a good security practice for web browsing?

It is always a good practice to use an up-to-date browser with timely updates. Keep your browser plugins up-to-date, avoid malicious websites and links, and always enable 2-factor authentication while avoiding clickjacking.

How to find someone’s social security number on the dark web

Searching for someone’s social security number or credit card information on the dark web is illegal and unethical. It is important to always avoid such activities and protect yourself and others from cyber threats.

Leave a Reply