[1/10 Tutorial] Resolviendo crackme Linux Blah

Iniciado por yoyomismo, Abril 10, 2013, 11:13:30 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

    Esta es otra versión del anterior crackme, del mismo nivel.

Descripción general:
Citar

  • Difficulty: 1 - Very easy, for newbies
  • Platform: Unix/linux etc.
  • Language: Assembler
*
[/list]

Herramientas:
Citar

  • Strings
  • objdump

Introducción

Lo primero que haremos será buscar cadenas de texto en el ejecutable.
Código: text
strings ./blah


Obtenemos la siguiente salida:
Citar
Okej!

Nada más... Bueno, almenos tenemos la string de "chico bueno"

Llamemos a Objdump.

La llamada

Citarobjdump -d -M intel ./blah
Código: text

./blah:     file format elf32-i386


Disassembly of section .text:

08048094 <.text>:
8048094: 31 c0                xor    eax,eax
8048096: b8 2f 00 00 00        mov    eax,0x2f
804809b: cd 80                int    0x80
804809d: 3d ad de 00 00        cmp    eax,0xdead
80480a2: 75 16                jne    0x80480ba
80480a4: b8 04 00 00 00        mov    eax,0x4
80480a9: bb 01 00 00 00        mov    ebx,0x1
80480ae: b9 c4 90 04 08        mov    ecx,0x80490c4
80480b3: ba 06 00 00 00        mov    edx,0x6
80480b8: cd 80                int    0x80
80480ba: 31 c0                xor    eax,eax
80480bc: 40                    inc    eax
80480bd: 31 db                xor    ebx,ebx
80480bf: cd 80                int    0x80


Eso es todo... Resumamos.


  • Limpiamos EAX
  • Cargamos en EAX 0x2f ( getgid() )
  • Ejecutamos la llamada
  • Comparamos el GID, de no ser así sale fuera

Keygen final

No hay keygen, como podeis observar.

Tenemos dos opciones, Parchear, que queda directamente descartada por mi parte, o crear el grupo de usuarios pertinente.

Para validar el keygen, símplemente edité el GID de mi usuario, y este fué el resultado:
Citarroot@ubuntu:/home/ubuntu# login blah
Password:
Welcome to Ubuntu 12.10 (GNU/Linux 3.5.0-17-generic i686)

* Documentation:  You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login


groups: cannot find name for group ID 57005
blah@ubuntu:~$ cd /home/ubuntu
blah@ubuntu:/home/ubuntu$ ./blah
Okej!

Fín.

Autoría propia. Link original: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Un saludo!
CPH: Cibergolen
Otros: Yo-Mismo

Visitame en You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login