 What's up guys? John Hammond here looking more at Pico CTF 2017 at two intro into the capture to flag competitions And learn a little bit of Linux and computer hacking stuff like that So this challenge that we've been looking at a little bit before and we finally got our Linux virtual machine done We finally got our SSH key connection to actually access the files on the server and their shell infrastructure Now we can actually do this challenge leaf of the forest So we found an even bigger directory tree hiding a flag starting at this file location It would be impossible to find the flag manually. Okay. Well, let's head on over to our shell here and Let us make a directory leaf of the forest See leaf of the forest and let's actually from that directory We can dot dot to move up a directory and we can run our shell script to connect to the server We don't even need really need to be in this directory right now, but it's again good practice to have that So let's change directory into that location. We can LS to see what we have here and just the forest So let's if we wanted to LS tack a but there's nothing else in here So let's just move into the forest great LS and whoa We have a lot more directories or subfolders to look through then we had previously with the branch and trunk stuff That we did and leaf of the tree So if we were to just choose one of these tree like 0 8 and then I hit tab autocomplete I can CD into that LS again, but there are just more branches and trunks and we would just keep Expending all these and there's there's nothing we can particularly do so What I wonder what are the what are the contents of these files? Let's check out leaf 6 7 etc flag not here flag follows name flag, but it could be anywhere in this forest Okay, so let's move up a few times to get back to the Okay, the top of the tree or whatever forest that we're in and let's see what the hint says Is there a search function in Linux like if I wanted to find something huh? Okay, that alludes to that fine command that I showed you guys a little bit previously in an earlier video leaf of the tree and We can check out that Man page it explains that the fine command will search the directory root at each given file name by a valid and given expression from left To right according the rules of precedence until the outcome is known. So essentially it'll keep finding other files So let's try and use that fine command I Actually had interesting results because the man page on my file system had another note That said this man page documents the new version to find and it will search the directory tree root at the giving starting point which is normally the first argument you pass to the command and Explicitly tells you that at which point fine will move on to the next file name if there is no starting point It will use the current directory or the period right so Back in our shell here We can just run simply find without any arguments or again using the period to denote our current directory And it will look through all of those Paths all those subfolders all those directories that we could have explored So you can see each individual tree being explored each individual trunk or branch being explored and if we wanted to we could look through this and Explore okay. Where is the flag? This is a little easier to work through because we can just simply scroll up or scroll down and eventually we'll find the flag I thought I saw it at the corner of my eye at the very bottom just about I See yes, okay tree 27 63 a 4 etc. Has this which is the location of the flag So we can copy that control shift C and then we can simply paste all that in and give it to cat So cat will just output that on the command line display the flag for us and hit enter Cool, we get a little bit of hex dump here But you can note that that's just before my username in the prompt here. So this must be the flag Let's go ahead and submit that See if we got it right And we did awesome cool that was not that difficult Good thing we got to kind of be pointing the right direction with that fine command Good thing we were able to read the man page and explore a little bit And it's just simple usage But that is super powerful if you've got a lot of directory to search and you like don't know where to go Find a little kind of narrow down maybe something that you could be looking for it's good to use that to look for files or search Like in Linux cool. Thank you guys so much for watching I want to give a special love and some shout out to the people that support me This list is getting a little bit longer, and I am just really so grateful for it One dollar a month on patreon will give you a shout out at the end of every video just like this Five dollars more on month a month will give you our early access to the videos I record and put on YouTube normally I record in bulk So the if I if you if I'll let YouTube gradually upload them But if you want the content right away as soon as it's ready, that's the way to do it If you did like this video, please do leave a like maybe leave me a comment If you're willing to subscribe and if you really want to support me check me out on patreon. Thanks so much