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

# SSRF на основе маршрутизации

### SSRF на основе маршрутизации

**Описание лабораторной работы**

В этой лабораторной работе есть **Уязвимость типа SSRF на основе маршрутизации**, эксплуатируется через **заголовок Host**. / Приложение полагается на значение `Host` поля, чтобы определять назначение запросов, что позволяет получить доступ к невидимым внутренним ресурсам.

Цель:

* Получить доступ к внутренней панели администрирования, размещённой на IP-адресе `192.168.0.0/24` сети
* Удалить пользователя **carlos**

**Первоначальное наблюдение**

У `/admin` точка доступа недоступна извне. / Однако приложение перенаправляет запросы в соответствии со значением `Host` поля, позволяя перенаправить запрос на внутренние адреса.

**Шаг 1 – Сканирование внутренней сети**

Следующий запрос отправляется на **Intruder** для проверки внутренних IP-адресов:

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

⚠️ Важно :

* Отключите опцию **Обновить заголовок Host** в Burp, иначе атака не удастся.

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

Результат:

* У `192.168.0.221` адрес возвращает ответ **HTTP 200**, что указывает на наличие внутренней панели администрирования.

<figure><img src="/files/4e33dc501b3861235e427f58aeec3af4510d5add" alt=""><figcaption></figcaption></figure>

**Шаг 2 – Доступ к панели администрирования**

После определения корректного IP вы напрямую нацеливаетесь на панель администратора:

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

Внутренний интерфейс администрирования становится доступным.

<figure><img src="/files/6bc41babc5555df5cb3d3090c3e607e10cb2bc5e" alt=""><figcaption></figcaption></figure>

**Шаг 3 – Удаление пользователя carlos**

Удаление требует **POST** запроса с действительным CSRF-токеном:

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

csrf=iWyb78rJxAsoblmARVtqSef6YOsKG0Ph&username=carlos
```

Результат:

* Сервер отвечает **302 Found**, подтверждая, что пользователь **carlos** был удалён.

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