> 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/host-header/routing-based-ssrf.md).

# SSRF basée sur le routage

Notes sur la SSRF basée sur le routage pour les laboratoires de la PortSwigger Web Security Academy, incluant le workflow d’exploitation, les tests de payloads, la validation dans Burp Suite et le contexte de remédiation.

### SSRF basée sur le routage

**Description du laboratoire**

Ce labo comporte une **Vulnérabilité de type SSRF basée sur le routage**, exploitable via **en-tête Host**. / L'application s'appuie sur la valeur du `Host` champ pour déterminer la destination des requêtes, permettant l'accès à des ressources internes non exposées.

Objectif :

* Accéder au panneau d'administration interne hébergé sur une adresse IP du `192.168.0.0/24` réseau
* Supprimer l’utilisateur **carlos**

**Observation initiale**

Le `/admin` point d'accès n'est pas accessible depuis l'extérieur. / Cependant, l'application relaie les requêtes selon la valeur du `Host` champ, permettant de rediriger la requête vers des adresses internes.

**Étape 1 – Analyse du réseau interne**

La requête suivante est envoyée à **Intruder** pour tester des adresses IP internes :

```http
GET /admin HTTP/2
Host: 192.168.0.X
```

⚠️ Important :

* Désactiver l'option **Mettre à jour l'en-tête Host** dans Burp, sinon l'attaque échoue.

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4bbe18c79106f9d515f0a2449f1d70a31e3e7584%2F%7B2B09BA49-05DD-4E1C-A851-5A650EFDF3C3%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Résultat :

* Le `192.168.0.221` l'adresse renvoie une réponse **HTTP 200**, indiquant la présence du panneau d'administration interne.

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6b9ae2d6e0db7b026def6bd704bb7d14f192acc6%2F%7B350C3618-8038-4523-9B3E-5E9CD07C20CE%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Étape 2 – Accès au panneau d'administration**

Une fois l'IP valide identifiée, vous ciblez directement le panneau d'administration :

```http
GET /admin/delete?username=carlos HTTP/2
Host: 192.168.0.221
```

L'interface d'administration interne devient accessible.

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-05b594de5921e46ead6a5a00f2cdb7b738cd5f0f%2F%7BDF27F02D-DD3C-43FF-BEAC-DF0A39126856%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Étape 3 – Suppression de l'utilisateur carlos**

La suppression nécessite un **POST** requête avec un jeton CSRF valide :

```http
POST /admin/delete HTTP/2
Host: 192.168.0.221

csrf=iWyb78rJxAsoblmARVtqSef6YOsKG0Ph&username=carlos
```

Résultat :

* Le serveur répond avec **302 Found**, confirmant que l'utilisateur **carlos** a été supprimé.

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-71a6b466225f79c20ef7beb2490ac25425933000%2F%7B70F278BE-BBF2-4ABA-BF76-EB73C0EFB5B2%7D.png?alt=media" 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 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/host-header/routing-based-ssrf.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.
