> 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/access-control/user-id-controlled-by-unpredictable-guid-parameter.md).

# ID de usuário controlado por parâmetro GUID imprevisível

#### ID do usuário controlado por parâmetro

Este laboratório apresenta uma **elevação horizontal de privilégios** falha na página da conta do usuário. / A particularidade é que **os usuários são identificados por GUIDs**, ou seja, credenciais longas e aleatórias, por exemplo:

```bash
9e2f3fc0-7035-48ed-ad6d-f643690c7b9d
```

Após acessar a conta **wiener:peter**, você pode ver seu próprio GUID na seção Minha conta.

<figure><img src="/files/9c173a9c83e9229157344a89ba53878f1227c9b2" alt=""><figcaption></figcaption></figure>

#### **Recuperação de GUIDs por meio de publicações**

Ao navegar pelo site, encontramos nas **publicações visíveis** os GUIDs de outros usuários:

* O GUID do administrador aparece em uma de suas publicações.

<figure><img src="/files/343dcb146ca264317a5685c8a77551c517ee4ad3" alt=""><figcaption></figcaption></figure>

Da mesma forma, podemos recuperar o GUID de **carlos**.

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

```bash
?userId=5abc76d3-7763-4be9-83d1-c6181bcdf0b5
```

#### **Operação: acesso à conta de Carlos**

A página da conta é acessível via um parâmetro controlável:

```bash
my-account?id=5abc76d3-7763-4be9-83d1-c6181bcdf0b5
```

Bastando substituir nosso GUID por **carlos**, obtemos a conta dele:

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


---

# 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/pt-br/web/access-control/user-id-controlled-by-unpredictable-guid-parameter.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.
