Bash Loop (40 pts)

Problem Description: We found a program that is hiding a flag but requires you to guess the number it is thinking of. Chances are Linux has an easy way to try all the numbers... Go to /problems/77ad2ec283d51f7b1ddc449ffe109e0b and try it out!

Write-up: Let's first navigate to the directory and check whats in there.

We can see that there are two files there, an executable called bashloop and a file called flag, which presumably has the flag file. Looking at the user permissions, we can see that we do not have read permissions for the flag file.

We have nothing else we can do so we run the executable.We can see that we need to input a number from 0 to 4096 to get the program to read and return the flag for us. We extrapolate from the title that we need to use a bash loop to accomplish this. We'll run grep with the exclude option -v to get rid of all the wrong responses.There's your flag.

results matching ""

    No results matching ""