You are currently viewing File path traversal, traversal sequences stripped non-recursively

File path traversal, traversal sequences stripped non-recursively

Introduction

Hello friends, how are you all? In this article, we will cover the PortSwigger Web Security Lab’s File Path Traversal, Traversal Sequences Stripped Non-Recursively, step by step practically.

Lab Description

File path traversal, traversal sequences stripped non-recursively

This lab has a file path traversal vulnerability in the product’s images. The application has implemented security measures that we need to bypass in order to retrieve the /etc/passwd file.

Lab Solution

File path traversal, traversal sequences stripped non-recursively

To solve this lab, first access the lab. After accessing it, enable the proxy in your Burp. Also, copy the lab’s URL and add it to the scope in the Target tab of Burp. This will allow us to easily filter requests and responses.

File path traversal, traversal sequences stripped non-recursively

First, view any product in the lab. Then, go to the HTTP history and click on “Show only in-scope items” and tick the “Images” option.

File path traversal, traversal sequences stripped non-recursively

Look for a request with a .jpg file-based name and send it to the repeater tab.

GET /image?filename=/etc/passwd

After sending it to the repeater tab, I changed the filename to /etc/passwd, but I couldn’t access the /etc/passwd file.

File path traversal, traversal sequences stripped non-recursively
GET /image?filename=….//….//….//etc/passwd

Now, you can see that when I used (….//….//….//etc/passwd) instead of /etc/passwd, I successfully retrieved the passwd file.

With this, we have solved the PortSwigger Web Security Lab’s File Path Traversal, Traversal Sequences Stripped Non-Recursively.

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 With Superfluous URL-Decode, 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