capture the flag, hacking

PicoCTF 2017 – Leaf of the Tree

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:

PicoCTF_Leaf_Of_The_Tree_1

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:

PicoCTF_Leaf_Of_The_Tree_2

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:

PicoCTF_Leaf_Of_The_Tree_3

Hmm… a trunk directory, let’s change our current directory (cd) to the trunk directory and list the contents.

Doing that we get:

PicoCTF_Leaf_Of_The_Tree_4

Two more folders… let’s go to the trunkef96 directory and see what’s in that directory.

PicoCTF_Leaf_Of_The_Tree_5

Another folder… trunk99e1, let’s see what’s in that directory.

PicoCTF_Leaf_Of_The_Tree_6

Three more folders. Let’s look what’s inside of the trunk54f4 directory.

PicoCTF_Leaf_Of_The_Tree_7

Going to trunk61be and looking at the contents in that folder we see:

PicoCTF_Leaf_Of_The_Tree_8

Going to the trunk61be and looking at the contents in that folder we see:

PicoCTF_Leaf_Of_The_Tree_9

Going to the trunk61be and looking at the contents in that folder we see:
PicoCTF_Leaf_Of_The_Tree_10

Going to the trunk89be and looking at the contents in that folder we see:

PicoCTF_Leaf_Of_The_Tree_11

Going to the trunk87bf and looking at the contents in that folder we see:

PicoCTF_Leaf_Of_The_Tree_12

Going to the trunkb252 and looking at the contents in that folder we see:

PicoCTF_Leaf_Of_The_Tree_13

OK – there’s the flag. Let’s use the cat command to open the file and see if the flag is there.

PicoCTF_Leaf_Of_The_Tree_14

We found the flag, and acquired 30 points in the process!