Rapid7 Vulnerability & Exploit Database

WordPress Backup Migration Plugin PHP Filter Chain RCE

Back to Search

WordPress Backup Migration Plugin PHP Filter Chain RCE

Disclosed
12/11/2023
Created
01/17/2024

Description

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 exploit 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 conversions. This allows an attacker to prepend a PHP payload to a string which gets evaluated by a require statement, which results in command execution.

Author(s)

  • Nex Team
  • Valentin Lobstein
  • jheysel-r7

Platform

Linux,PHP,Unix,Windows

Architectures

php

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/http/wp_backup_migration_php_filter
msf exploit(wp_backup_migration_php_filter) > show targets
    ...targets...
msf exploit(wp_backup_migration_php_filter) > set TARGET < target-id >
msf exploit(wp_backup_migration_php_filter) > show options
    ...show and set options...
msf exploit(wp_backup_migration_php_filter) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;