Challenge Description
Show us your basic skills! (P.S. There are 4 ways to solve this, are you willing to try them all?)
Provided Files
$ file baby
baby: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=25adc53b89f781335a27bf1b81f5c4cb74581022, for GNU/Linux 3.2.0, not stripped
Solution
Running baby, we find that we need the right key to get to the next step:
$ ./baby
Insert key:
1
Try again later.
Running strings
on the binary, we notice an alphanumeric string after Insert Key:
which may be the key we need:
$ strings baby
<SNIP>
[]A\A]A^A_
Dont run `strings` on this challenge, that is not the way!!!!
Insert key:
abcde122313
Try again later.
<SNIP>
Running ltrace
on the binary gives us confirmation of that. There is a string compare between what we input in the program and the string "abcde122313"
:
$ ltrace ./baby
puts("Insert key: "Insert key:
) = 13
fgets(1
"1\n", 20, 0x7f69ed3f4a80) = 0x7ffc65fdb130
strcmp("1\n", "abcde122313\n") = -48
puts("Try again later."Try again later.
) = 17
+++ exited (status 0) +++
Using the key
we found, we can get the flag:
$ ./baby
Insert key:
abcde122313
HTB{B4B***********_EZ}