> 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-server-side-request-forgery-ssrf/ssrf-api-pentesting-web.md).

# SSRF API

## [SSRF](/fr/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-server-side-request-forgery-ssrf.md):

Le bouton « Browse » nous permet de téléverser un fichier censé être une image représentant la couverture d’un livre, tandis que le champ texte « Cover URL linked to your book » nous permet de saisir une URL afin que le service la récupère et télécharge l’image.

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

#### **Ouverture** [**Burp Suite** ](https://hacking-notes-jordan.gitbook.io/notes/autres/burpsuite)**:**

Lorsqu’une image est téléversée sur le serveur, un lien vers l’emplacement de stockage est fourni.

<figure><img src="/files/32728a6de08192cd194a11fb90927a908df7b2fa" alt=""><figcaption></figcaption></figure>

Nous lançons ensuite une attaque par force brute sur les 65 535 ports et observons que seul le port 5000 renvoie une réponse différente.

<figure><img src="/files/28547caaf2d9c238802ab8749baa7d76b84e4881" alt=""><figcaption></figcaption></figure>

En vérifiant le contenu interne du port 5000, nous découvrons qu’il permet de téléverser un fichier.

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

Ce fichier, au format JSON, répertorie des API internes avec leurs routes associées. Parmi elles, la route `message/authors` semble particulièrement critique.

<figure><img src="/files/662848f4044ae8b4c446c1033c56f28b340909b0" alt=""><figcaption></figcaption></figure>

Avec Burp Suite, nous accédons donc au fichier via le port 5000 à l’adresse ci-dessous :

```url
http://127.0.0.1:5000/api/latest/metadata/messages/authors

```

<figure><img src="/files/243517efaf41da056b927bc020a3aae7fc1abb8b" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/74c859754c1dca75b03c0f8bf6bfcdd05baa4487" alt=""><figcaption></figcaption></figure>

Dans ce fichier, nous trouvons également un utilisateur et un mot de passe en clair `dev:dev080217_devAPI!@`

<figure><img src="/files/5d0768304d89eb5d5482eda4f18e75cb8a2f44bf" 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 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-server-side-request-forgery-ssrf/ssrf-api-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.
