Description
Bedtime!
nc challs.actf.co 32760
Approach
the program makes some checks before giving us flag
check#1
the program prompts I'm going to sleep. Count me some sheep:
looking into the binary we find that the number is 4919
check#2
it then prompts Nice, now reset it. Bet you can't:
it asks for x
such that x * 4919 ≠ 1
check#3
it then asks Okay, what's the magic word?
looking it the binary we can see that it perform xor
on a string with a key
after the
xor
we got the magic words
┌──(kali㉿iasad)-[~/CTFs/angstorm]
└─$ nc challs.actf.co 32760
I'm going to sleep. Count me some sheep: 4919
Nice, now reset it. Bet you can't: 1
Okay, what's the magic word?
SHEEPSHEEPSHEEPSHEEPSHEEPSHEEPSHEEPSHEEPSHEEPSHEEPkd
actf{g00dnight_c7822fb3af92b949}
Flag: actf{g00dnight_c7822fb3af92b949}