Official mysterybox Discussion

Official discussion thread for mysterybox. Please do not post any spoilers or big hints.

Hey for those of you that have solved this challenge, question about the flag. I’m able to generate the flag but the python program can’t find the file so I just get this message: An error occured, please try again. [Errno 2] No such file or directory: ‘/challenge/flag.txt’ Any thoughts on this?

That’s what you’ll get when you solve the challenge on your local machine, as the server will execute the following lines of code if you manage to provide a correct signature for the to_sign message: if verify(msg, sig, pubkey): if msg == to_sign: print(f"Welcome, admin. Here's your flag: {open('/challenge/flag.txt').read().strip()}") Obviously you don’t have the flag on your filesystem at /challenge/flag.txt. You need to spawn an instance of the challenge server (via the HTB interface), and interact with that to get the real flag.

Very nice challenge. I will say that there is a very easy unintended way of solving this challenge that involves very little math (compared to the intended solution) and some exploitation of the way the code is written. Very nice challenge otherwise Send message is you need a hint

1 Like

I saw many people solve this challenge using unintended method.
But intended method is more fun.