NCS 2021 Writeup

My writeup for the National Cyber Scholarship Competition 2021


Project maintained by codekrafter Hosted on GitHub Pages — Theme by mattgraham

go back home

BH01

Briefing

Download the file and find a way to get the flag.

Contents: program

Walkthrough

When you run the provided binary file it sends the following output and prompts for user input:

What is the magic word?

after providing a sample value (in my case I started with “test”), it spits out the following random data:

�:�lO?d#����*����E
Did you understand that?

I tried piping that into a file and running some tools like file and strings on it with no luck. After playing around with passing it random characters I discovered that the output depended on what I passed to it, and it was not deterministic (passing the same characters could result in different output). During the competition I paused working on this challenge as I wasn’t getting anywhere, and eventually came back to it near the end. As it was near the end I wanted to just try a bunch of different characters and sometimes it would print out a partial readable string. I kept trying different combinations and eventually it printed out what seemed like a complete string which contained the flag:

Flag: aLittLeObfuScatIonalCharActEr▒
Did you understand that?