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

# Побег из Docker (учётные данные Docker Toolbox по умолчанию) — повышение привилегий в Linux

## Что это такое

Пути выхода из Docker используют неправильную конфигурацию контейнера, смонтированные ресурсы хоста, учетные данные по умолчанию, повторно используемые пароли или чрезмерные привилегии контейнера. Цель состоит в том, чтобы перейти из контекста контейнера к доступу на уровне хоста. Эта конкретная страница посвящена **Выход из Docker (учетные данные Docker Toolbox по умолчанию)** и делает процесс эксплуатации практичным: определить условие, безопасно его проверить, а затем запустить минимальный полезный код, необходимый для подтверждения воздействия.

## Перечисление

Сначала подтвердите локальный контекст и точную ошибку настройки перед запуском пути эксплуатации.

```bash
id
cat /proc/1/cgroup
mount
ls -la /var/run/docker.sock 2>/dev/null
```

## Примеры

{% hint style="info" %}
Во время разведки мы обнаружили, что наша машина Windows не была доступна напрямую. Однако нам удалось подключиться к машине Windows, находящейся в Docker-контейнере, с IP-адресом `172.17.0.2` и `172.17.0.1` шлюзом. Теперь мы попытаемся пройти через этот контейнер и повысить наши привилегии.
{% endhint %}

<figure><img src="/files/52866dbc39c9e5edee2ed2c4f12b50e5679b9583" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/26c081adc971ec5f1c3199d0ba4edad57fd42e0c" alt=""><figcaption></figcaption></figure>

### **Проверка порта SSH**

Сначала нужно проверить, открыт ли порт SSH (22) на шлюзе Docker (172.17.0.1). Используйте для этого простую команду:

```bash
echo ' ' > /dev/tcp/172.17.0.1/22 && echo "[+] SSH открыт" || echo "[-] SSH закрыт"
```

Порт 22 открыт, что означает, что мы можем попробовать подключиться к машине в контейнере по SSH.

<figure><img src="/files/1ea4cc2ec60b77a7a8b873216cd10f477ae2a4b2" alt=""><figcaption></figcaption></figure>

#### **Войдите с учетными данными Docker Toolbox по умолчанию**

Идентификаторы по умолчанию для Docker Toolbox:

* **Пользователь**: `docker`
* **Пароль** : `tcuser`

Теперь мы пытаемся подключиться к контейнеру по SSH, используя эту информацию. После подключения к машине мы замечаем, что у нас есть доступ к root контейнера с пользователем `docker`.

<figure><img src="/files/d6bd641166d4b0d0e5625a11646a70e72b90e259" 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/ru/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.
