DEV Community

Cover image for Bypass Me: PicoCTF writeup
Advik Kant
Advik Kant

Posted on

Bypass Me: PicoCTF writeup

Chall description

Basically we are given a binary that gives us 3 chances to enter password and we need to reverse engineer the correct password after that we would be able to open the file and get the flag.

Getting the flag

When we open the instance, we see that we need to connect to a ssh server where the binary is served.

Since I want to use my ghidra to see the decompiled C code, I used the scp command to transfer the binary to my local machine.

scp -P 58636 ctf-player@foggy-cliff.picoctf.net:/home/ctf-player/bypassme.bin ./

After opening the binary in Ghidra we see that this is the most crucial part of the binary where the strcmp() compares our entered password to the hardcoded password. So if we set up a breakpoint at the strcmp() function using gdb we can see the hardcoded password its being compared to and enter it to get the flag

BOOM! we get the hardcoded password as "SuperSecure" so lets enter it and get the flag.

We successfully got the flag!!

Top comments (0)