Hack the Box Challenge - misDIRection


Hint: During an assessment of a unix system the HTB team found a suspicious directory. They looked at everything within but couldn't find any files with malicious intent.

At first glance, this looks like a traversal challenge or something. Let's take a look! I download the zip file using wget, then extract using unzip and the provided password. It looks like we have a 15.3K file with "nothing" in it - this is going to get interesting, I can already tell! The root folder is hidden, so that's why it doesn't appear in your file browser by default.

I went back to the terminal and ran unzip -t misDIRection.zip so I could get a better view of everything. The first thing that popped out was some of the folders were empty, while others had a single file with just a number for a file name.

Ok, don't over think this one. It's stupid easy, you just have to open your eyes and look at what's in front of you.

I went old school for this challenge - I'm sure there's a script I could run to sort by number, but I did it all by hand because why not? I copied the output of that unzip -t command into Leafpad, then started deleting the folders that didn't have a number.



After I cleaned it up (ctrl+h is your friend here), I started rearranging the folders by the number of the file.  One is S, two is F, etc. Make sure you keep an eye on the case of the folder name, that will be important later. After everything had been sorted, I thought I had the flag. I appended HTB{} around it and clicked Submit. Nothing. Minor setback, let's see what we can do with this. My first instinct was to check to see if this was a hash or something. I browsed out to MD5 Hashing and dropped my string in there. Looking at all of the available decoded hashes, nothing is popping out to me as a valid flag. Well, the name of the challenge is misDIRection, maybe the flag is just that string backwards! I found a web app that will reverse any string you want, but that still wasn't it. Finally, I went over to Base64 Decode and dropped my string in there. Bingo! And look! It already has the HTB{} there for us. After another copy/paste, I had completed this challenge successfully.


Until next time!

Comments

Popular posts from this blog

Exporting BitLocker Recovery Keys From AD Using PowerShell

Hack the Box Challenge - Blackhole

Hack the Box Challenge - You Can Do It!