๐Ÿงช Lab Info

๐Ÿ” Vulnerability:

This lab contains a path traversal vulnerability in the display of product images.

โš ๏ธ The application strips path traversal sequences (e.g., ../) from user-supplied input before using it.


๐ŸŽฏ Goal

Retrieve the contents of the file:

/etc/passwd


๐Ÿชœ Steps to Solve

  1. ๐Ÿง  From the lab description, we understand that the application removes path traversal patterns like ../.
  2. ๐Ÿ’ก To bypass this filter, we can use a payload obfuscation technique โ€” by duplicating or obscuring the traversal sequence using redundant slashes.

๐Ÿงช Final Payload Idea

We craft an alternative version of the payload that avoids being stripped

../../../etc/passwd  => ....//....//....//etc/passwd

๐Ÿ‘‰ This bypasses the basic ../ stripping mechanism and still resolves to the desired file path

image.png

๐Ÿ“ธ Result:

๐Ÿ“„ You should now see the contents of the /etc/passwd file