 Hello everybody, my name is John Hammett. Welcome back to the YouTube video on the all-army cyber stakes or ACI CTF That was going on this past week. So I want to showcase some more of these challenges for you guys I'm down here at one of the latter challenges that I was able to solve. It's called partition twice recover once It's worth 250 points and currently at the time recording. It's Friday the challenge Competition ends on Sunday, so it might get a few more solves 105 solves currently in the miscellaneous category says I think I may have overwritten my secure file store Do you think you could recover the data for me? The password for the encrypted partition is secret one two three four and we are given a file to download So I'll copy that link. I will fire up a terminal and hop over to our directory that we've created for this challenge Let's go ahead and make one specific to this guy. Let's call it partition twice Recover once and let's hop into that directory. Let's W get that file down and It's cruising. Okay, so I didn't have a whole lot of difficulty with this challenge I probably didn't do the crazy things that might be necessary for otherwise You know partitioning and stuff I had this file image dot bin and it's an ext4 file system So I thought well, let's be dirty and let's just run friggin bin walk on this So I ran bin walk tacky on that image and it found some luxe magic in there So if I were to LS you could see all the images and all the files that I was able to extract out of that So I changed directory into that guy and now I have this zero dot ext That's still seemingly the ext file system that I had So what I actually want to went ahead and did was I ran bin walk one more time but bin walk has some crazy arguments that you can pass to it to like force carb stuff out and For some reason I've committed these to memory because we needed to have them in katana But if you use bin walk tacky on the image or the file that you want to carve out of it You also specify attack capital M and a DD or a hyphen DD equals dot star It'll just carve out friggin everything that it can so you can see that luxe magic is still present But now that I've actually gone ahead and extracted it should be present in there We could check out the man page for bin walk and see really what those do rather than just me say them to you and like not even discuss what they are if Bin walk is actually going to tell me what they are. Okay. Yeah, matryoshka Matryoshka, I always say that wrong recursively skin extracted files and the tack DD is Somewhere in here. I promise Yeah, there we go extract type signature is given the files of extension ext and execute command I just say I don't care get everything out extract everything So now that I have that zero extracted page. I have this file the original file system again and This luxe encrypted file So we know the password of this file because it tells us right in the challenge prompt But we have to go ahead and decrypt it. So how do we do that? Let's just ask the internet man decrypt luxe file How to mount luxe encrypted file you can see I've already kind of taken a look at this It says I have a file and it's a luxe encrypted file when I try to mount it It says on record file system, but I know the passphrase for this dump How the heck do I do this and they offer a good good answer here? You can run mod probe see if you actually have that crypt module Included if that doesn't error then you should be fine Then I should be able to go ahead and run this crypt setup command So crypt setup open the luxe file system type the location of what we're looking for and what we want to call this thing So I'll show it to you what we can do is just simply run this Crypt setup open luxe and it had I think five zeros in it. Yep desired name. I don't care We'll just call it like please sub That's totally fine and to the passphrase what we know from the challenge prompt that is secret one two three four and I am not running as root. So it's not able to mount this. So let me pseudo that command just one more time Same passphrase one two three four takes just a second, but it will go ahead and put it together now You can see I don't know just barely if you could see a unity my file system was like whoa I saw you just mount something so if I go over into media John where it's going to automatically put some of this stuff Maybe it's not going to show it to me. So let's get it in my file browser since that's created it there the latest one There we go. Now if I a less, okay, I've got this location here I could change directory into that and you probably already saw when we open the little browser there I've got this flag file and that will simply give me the flag So that was that challenge. Maybe I should have done more I don't know if the hints would have put me in a different direction But if it's just a file system and I can carve stuff out of it. I'm gonna use bin walk I'm gonna try foremost. I'm just gonna like hey beat the thing up and eventually it found just carving it out. Here's that luxe file that you need and I can decrypt it with the given password Now I've got the flag some quick research some quick learning on the fly. That's that stuff So a little bit of a quick video, but I want to showcase that challenge to you guys It is worth a lot of points. It doesn't have a ton of solves Maybe some people just haven't unlocked it yet, but that one's not too bad. I want to showcase it to you Thanks for watching everybody. I hope you enjoyed this video if you did Please do press that like button maybe type in the comments say wow This was neat or wow John you suck. They're both the same to me. I don't really listen to either I'm just kidding. I love you Subscribe hit that bell do the whole YouTube algorithm thing. Love to see you guys on patreon paypal discord linkedin facebook twitter instagram myspace Vine is that a thing? I don't know. Bye everybody