## https://sploitus.com/exploit?id=AE215765-D26B-5FF6-9745-47C49E258FD0
## How It Works:
This PHP code is designed to exploit a **Remote Code Execution (RCE)** vulnerability in **SQLPad**, related to **CVE-2022-0944**.
It works by injecting malicious code into the SQLPad application, forcing it to execute a system command that opens a **reverse shell** – a connection that grants the attacker remote control of the vulnerable system.
---
## Prerequisites:
- **PHP CLI** – `sudo apt-get install php-cli`
- **cURL (PHP cURL library)** – `sudo apt-get install php-curl`
---
## Usage:
### 1. Setup the Listener (on the Attacker Machine)
To capture the reverse shell connection, start Netcat on the attacker’s machine:
```bash
nc -lvnp 4444
```
## Run the Exploit
```bash
php exploit.php
```
: The root URL of the vulnerable SQLPad (e.g., http://target.com:3000)
: The attacker’s IP address listening for the reverse connection (same as the Netcat IP)
: The port on which the attacker is listening (same as the Netcat port)
## References
The original exploit logic was based on this repository:
🔗 [0xRoqeeb/sqlpad-rce-exploit-CVE-2022-0944](https://github.com/0xRoqeeb/sqlpad-rce-exploit-CVE-2022-0944.git)
My goal here was to understand the exploit logic and rewrite it in another programming language as a personal challenge.
Additional reference:
🔗 [CVE-2022-0944 – NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-0944)