The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1.3.7 via the
An attacker can control the values passed to an
include statement, leveraging that to achieve remote code execution. This vulnerability allows unauthenticated attackers to execute code on the server easily.
- Ensure you have Python 3.x installed on your system.
- Install the required Python libraries by running the following command in your terminal (navigate to the project directory first):
pip install -r requirements.txt
Running the Exploit
- After installing the dependencies, you can run the exploit using the following command:
python exploit.py -u <base_url>
<base_url> with the base URL of the target WordPress site. Ensure that the target site is vulnerable to CVE-2023-6553 and that you have the appropriate authorization to perform testing.
python exploit.py -u https://example.com
- The exploit will attempt to exploit the vulnerability and write a PHP file on the target server. You can also specify a list of URLs to check using the
-foption or output the results to a file using the
- To use multiple threads for scanning multiple URLs, use the
-toption followed by the number of threads:
python exploit.py -f urls.txt -t 10 -o vulnerable.txt
- This will scan the list of URLs provided in
urls.txtusing 10 threads and output the results to
- If the exploit successfully writes the PHP file on the target server, you will be given access to an interactive shell to execute commands on the server.
- The interactive shell operates similarly to a Unix terminal. You can enter commands and see the output.
- To exit the interactive shell, type
- To clear the screen, type