PortSwigger's Server-Side Vulnerabilities Path: What the Labs Don't Tell You (And Why Rana Khalil's Videos Fill the Gap)

 



To start learning BurpSuite I embarked on the PortSwigger Server-side vulnerabilities path (for Apprentice level). You would think this would be a course for absolute beginners. Yes and no. Let me break it down.

What you need to know:

First, it would be helpful if you took an Intro to Cybersecurity course so you understand the terminology they are talking about.

·        Path traversal

·        Access Control

·        Authentication

·        Server-side request forgery (SSRF)

·        File upload vulnerabilities

·        OS command injection

·        SQL injection

Are the areas covered in this path. They do give some information, but it’s more an overview of a topic than an in-depth explanation.

Second, watch a video of a brief overview of the BurpSuite UI. The lab jumps right into BurpSuite without discussing what each area is for. They just assume you know what a Repeater is and how to use it. There is a lot in the UI as BurpSuite is a very versatile tool, so I will cover the key areas needed and used for these labs.

When they say this is an ‘apprentice path’, they are assuming you are familiar with the BurpSuite program, but are new to the methods hackers use.

Third, Rana Khalil’s video Directory Traversal | Complete Guide gives the detailed overview that BurpSuite does not. This was recommended to me by Claude AI. The video covers:

·        What is directory traversal?

·        How do you find it?

·        How do you exploit it?

·        How do you prevent it?

(And if you so decide to, you can also check out Broken Access Control | Complete Guide)


Everything above is in retrospect after I did the first two labs.

Now let’s get started.


Lab #1: File path traversal, simple case

Directory traversal is also known as file path traversal, it is a vulnerability that allows an attacker to read files on the server that is running the application.

Rana Khalil’s video mentioned above also covers the Impact of Directory Traversal Vulnerabilities which includes unauthorized access to the application which allows an attacker to

·        Read files on the system

·        Run commands and alter or delete files on the system


During my first lab, I manage to solve the lab in my own way, but I did not know how to see the result:



And in all honesty, Burpsuite’s ‘solution’ leaves a lot to be desired if you're a noobie.


Notice no mention of the BurpSuite UI and no step-by-step tutorial on what to do. Instead they have the cop out of having videos in ‘Community solutions’. 

I use AI as a sounding board and it also interjects with good advice, such as which videos are amazing at teaching not only about the lab, but information that is relevant and informative.

I watched Rana Khalil’s Directory Traversal – Lab #1 Filetraversal, simple case and tried again.

(And I realized I forgot to set up screen capture to also capture my microphone, but you can see what I did here.)



Lab #2: Access control

I had watched Rana Khalil’s video Unprotected admin functionality and then tried to replicate it.

Then I realized I had forgotten that BurpSuite mentioned the robots.txt file, which would have gotten me the answer much quicker.



Lab #3: Unprotected admin functionality with unpredictable 

Here's how I solved it:

I tried adding robots.txt to the end of the URL and that turned up nothing.

So then I right-clicked on the page, selected view page source, and performed a search for admin.

Under var isAdmin = false you'll find adminPanelTag.setAttribute which has the text /admin-5jkvsv which you would pop onto the end of the URL, leading you to the admin panel page.

Lab #4 show more URL manipulation, this time to change a person’s access control.

I would say, follow Rana’s video because Burpsuite’s solution: 


Gave me so much trouble, mainly with turning the interceptor on and off. In the lab, I found that just leaving the interceptor off is fine. In addition, Rana’s video added an extra step in the browser when enabled me to access the admin panel.


Lab #5: Broken Access Control User ID controlled by param with password disclosure


Basically changing GET /my-account?id= from 'wiener' to 'administrator' and sending the Request. Yup, that's it!

In Response I searched for 'password' and looked for value='password value'/>

Lab #6 UID controlled by parameter, with unpredictable UIDs


Going through the blog entries I found one which 'carlos' wrote and clicked on his name. Using his account ID, I substituted wiener's account ID with carlos's account ID and his API key was revealed.

In summary, these labs were basically trying to get into an admin account (or another user's account).

To try to find the admin panel, try the following:
  • add robots.txt to the end of the URL to reveal the plain text file placed on a website's server that instructs search enginer crawlers which pages or files they can or cannot crawl and index (the admin panel may be revealed here)
  • use ../../../../../../etc/passwd to get to the plain text file that stores user account information
  • view the page's source code to see if the javascript might reveal in the adminPanelTag.setAttribute

To exploit an access control vulnerability, for example to get into the administrator account:

  • change the Cookie: Admin=false to true using BurpSuite and the browser's 'Inspect' tool (FYI, the Inspect tool is very powerful and gives a lot of information!)
  • GET /my-account?id=<change to administrator>

Now that I’ve gotten through all the labs in ‘Path traversal’ and ‘Access control’, I understand the process more. I would say BurpSuite teaches the attacks in very manageable, bite-sized chunks.

Overall, there were a few hiccups in the beginning, but I learned a lot and I am more comfortable with BurpSuite and getting a taste of these different vulnerabilities was very beneficial.

I will be continuing through the rest of the path.


Comments

Popular posts from this blog

Resources, Tips, and Techniques that Helped Me Pass the CompTIA Security+ Exam

Protecting Our Elders: A Comprehensive Look at Social Engineering Threats and Proactive Steps for Families

Network+ Deep Dive: Where Firewalls, Load Balancers, and APs Fit in the OSI Model