Underc0de

[In]Seguridad Informática => Ingeniería Inversa => Mensaje iniciado por: yoyomismo en Abril 10, 2013, 11:13:30 AM

Título: [1/10 Tutorial] Resolviendo crackme Linux Blah
Publicado por: yoyomismo en Abril 10, 2013, 11:13:30 AM
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.
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

./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.


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:  https://help.ubuntu.com/


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: http://www.portalhacker.net/index.php/topic,160313.0.html

Un saludo!