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

# SSRF API

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

Der „Browse“-Button ermöglicht es uns, eine Datei hochzuladen, bei der erwartet wird, dass es sich um ein Bild handelt, das ein Buchcover darstellt, während das Textfeld „Cover URL linked to your book“ es uns ermöglicht, eine URL einzugeben, damit der Dienst sie abruft und das Bild herunterlädt.

<figure><img src="/files/45cf75d34f9a45f4d7942a793f8d27ebad152338" alt=""><figcaption></figcaption></figure>

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

Wenn ein Bild auf den Server hochgeladen wird, wird ein Link zum Speicherort bereitgestellt.

<figure><img src="/files/50e2b69602e018c3265a5259add19bd919dbd1dc" alt=""><figcaption></figcaption></figure>

Anschließend führen wir einen Brute-Force-Angriff auf die 65.535 Ports durch und stellen fest, dass nur Port 5000 eine andere Antwort zurückgibt.

<figure><img src="/files/9b5c68c78b5ae15787f92332d525a21c1644bd67" alt=""><figcaption></figcaption></figure>

Durch Überprüfen des Inhalts des internen Ports 5000 entdecken wir, dass er das Hochladen einer Datei erlaubt.

<figure><img src="/files/7270805910bd47bf61a8a7cbd73339fff07d41aa" alt=""><figcaption></figcaption></figure>

Diese Datei im JSON-Format listet interne APIs mit ihren zugehörigen Routen auf. Unter ihnen ist die Route `message/authors` scheint besonders kritisch zu sein.

<figure><img src="/files/15faaa29f9a355400860e3ed4adb0f219e8863ca" alt=""><figcaption></figcaption></figure>

Mit Burp Suite greifen wir daher über Port 5000 auf die Datei unter der folgenden Adresse zu:

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

```

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

<figure><img src="/files/97e283c4d3c41dc4b5b1db4b600491941c622677" alt=""><figcaption></figcaption></figure>

In dieser Datei finden wir außerdem einen Benutzernamen und ein Passwort im Klartext `dev:dev080217_devAPI!@`

<figure><img src="/files/9b67e9ac148ac5d516fd3665cd8617fcc8e1cfef" 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/de/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.
