> 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/pt-br/web/business-logic/weak-isolation-on-dual-use-endpoint.md).

# Isolamento fraco em um endpoint de uso duplo

Notas sobre isolamento fraco em um endpoint de uso duplo para os laboratórios do PortSwigger Web Security Academy, incluindo fluxo de exploração, teste de payload, validação no Burp Suite e contexto de remediação.

### Isolamento fraco em endpoint de uso duplo

**Descrição do laboratório**

Este laboratório se baseia em uma suposição errônea sobre o nível de privilégios do usuário, com base apenas nos parâmetros enviados pelo cliente. / Ao explorar uma falha lógica na funcionalidade de gerenciamento de contas, é possível assumir o controle de contas arbitrárias, incluindo a conta de administrador.

\*\* Alvo:\*\*/ Acesse a conta de administrador e exclua o usuário **carlos**.

**Credenciais fornecidas:**

* Usuário: `wiener`
* Senha: `peter`

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-74c1de58a011a3016745410f7a779e67f56d1e97%2F%7BE26372DD-5036-4018-B508-159C238169A4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Observação do mecanismo de alteração de senha**

Uma vez conectado ao `wiener` da conta, um recurso permite alterar a senha. / A solicitação enviada ao servidor é a seguinte:

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

O servidor usa o `nome de usuário` parâmetro fornecido pelo cliente para determinar a conta a ser alterada.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1e7e01cd92e29ae6e32a5d8336c23e4f0cc57f11%2F%7B0FB80FBF-2698-440E-A47F-98F3CF059ACE%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Explorando a falha lógica**

Ao alterar a consulta, é possível direcionar outro usuário.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4c19968ccdfa7260e513467e7982e77dac3bb1c1%2F%7B08AB3451-19B9-46E0-A53C-968957C2C9D4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Além disso, o `current-password` parâmetro não é verificado corretamente.

Solicitação de usuário alterada **carlos**:

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4ff4f433aa84321153b12aad76060cfe1e005dda%2F%7B4E75EAA8-6213-4018-A8B0-ECCB0BBA45BA%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

O servidor aceita a solicitação e altera a senha da conta **carlos**, sem exigir a senha antiga.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
