> 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/de/privesc/docker-escape/docker-password-reuse-linux-privilege-escalation.md).

# Wiederverwendung des Docker-Passworts - Linux-Privilegieneskalation

## Was es ist

Docker-Escape-Pfade nutzen Fehlkonfigurationen von Containern, eingehängte Host-Ressourcen, Standardanmeldedaten, wiederverwendete Passwörter oder übermäßige Container-Rechte aus. Das Ziel ist es, vom Container-Kontext zu Zugriff auf Host-Ebene zu gelangen. Diese spezielle Seite konzentriert sich auf **Docker-Escape (Passwortwiederverwendung)** und hält den Ausnutzungsablauf praxisnah: Bedingung identifizieren, sicher validieren und dann die kleinste nötige Nutzlast ausführen, um die Auswirkungen zu belegen.

## Enumeration

Beginnen Sie damit, den lokalen Kontext und die genaue Fehlkonfiguration zu bestätigen, bevor Sie den Exploit-Pfad ausführen.

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

## Beispiele

Docker-Escape:

Wir stellen fest, dass die IP-Adresse nicht die des Rechners ist (Rechner-IP: 10.10.11.130; Docker-Container-IP: 172.19.0.2).

<div data-full-width="true"><figure><img src="/files/9ee6a058d24795f2d383390c58a25eb7c04d4c58" alt=""><figcaption></figcaption></figure></div>

Wir werden die Ports manuell scannen, da `nmap` auf dem Gateway (172.19.0.1) nicht installiert ist:

```bash
for PORT in {0..1000}; do timeout 1 bash -c "</dev/tcp/172.19.0.1/$PORT
&>/dev/null" 2>/dev/null && echo "port $PORT is open"; done
```

Wir stellen fest, dass Port 22 offen ist (intern), sodass wir uns per SSH verbinden können.

```bash
for PORT in {0..1000}; do timeout 1 bash -c "</dev/tcp/172.19.0.1/$PORT&>/dev/null" 2>/dev/null && echo "port $PORT is open"; done
```

<figure><img src="/files/2819471c9174201d70920337d1c0c08ce5705175" alt=""><figcaption></figcaption></figure>

Wenn wir versuchen, uns mit dem Root-Konto unter Verwendung des `Superadministrator` Passworts anzumelden, können wir uns nicht anmelden, aber mit `augustus`, erhalten wir eine Shell.

<figure><img src="/files/1645d923abfbb15809277a122f2b8dacfd6aeadd" 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/de/privesc/docker-escape/docker-password-reuse-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.
