> 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/es/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-server-side-request-forgery-ssrf/ssrf-api-pentesting-web.md).

# SSRF API

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

El botón "Examinar" nos permite subir un archivo que se espera que sea una imagen que represente la portada de un libro, mientras que el campo de texto "URL de la portada vinculada a tu libro" nos permite introducir una URL para que el servicio la recupere y descargue la imagen.

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

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

Cuando se sube una imagen al servidor, se proporciona un enlace a la ubicación de almacenamiento.

<figure><img src="/files/375ec271addd69ca2bed6e213e0a580e0bf0654f" alt=""><figcaption></figcaption></figure>

A continuación, procedemos a un ataque de fuerza bruta contra los 65 535 puertos y observamos que solo el puerto 5000 devuelve una respuesta diferente.

<figure><img src="/files/7c60df9561a83b4db0ee2c27cf43d79a7727ea62" alt=""><figcaption></figcaption></figure>

Al comprobar el contenido del puerto interno 5000, descubrimos que permite subir un archivo.

<figure><img src="/files/31e9071a7fa6dc5149c569fab3467b166bda2031" alt=""><figcaption></figcaption></figure>

Este archivo, en JSON, enumera APIs internas con sus rutas asociadas. Entre ellas, la ruta `message/authors` parece particularmente crítica.

<figure><img src="/files/8f4b423eb822c9f0e4377ffb13a40ddfa21f247e" alt=""><figcaption></figcaption></figure>

Con Burp Suite, accedemos entonces al archivo a través del puerto 5000 en la dirección siguiente:

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

```

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

<figure><img src="/files/0f05e0d2a7cea9189928c40b742846632f4c41b2" alt=""><figcaption></figcaption></figure>

En este archivo, también encontramos un usuario y una contraseña en texto plano `dev:dev080217_devAPI!@`

<figure><img src="/files/a61ed73bdc478cfea1d555d88a4f99461f7000d1" 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/es/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.
