> 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/bypassing-validation-by-connection-state.md).

# تجاوز التحقق بحالة الاتصال

### تجاوز التحقق من المضيف عبر هجوم حالة الاتصال

**وصف الثغرة الأمنية**

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

على الرغم من أن الخادم الأمامي يبدو أنه يتحقق بشكل صحيح من `Host` الترويسة، إلا أنه يفترض افتراضًا خطيرًا للغاية:

> تُعتبر جميع الطلبات المرسلة على نفس اتصال TCP موثوقة إذا كان **الطلب الأول** صالحًا.

وهذا يتيح حقن طلب خبيث لاحق على نفس الاتصال، متجاوزًا التحقق الأولي.

**هدف المختبر**

* الوصول إلى لوحة الإدارة الداخلية:/ `HTTP://192.168.0.1/admin`
* حذف المستخدم **carlos**

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

يتم حظر طلب مباشر إلى عنوان IP الداخلي:

```http
GET / HTTP/1.1
Host: 192.168.0.1
```

يرفض الخادم هذا الطلب، مما يؤكد أن `Host` التحقق موجود **في الطلب الأول**.

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

**العملية: هجوم حالة الاتصال**

الفكرة هي إرسال \*\*عدة طلبات على نفس اتصال TCP\*\*:

1. طلب أول مشروع إلى المضيف العام (مقبول).
2. طلب ثانٍ خبيث إلى عنوان IP الداخلي، مُرسل **على نفس الاتصال**.

<figure><img src="/files/5ebbf60a9a16b267558c7eafd4376470b69732d9" alt=""><figcaption></figcaption></figure>

في Burp Suite، يتم ذلك عبر:

* تجميع الطلبات
* باستخدام **إرسال المجموعة في اتصال واحد**

<figure><img src="/files/2d96086f324681196f31a1a24dddc25fedebddbb" alt=""><figcaption></figcaption></figure>

**الوصول إلى لوحة الإدارة**

بمجرد إنشاء الاتصال باستخدام استعلام صالح، يتم قبول الطلب التالي إلى الإدارة الداخلية:

```http
GET /admin HTTP/1.1
Host: 192.168.0.1
```

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

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

**حذف المستخدم**

يتطلب حذف المستخدم طلب POST:

```http
POST /admin/delete HTTP/1.1
Host: 192.168.0.1

csrf=ppBVKn8wVrgZifEETHsn48Hykwiq8yFO&username=carlos
```

استجابة الخادم:

<figure><img src="/files/d14258de2af5b522623c321109441f2d97df5e40" alt="" width="446"><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/bypassing-validation-by-connection-state.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.
