 Hey guys, John Hammond here and we're looking at Pico CTF 2017. We just got into level 2, so now we're moving on. We got the Michelinius category opened up again. All the other categories are opened up again. So let's start with our typical procedure. Go for the lowest point challenge that we can. Hit that low level fruit first. So 55 points yarn, the first challenge in the Michelinius category. So I was told to use this Linux strings command on yarn, but it doesn't work. Can you help? I lost the fog in a binder somewhere and I would like it back. All right, so let's copy this link. Let's head over to our shell. We've actually got all this stuff in its own folder, but let's make a directory for level one. And let's move everything into level one. Okay, cool. So now in level one, let's get the shell out of there. Good. And now let's just make directory level two, cd into level two. And let's make this challenge yarn, cd yarn, wget to pull the file here. And we've got it. Okay, what is this thing for one thing? Let's run file on this to do some basic reconnaissance. Looks like a binary. We could just run it if we wanted to. Ain't here. All right, cool. So we've used the strings command before in previous levels or previous challenges. So let's try one more time. Let's run strings on this file. And there's a lot to look through or not. There's not a whole lot to look through. What the heck? Hmm, you can pipe this into less or more if you wanted to like look through it to scroll around and actually have it be paginated or like buffered paginated is that a word? Separating the pages that you can look through and scroll through in your shell. So nothing really here. But what are the hints say? What does the strings command use to determine if something is a string? Is there an option to change the length of what strings considers are valid? Oh, huh. Let's check out the man page for strings. Strings. Print the strings of printable characters and files. Does it say okay, strings prints the printable character sequences that are at least four characters long or the number given with the options below. You can use tack a scan the whole file all knowing this default behavior. Huh, it only print from data. Hmm, you can specify a minimum length, tack n, tack encoding, huh. That might be handy. So tack e for encoding, which we can change to L and B our default for ASCII single 8 bit. So let's try n minimum length of one. And let's try to change the encoding at some point. So strings yarn, tack n one, need a space between those. Okay, that's a lot of stuff. Now we just get everything. Let's pipe that into less and see if there's anything that's in there. Submit me for I am the flag. Huh, interesting. How come it, I don't know wonder why it modified all that stuff. Is there a way to change that encoding that will allow us to like see that? Yes. Huh. Let's check out what the actual hex is. We can use hex edit to view it. If you don't have that installed, so do I have to install right. Looks like it has just no characters in between it. So that 00 is what's determining. Okay, this is a separate string, and it's getting cut up. And it's obviously less than four. It does this every single time. Submit me for I am the flag, it cuts it up into characters that are only in sets of three, less than four. Interesting. So we change it down and we got to work. You can control X and no to break out a hex edit if you want. So let's steal that. I'm a nano flag dot text. Well, didn't have that in my clipboard in the way that I wanted to. Once we've got it. Now we can cat that out and you remove all new lines with transform tacky to delete new line characters submit me for on the flag. Let's put that into a new file. And let's move that just to regular flag dot text through that in my clipboard. And let's go ahead and submit it. Awesome. You're up 55 points. Cool. That was an interesting one. That's good things to take note of. I've seen that encoding take advantage of in a sans holiday hack challenge at one point. But I always forget that it determines the length of a string based off of four printable characters. So that was kind of a neat trick that they were hiding on us. Always useful to check out the man page for every single tool that you're working with. Because if you just got a gut feeling, this is a tool that I need to solve this challenge. But I'm not getting something right. Take a look at what else that tool can do. Because you may learn something new. And that's what capture flag cybersecurity computer science. That's what all the stuff is is all about. So thank you guys for watching. Hope you enjoyed this video. I need to give a special shout out to my Patreon supporters right after I successfully renamed this directory. All right. Hey, you guys are fantastic. Thank you so much. Every little bit that you provide really, really helps me and inspires me to keep making more cool content. So $1 a month on page one will give you the special shout out the end of every video $5 a month on page on or more or more. Hey, I'm not biased or more will give you early access to everything that I create on YouTube. And that's it. I don't have any other incentives just yet. But hopefully you guys can make me think of some other cool stuff. Maybe you can have a live, I don't know, call in with me or something. Hey, whatever. If you want that, I don't even know why that would be useful. Sweet. If you did like this video, guys, please do press that like button. Maybe leave me a comment if you're willing to subscribe. And if you want to support me, check me out on Patreon or visit my website www.johnhamman.org. See you soon.