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

# SSRF через API

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

Кнопка «Browse» позволяет нам загрузить файл, который, как ожидается, является изображением, представляющим обложку книги, а текстовое поле «Cover URL linked to your book» позволяет нам ввести URL, чтобы сервис получил его и загрузил изображение.

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

#### **Открытие** [**Burp Suite** ](https://hacking-notes-jordan.gitbook.io/notes/autres/burpsuite)**:**

Когда изображение загружается на сервер, предоставляется ссылка на место его хранения.

<figure><img src="/files/437b4555b0ce77e45f13d283b657b93f3837f1ca" alt=""><figcaption></figcaption></figure>

Затем мы переходим к атаке методом перебора по всем 65 535 портам и замечаем, что только порт 5000 возвращает иной ответ.

<figure><img src="/files/1bb9006abeb5b05eebdaf1c20fc07fef30aa476b" alt=""><figcaption></figcaption></figure>

Проверив содержимое внутреннего порта 5000, мы обнаруживаем, что он позволяет загружать файл.

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

Этот файл в формате JSON перечисляет внутренние API вместе с соответствующими маршрутами. Среди них маршрут `message/authors` кажется особенно критичным.

<figure><img src="/files/68678180020630c2c109d9947419a52850fd2808" alt=""><figcaption></figcaption></figure>

С помощью Burp Suite мы получаем доступ к файлу через порт 5000 по указанному ниже адресу:

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

```

<figure><img src="/files/307f6ea44178ab9a9e364ec42427032967ef06ca" alt=""><figcaption></figcaption></figure>

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

В этом файле мы также находим имя пользователя и пароль в открытом виде `dev:dev080217_devAPI!@`

<figure><img src="/files/2576930f4eaa5107f915ab78ee7bf5a0736ab92b" 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/ru/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.
