> 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/post-exploitation/alternate-data-streams-ads.md).

# مجاري البيانات البديلة (ADS)

> تدفقات البيانات البديلة (ADS) هي ميزة في **NTFS** أنظمة الملفات في ويندوز التي تسمح بربط عدة تدفقات بيانات بملف واحد. قد تحتوي هذه التدفقات الإضافية على معلومات مخفية غير مرئية أثناء الفحص التقليدي للملف. سنستغل هذه الوظيفة لاكتشاف **راية الجذر**.

يمكن للمهاجمين ومختبري الاختراق استخدام ADS من أجل:

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

**مثال باستخدام Notepad**:

```sh
notepad test.txt:secret.txt
```

هنا، `secret.txt` هو ملف مخفي مرتبط بـ `test.txt`.

الملفات المخفية لا تكون مرئية باستخدام `dir`, ولكن يمكنك عرضها باستخدام:

```sh
dir /r
```

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

**مثال آخر: حقن ملف تنفيذي داخل ADS**:

```bash
type payload.exe > windowslog.txt:winpeas.txt
```

يؤدي هذا إلى إدراج `payload.exe` في التدفق البديل `winpeas.txt` المرفق بـ `windowslog.txt`.

**تنفيذ الملف المخفي**:

```sh
start windowslog.txt:winpeas.exe
```

سيؤدي هذا إلى تشغيل `winpeas.exe`، رغم أنه مخفي داخل ADS.

**إنشاء ارتباط رمزي للتنفيذ المخفي**

يمكن استخدام ارتباط رمزي لخداع المستخدم ودفعه إلى تنفيذ ملف ثنائي مخفي.

**مثال**:

```sh
mklink wupadate.exe C:/Temp/windowslog.txt:winpeas.exe
```

هذا الارتباط الرمزي `wupdate.exe` يشير إلى ملف ADS المخفي.

```bash
wupdate 
```

إذا كتب المستخدم `wupdate`، فإن `winpeas.exe` البرنامج سيعمل.

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

### **عرض محتوى ADS**

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

#### **1. التحقق من تدفقات البيانات البديلة (ADS)**

تحقق مما إذا كان **hm.txt** الملف على **Administrator** سطح المكتب يحتوي على تدفقات بيانات بديلة. استخدم الأمر التالي:

```bash
dir /r C:/Users/Administrator/Desktop/hm.txt
```

يعرض هذا الأمر جميع تدفقات البيانات البديلة المرتبطة بـ **hm.txt** الملف. إذا كان هناك تدفق بيانات بديل، فسيظهر.

<figure><img src="/files/48ad028a599bfa543cccd398629e71104889882f" alt=""><figcaption></figcaption></figure>

#### **2. عرض محتويات تدفق بيانات بديل**

إذا وجدنا تدفقًا لموارد بديلة مرتبطًا بالملف، فإن خياراتنا تتمثل في الأمر التالي:

```powershell
more < C:/Users/Administrator/Desktop/hm.txt:root.txt
```

يتيح لنا هذا قراءة محتويات **root.txt** التدفق واسترجاع **علم الجذر :)**

<figure><img src="/files/c9fc58728c0e2623baa86b18d90915f0e7e4011e" 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/post-exploitation/alternate-data-streams-ads.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.
