> 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/privesc/suid/suid-base64-linux-privilege-escalation.md).

# SUID (Base64) - Escalada de privilégios no Linux

## O que é

Binários SUID são executados com os privilégios de seu proprietário, geralmente root. Um binário SUID vulnerável, desatualizado ou excessivamente flexível pode ler arquivos protegidos, abrir uma shell privilegiada ou executar código controlado pelo atacante. Esta página específica foca em **SUID (Base64)** e mantém o fluxo de exploração prático: identifique a condição, valide-a com segurança e então execute o payload menor necessário para comprovar o impacto.

## Enumeração

Comece confirmando o contexto local e a configuração incorreta exata antes de executar o caminho de exploração.

```bash
find / -perm -4000 -type f 2>/dev/null
```

## Exemplos

### Exemplo de Base64

Pesquisar [GTFOBins](https://gtfobins.github.io/) e filtrar por **Base64**:

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

Se tentarmos visualizar o arquivo com **cat**, não temos permissão, mas se nós **converter para Base64** o arquivo e então reconvertê-lo, podemos ver o conteúdo:

<figure><img src="/files/0559ddca9257b1d4c8db2eb24a7a47d2d7cc6637" 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/privesc/suid/suid-base64-linux-privilege-escalation.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.
