Rating: 4.5

Bashing My Head

Misc Points - 450

This program won't let me get in! It says im not a bot, but I believe I am! I think so, because I can't solve captchas. Are you bot level brain?

nc cyberyoddha.baycyber.net 10006

- YoshiBoi#2008

Ok... this essentially was a scripting challenge ^^.

Once you actually connected via netcat you could see that you had to complete some sort of quiz in order to retrieve the flag.

You can find our final python script that solves the quiz here, but here's a short explanation of how you can solve the individual questions:

  • Quick, decrypt this: some_base64!

Ok this one wasn't to complicated ... You simply had to decode the base64 string and return the result.

  • Supa ez. Is it possible for p to equal some_number? [y/n]

All you had to do on this one was to check, whether or not the provided some_number is prime. If it is, return y otherwise n.

  • Quick give me the p and q (where p < q) values for when n is some_number!

Calculate and return some_number's prime factors. Be mindful that you have to return them individually.

  • Now tell me if it is possible for n to equal some_number! [y/n]

Simply check, whether or not the given some_number has exactly two primefactors.

  • Tell me ϕ whe n is some_number!

Calculate the given some_number's prime factors (p and q) and then use those two to calculate phi with: ϕ = (p-1) * (q-1).

  • Is it possible for ϕ to be some_number when e is some_other_number? [y/n]

Check, whether or not some_number and some_other_number are co-prime, i.e. their greatest common divisor is 1.

Answering this question was a bit buggy sometimes, so... you might have to try more than once ... ^^

If you implemented all the questions and answers above, nothing could stop you from getting the flag (assuming that you ran the script often enough ... ^^): CYCTF{tru3_1337_b4$h!ng_t@13nt_r1ght_h3r3}

Original writeup (https://github.com/B34nB01z/writeups/blob/master/2020/CYCTF/Bashing%20My%20Head/README.md).