portswigger-all-labs

Complete PortSwigger Web Security Academy Lab Writeups Detailed, categorized solutions for every lab — from APPRENTICE to EXPERT — covering all 30 vulnerability types.

View on GitHub

Labs Covered

This write-up focuses on the following APPRENTICE-level lab from the PortSwigger Web Security Academy:

1 File path traversal, simple case

This lab demonstrates how attackers can exploit insufficient validation of user-supplied file paths to read arbitrary files on the server.

LAB 1 - File path traversal, simple case

Lab Description :

image

Overview:

image

Solution :

When we load the page, we get several items with its images, a request is being made to retreive the images from the server.

The captured request looks like ,

image

To retrieve /etc/passwd:

GET /image?filename=../../../etc/passwd

image

And lab is solved

image