> 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/sql-injection/sql-injection-in-where-clause.md).

# Injection SQL dans la clause WHERE

Notes sur l’injection SQL dans la clause WHERE pour les laboratoires PortSwigger Web Security Academy, y compris le flux de travail d’exploitation, les tests de charge utile, la validation avec Burp Suite et le contexte de remédiation.

### Vulnérabilité d'injection SQL dans la clause WHERE permettant de récupérer des données cachées

* **Contexte / Vulnérabilité :** Le filtre de catégorie est vulnérable à l'injection SQL. La requête typique exécutée sur le serveur :/ `SELECT * FROM products WHERE category = 'Cadeaux' AND released = 1`
* \*\*Objectif de l’attaque (laboratoire) :\*\*forcer l’affichage d’un ou plusieurs produits non publiés (`released = 0`).
* **Paramètre vulnérable :** `category` (filtre de produit).
* **Preuve de concept (charge utile fournie) :**

```sql
test' or category='Lifestyle' and released=0-- -
```

* Interprétation brève : la charge utile modifie la condition WHERE pour inclure les entrées où `category='Lifestyle' AND released=0`, en contournant le `released = 1` contrainte.
* **Résultat attendu :** la page renvoie et affiche les produits correspondant à `released = 0` (produits non publiés).
* **Impact :** divulgation d’éléments masqués, exfiltration potentielle de données sensibles, contournement de la logique métier (non destiné au public).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/fr/web/sql-injection/sql-injection-in-where-clause.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
