Tags: reverse engineering 

Rating:

This challenge was fairly simple, although the binary changed 3 times.

when one runs the file , it just outputs Baby Crackme in an infinite loop.

<span>by opening the file with gdb and examining the beginning of main(), one sees :

Dump of assembler code for function main:
   0x08048454 <+0>:    push   ebp
   0x08048455 <+1>:    mov    ebp,esp
   0x08048457 <+3>:    and    esp,0xfffffff0
   0x0804845a <+6>:    sub    esp,0x10
   0x0804845d <+9>:    cmp    DWORD PTR [ebp+0x8],0x1
   0x08048461 <+13>:    jg     0x8048471 <main+29>
   0x08048463 <+15>:    mov    DWORD PTR [esp],0x80485b0
   0x0804846a <+22>:    call   0x8048384 <puts@plt>
   0x0804846f <+27>:    jmp    0x8048463 <main+15>
   0x08048471 <+29>:    mov    DWORD PTR [esp],0x47
......

the line </span>
<span>   0x0804845d <+9>:    cmp    DWORD PTR [ebp+0x8],0x1
 is the giveaway. memory location </span>DWORD PTR [ebp+0x8] is main's argc argument. if that is greater than one, then the program outputs G00d_B0y, the flag.r