# Privilege Escalation

### Escaneo de Privilegios y Capacidades

#### Binarios SUID

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

* Busca archivos con bit SUID activo
* `-perm -4000`: Permisos SUID (Set User ID)
* `2>/dev/null`: Oculta errores de permisos

#### Capacidades Linux

```bash
getcap -r / 2>/dev/null
```

* Busca binarios con capacidades especiales
* `-r`: Recursivo desde directorio raíz
* Capacidades permiten privilegios sin SUID

### Escaneo Automatizado

#### LinPEAS (Privilege Escalation Awesome Script)

```bash
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | sh
```

* Script de enumeración automática
* Detecta vectores de escalada de privilegios
* Chequea configuraciones inseguras


---

# Agent Instructions: 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:

```
GET https://dise0.gitbook.io/h4cker_b00k/comandos-utiles/privilege-escalation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
