Crackme 2: ELF, basic

Link: https://www.root-me.org/en/Challenges/Cracking/ELF-Basic (binary)

$ ./ch2.bin
############################################################
##        Bienvennue dans ce challenge de cracking        ##
############################################################

username: hello
Bad username

The binary contains a few interesting strings but doesn’t seem to accept any of them as a username. Let’s open it with Hopper.

A snippet from main:

main

main prints “username: “, then calls getString and compares the result with the value at address 0x80a6b19 using strcmp. This value is not detected as a string, so let’s try to find it. There is also the string “the ripper” referenced from main, with address 0x80a61bd. 0x80a6b19 is just above, containing the value “john”:

array

Let’s try these two:

$ ./ch2.bin
############################################################
##        Bienvennue dans ce challenge de cracking        ##
############################################################

username: john
password: the ripper
Bien joue, vous pouvez valider l'epreuve avec le mot de passe : 987654321 !

(well done, you can validate the challenge with password 987654321)