> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ru/web/business-logic/weak-isolation-on-dual-use-endpoint.md).

# Слабая изоляция на конечной точке двойного назначения

### Слабая изоляция на конечной точке двойного назначения

**Описание лабораторной работы**

Эта лабораторная работа основана на ошибочном предположении об уровне привилегий пользователя, основанном только на параметрах, отправляемых клиентом. / Эксплуатируя логическую уязвимость в функции управления учетными записями, можно получить контроль над произвольными учетными записями, включая учетную запись администратора.

\*\* Цель:\*\*/ Получить доступ к учетной записи администратора и удалить пользователя **carlos**.

**Предоставленные учетные данные:**

* Пользователь: `wiener`
* Пароль: `peter`

<figure><img src="/files/c52fd6bfed38d5fe1ef5ac2e80d7fef74fb83e94" alt=""><figcaption></figcaption></figure>

**Наблюдение за механизмом смены пароля**

После входа в `wiener` учетную запись доступна функция смены пароля. / Запрос, отправляемый на сервер, выглядит следующим образом:

```bash
csrf=3wgY9AYHzbOWg73KitML2AQkY0fef2kK
&username=wiener
&current-password=peter
&new-password-1=jordan
&new-password-2=jordan
```

Сервер использует `username` параметр, предоставленный клиентом, чтобы определить учетную запись, которую нужно изменить.

<figure><img src="/files/2cf84737a8d207cec18e8270fbc41be3d54922eb" alt=""><figcaption></figcaption></figure>

**Использование логической ошибки**

Изменив запрос, можно нацелиться на другого пользователя.

<figure><img src="/files/a7208927216ce75993fb4be9f201cfdab0974be5" alt=""><figcaption></figcaption></figure>

Кроме того, `current-password` параметр проверяется ненадлежащим образом.

Измененный запрос пользователя **carlos**:

{% code overflow="wrap" %}

```bash
csrf=3wgY9AYHzbOWg73KitML2AQkY0fef2kK
&username=carlos
&new-password-1=jordan
&new-password-2=jordan
```

{% endcode %}

<figure><img src="/files/0fb6c807f23f5818afd92992aab4837248042bc5" alt=""><figcaption></figcaption></figure>

Сервер принимает запрос и изменяет пароль учетной записи **carlos**, не требуя старого пароля.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/ru/web/business-logic/weak-isolation-on-dual-use-endpoint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
