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

# إعادة استخدام كلمة مرور Docker - تصعيد امتيازات لينكس

## ما هو

تستغل مسارات الهروب من Docker سوء تهيئة الحاوية، أو موارد المضيف المُركّبة، أو بيانات الاعتماد الافتراضية، أو كلمات المرور المُعاد استخدامها، أو الصلاحيات المفرطة للحاوية. الهدف هو الانتقال من سياق الحاوية إلى وصول على مستوى المضيف. تركز هذه الصفحة تحديدًا على **الهروب من Docker (إعادة استخدام كلمة المرور)** وتحافظ على سير الاستغلال بشكل عملي: حدّد الحالة، تحقّق منها بأمان، ثم شغّل أصغر حمولة لازمة لإثبات الأثر.

## الاستكشاف

ابدأ بتأكيد السياق المحلي والتهيئة الخاطئة الدقيقة قبل تشغيل مسار الاستغلال.

```bash
المعرّف
cat /proc/1/cgroup
mount
ls -la /var/run/docker.sock 2>/dev/null
```

## أمثلة

الهروب من Docker:

نلاحظ أن عنوان IP ليس عنوان الجهاز (IP الجهاز: 10.10.11.130؛ IP حاوية Docker: 172.19.0.2).

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

سنفحص المنافذ يدويًا، لأن `nmap` غير مثبت على البوابة (172.19.0.1) :

```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
```

نلاحظ أن المنفذ 22 مفتوح (داخلي)، لذا يمكننا الاتصال عبر SSH.

```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/da662cd0d5e7d5145c51dc7d09a79be7f4e6ee57" alt=""><figcaption></figcaption></figure>

إذا حاولنا تسجيل الدخول باستخدام حساب root عبر `المشرف الأعلى` كلمة المرور، فلن نتمكن من تسجيل الدخول، ولكن باستخدام `أوغستوس`، نتمكن من الحصول على غلاف طرفي.

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