-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WordPress Backup Migration Plugin PHP Filter Chain RCE (CVE-2023-6553) #18633
WordPress Backup Migration Plugin PHP Filter Chain RCE (CVE-2023-6553) #18633
Conversation
Hi @jheysel-r7 , I forgot to specify but the payload will only work for Linux. I think this should work for Windows but I haven't tested it:
|
Co-authored-by: Julien Voisin <[email protected]>
…7/metasploit-framework into wp-backup-migration-php-filter
Good catch @Chocapikk! I didn't realize that. Instead of implementing a separate Windows payload I went with a native PHP solution. The downside to this approach is that the payload is relatively much longer which means our temp payload filename has to be much shorter. I know we usually like our payloads to be around 8 random characters although in this scenario I don't think that's possible. @cdelafuente-r7 let me know if you think it's reasonable to have a one character payload in this scenario. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jheysel-r7 for this module and this cool technique! I just left a few minor comments. I tested using the docker installation you provided and it works great.
Thanks for updating this @jheysel-r7. It looks good to me now. However, I retested against the same Docker installation with the plugin
|
This reverts commit f1586f0.
Thanks for updating this @jheysel-r7 ! Everything looks good to me now. I tested against a docker installation of Wordpress 6.4.2 with backup-backup plugin version 1.3.7 and verified I got a session. I'll go ahead and land it.
|
Release NotesThis adds an exploit module that leverages an unauthenticated RCE in the WordPress plugin |
This module exploits an unauth RCE in the WordPress plugin: Backup Migration (<= 1.3.7). The vulnerability is exploitable through the
Content-Dir
header which is sent to the/wp-content/plugins/backup-backup/includes/backup-heart.php
endpoint.The vuln makes use of a neat technique called PHP Filter Chaining which allows an attacker to prepend bytes to a string by continuously chaining character encoding conversion. This allows an attacker to prepend a PHP payload to a string which gets evaluated by a require statement, which results in command execution.
Verification
List the steps needed to make sure this thing works
msfconsole
rhost
,rport
andlhost