> 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/docker-escape/docker-toolbox-default-credentials-linux-privilege-escalation.md).

# Escape de Docker (credenciales predeterminadas de Docker Toolbox) - escalada de privilegios en Linux

## Qué es

Las vías de escape de Docker aprovechan configuraciones incorrectas del contenedor, recursos del host montados, credenciales predeterminadas, contraseñas reutilizadas o privilegios excesivos del contenedor. El objetivo es pasar del contexto del contenedor al acceso a nivel de host. Esta página específica se centra en **Escape de Docker (credenciales predeterminadas de Docker Toolbox)** 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
cat /proc/1/cgroup
mount
ls -la /var/run/docker.sock 2>/dev/null
```

## Ejemplos

{% hint style="info" %}
Durante el reconocimiento, identificamos que nuestra máquina Windows no era accesible directamente. Sin embargo, pudimos conectarnos a una máquina Windows contenida en un contenedor Docker, con la dirección IP `172.17.0.2` y la `172.17.0.1` puerta de enlace. Ahora intentaremos pivotar a través de este contenedor y escalar nuestros privilegios.
{% endhint %}

<figure><img src="/files/5ab5434f015271283422f8b3d83277eeb32a8315" alt=""><figcaption></figcaption></figure>

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

### **Verificación del puerto SSH**

Primero, necesitamos comprobar si el puerto SSH (22) está abierto en la puerta de enlace de Docker (172.17.0.1). Usa un comando sencillo para ello:

```bash
echo ' ' > /dev/tcp/172.17.0.1/22 && echo "[+] SSH abierto" || echo "[-] SSH cerrado"
```

El puerto 22 está abierto, lo que significa que podemos intentar una conexión SSH a la máquina en el contenedor.

<figure><img src="/files/7f81be1d0206a06e20a5b2929453baeadfe5275f" alt=""><figcaption></figcaption></figure>

#### **Inicia sesión con las credenciales predeterminadas de Docker Toolbox**

Las credenciales predeterminadas de Docker Toolbox son:

* **Usuario**: `docker`
* **Contraseña** : `tcuser`

Ahora intentamos conectarnos al contenedor mediante SSH usando esta información. Una vez conectados a la máquina, observamos que tenemos acceso como root del contenedor con el usuario `docker`.

<figure><img src="/files/f5506b582f261e945a4f492bdad2a73638f0d002" 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/docker-escape/docker-toolbox-default-credentials-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.
