 What is up YouTube, but this is a video right up for the challenge modern Picasso from ICTF 2018 Unfortunately, the game just shut down and I can't actually go back to the challenges So we're just gonna kind of review it from the terminal in here. Hope that's okay Anyway, you're gonna get a file to download and it's this Picasso dot gif image so it's an animated picture as you can see and it's just a bunch of different frames kind of spazzing out and Essentially at least probably trying to spell something out, but in different frames so our objective is to figure out what is this picture when it's put all together and Does it display the flag? That's a good hunch. It probably does. So let's go ahead and try that So our first methodology is to just go ahead and convert all the frames out of this gif And if you don't know how to do that, we could totally look it up I'm gonna end up using image magic and image magic convert Like take frames Out of gif the kind of rule of thumb for image magic and for convert being the command line utility for it is pretty awesome It did you really just kind of know what you want to do You can essentially just Google that thing that you want to do and just try and track down the syntax for it So they just note here You can run convert the gif file name and then whatever you want to with like a percent sign the number of Decimals or digits that you particularly want all the files to have so they're not like one dot PNG and then a hundred dot PNG And out of order when listed so you can use the zero fill if you want there and then whatever file type So we can go ahead and convert Picasso gif and I'm gonna bring this to two decimal places dot PNG Once that's done. We can a less and oh, I totally forgot the D in there So I'm gonna remove all the PNG files Clean that up. Okay. Cool. And we'll do that again just with a D following it So now decimal great we can EOG each of these frames if we particularly wanted to hold on the arrow key blah blah blah Now we want to stack these on top of each other. However The white is kind of in the way We need to be able to tell the images that are we're stacking on to each other that we don't want the white to Override or kind of be stack on top of what the other frame had because then we'd lose all the progress We were making so the best way we could do that is go ahead and remove the transparency for these Now we could do that with GIMP if we particularly wanted to fire it up open up all these images select all of them, but that sucks and I don't want to do that because Yeah, manual stuff is necessary sometimes but automation is divine and that's what we should always aim for So again, we know we want to do convert all the white to transparency So again for image magic, you could just go ahead and kind of Google that image magic Like make color Transparent and then there's a good immediate Google result for replacing white with transparency And you see some syntax here convert image transparent white now How do we do this for all of our PNG files? That's fine Let's get all the PNG files and then let's loop through them so I'm gonna do like a wow read file name here and Just piping so we get all one at a time and then we can do just as we saw convert file name with transparent white and Does that redirect it to a new file it does so we have to supply that as the last argument And we'll just use the same file name variable that we were working with hit done once that's complete Now we've got all of the white removed and we just have transparency in the background perfect Now we can stack them on top of each other again If you don't know how to do that don't remember the syntax because convert an image magic can do pretty much everything just go over like yeah overlay images or Overlay images stack on top of each other blah blah blah how to add one image on top of each other and you'll find Okay, that that link doesn't exist whatever you'll find that normally you can just track down what it is You particularly want to do I do see composite works here and gravity center and all so that's the syntax that I'm gonna go for and I'll just type it out because that's a bad explanation of just seeing it on the internet but Convert an image magic is fine because you can just try things like just poke around it and explore and learn So I'm gonna get the same loop going right here except I'm kind of gonna do something clever Because we're gonna loop through all of these 66 images But we can only like put one on top of the other we can only stack two at a time so we have to keep one of these files as Essentially the one that we're gonna decide to stack on top of and let that carry through all the iterations of this loop So let's do converts We will use the file name that we're actually looking at but we'll put it on 00.png and That 00.png will just go through and add all of these together By the time our duration is fully complete because we'll use that as both the ingredients for stacking and the output result that we're saving it to so we wanted gravity Center and we wanted composite and we're gonna end up saving this to you as the results here 00.png We'll loop through all those and once we're done We can check out in 00.png and we've got our flag I CTF Wow fast So if you wanted to we can just go ahead and write that down I can't type stay in school kids and Now since we've got all that done We could simply create a get flags for it with all of these lines Just literally copy and paste these because we did the process and then we could move 00 or like copy 00 to a Flag dot PNG save it whatever you want them to and then mark that challenge as complete So cool kind of neat kind of simple Not really that simple because you may get bewildered and not want to deal with the automated or not want to deal with the manual Color selection and override and all that just know that you've got some tools that can do what you want And if you don't know the exact syntax, that's perfectly fine Google for what you want to do and you'll be able to tinker with it and explore with it And that's really what capsule flag and learning is all about Quick shout out to the people that support me on patreon. Thank you guys so much I cannot say it enough $1 or more on patreon will give you a special shout out just like this at the end of every video $5 or more on patreon will give you early access to everything that released on YouTube So since now I'm going to be running through some ICTF video write-ups Hopefully I can record a lot in bulk and then let YouTube gradually release them But if you don't want to wait if you want them right away just $5 a month. I don't think that's too too much I'm just a poor kid trying to put food in the table. You know Whatever All right, sweet if you did like this video Please do like comment and subscribe if you're into capture the flag cyber security computer programming cool techno on the keyboard stuff Please do join our discord server link in the description It's a cool community of CTF players programmed in hackers You can hang out with me and other cool people and we pretty much just tag team and love each other and do cool things for Like actual online CTFs. That sounded really weird not a euphemism See you later guys. Hope to see you on patreon. Hope to see you in the next video. You're the best