Another day, another challenge…
Today’s topic will show how to solve the Leaf of the Tree challenge from the PicoCTF.
Clicking on the challenge we see the following:
We need to find the flag, but it’s located in an annoying named directory. The challenge tells us that we should use the cat and ls commands.
Clicking the hints we see the following:
Nothing much here except that tab completion is our friend.
Going to the command line and navigating to the folder in the challenge we see:
Hmm… a trunk directory, let’s change our current directory (cd) to the trunk directory and list the contents.
Doing that we get:
Two more folders… let’s go to the trunkef96 directory and see what’s in that directory.
Another folder… trunk99e1, let’s see what’s in that directory.
Three more folders. Let’s look what’s inside of the trunk54f4 directory.
Going to trunk61be and looking at the contents in that folder we see:
Going to the trunk61be and looking at the contents in that folder we see:
Going to the trunk61be and looking at the contents in that folder we see:
Going to the trunk89be and looking at the contents in that folder we see:
Going to the trunk87bf and looking at the contents in that folder we see:
Going to the trunkb252 and looking at the contents in that folder we see:
OK – there’s the flag. Let’s use the cat command to open the file and see if the flag is there.
We found the flag, and acquired 30 points in the process!
I did this challenge after reading your post.I also noticed that you did it in a few steps. I went back and played around with some bash stuff and found out something like cat $(find Documents/place -name thing) will let you cat it out in the same line it finds it. đŸ™‚ Thanks! ps. You killed it at the AVLBsides.
Thanks for the response, and I am glad that you found another way to solve the challenge. I will write this new solution in my notes. đŸ™‚