> 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/url-normalization.md).

# تطبيع عنوان URL

### تطبيع عناوين URL

يحتوي هذا المختبر على **XSS** ثغرة لا يمكن استغلالها مباشرةً، لأن المتصفح يطبق تلقائيًا **dURL** ترميزًا. / لذلك فإن **عملية تطبيع URL في ذاكرة التخزين المؤقت** يجب استخدامها لاستغلال هذا الخلل.

الهدف هو حقن حمولة تعمل `alert(1)` داخل متصفح الضحية ثم تزويده بعنوان URL الخبيث.

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

#### 1) تحديد نقطة الحقن

عند الوصول إلى صفحة غير موجودة (مثلًا `/test`)، يعيد الموقع **صفحة خطأ** تُعيد استخدام المسار المطلوب في استجابة HTML.

إذا أُغلق وسم HTML وتم حقن سكربت، فسيُفسَّر على أنه:

```javascript
/test</p><script>alert(1)</script>
```

<figure><img src="/files/467da55473ea9edee947ad7585dac4dd3d9fd11b" alt=""><figcaption></figcaption></figure>

#### 2) المشكلة التي تمّت مواجهتها

إذا أُدخل هذا الرابط مباشرةً في المتصفح، فإن الحمولة **n لا يُنفَّذ**. / السبب هو أن المتصفح **يقوم بالترميز تلقائيًا** الأحرف الخاصة (`<`, `>`, `/`، إلخ)، مما يمنع تنفيذ السكربت.

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

#### 3) التشغيل عبر تطبيع ذاكرة التخزين المؤقت

لتجاوز هذه الحماية، يتم **ذاكرة التخزين المؤقت** استخدام:

* يتم إرسال الطلب الخبيث عبر **Burp Suite**، دون المرور عبر شريط عناوين المتصفح.
* ذاكرة التخزين المؤقت **تُطبِّع** عنوان URL وتخزن الاستجابة المرتبطة به.
* تحتوي الاستجابة المخزنة مؤقتًا بعد ذلك على الحمولة **من دون ترميز**.

#### (4) تفعيل XSS

بمجرد تسميم الاستجابة في ذاكرة التخزين المؤقت:

* يتم تزويد الضحية بعنوان URL.
* تعيد ذاكرة التخزين المؤقت النسخة القياسية من الصفحة.
* يتم تفسير السكربت و `alert(1)` يتم تشغيله في متصفح الضحية.

<figure><img src="/files/e8741f449975f3d8c51a0b377d6d23fe513b0a35" alt="" width="507"><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/url-normalization.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.
