> 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/cache-poisoning/cache-poisoning-via-unindexed-query-parameter.md).

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

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

هذا المختبر عرضة لهجوم تسميم ذاكرة التخزين المؤقت للويب لأن إحدى معلمات الاستعلام غير مُدرجة في مفتاح ذاكرة التخزين المؤقت. / يزور أحد المستخدمين الصفحة الرئيسية للموقع بانتظام باستخدام Chrome. / الهدف هو تسميم ذاكرة التخزين المؤقت بحيث تعرض الصفحة الرئيسية استجابة تعمل `alert(1)` في متصفح الضحية.

**التحليل الأولي**

* من خلال اعتراض استجابة الصفحة الجذرية، يظهر **canonical** رابط.
* إذا وصلت إلى الرابط باستخدام معلمة عشوائية، على سبيل المثال `/?hello`، تنعكس القيمة بوضوح في الاستجابة

<figure><img src="/files/298fba1bdcbc0f67d680b3fa3c686af81ed22683" alt=""><figcaption></figcaption></figure>

حقن حمولة مثل:

```bash
/?test'/><script>alert(1)</script>
```

* يتم تفسير كود HTML في الاستجابة، لكن لا يتم تشغيل أي تنبيهات على جانب الضحية.

<figure><img src="/files/70500ac83dec204ad8f834f9a7505fb0dad33c86" alt=""><figcaption></figcaption></figure>

**المشكلة المحددة**

تعتبر ذاكرة التخزين المؤقت كل اختلاف في `?test` المعلمة كمدخل جديد. / وبالتالي، مع كل تغيير في القيمة، يتم إعادة توليد ذاكرة التخزين المؤقت ولا يستمر التسميم.

ومع ذلك، فإن بعض المعلمات **تُتجاهل تمامًا** من قِبل مفتاح ذاكرة التخزين المؤقت:

* لا يتم أخذ اسمها وقيمتها في الاعتبار.
* تبقى الاستجابة المخزنة مؤقتًا كما هي، حتى لو تغيرت قيمتها.

**تحديد المعلمة غير المفهرسة**

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

باستخدام **Param Miner** (دالة تخمين معلمات الاستعلام)، يتم `utm_content` تحديد المعلمة.

<figure><img src="/files/3b4511ca1bb61d2fbaf1c9954e1f1aa1821d5471" alt=""><figcaption></figcaption></figure>

* من خلال اختبار قيم مختلفة لهذه المعلمة، نجد أن ذاكرة التخزين المؤقت تبقى دون تغيير، مما يؤكد أنها غير مُدرجة في مفتاح ذاكرة التخزين المؤقت.

<pre class="language-bash"><code class="lang-bash"><strong>/?utm_content=test
</strong></code></pre>

<figure><img src="/files/7b7a93d7c804646f00f7ee985150a47bc666e436" alt=""><figcaption></figcaption></figure>

**الاستغلال**

ثم يتم حقن الحمولة الخبيثة في هذه المعلمة غير المفهرسة:

```bash
/?utm_content='/><script>alert(1)</script>
```

تُخزَّن الاستجابة المسمومة في ذاكرة التخزين المؤقت وتُقدَّم للزوار التاليين.

<figure><img src="/files/b1e3c7d49fafcc1a233f510a860880e6543c7945" 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/cache-poisoning/cache-poisoning-via-unindexed-query-parameter.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.
