CTF: Infosec Institute N00bs CTF Challenge

Source: Infosec Institute

I love participating in CTF challenges, no matter their challenge level, they always help in keeping skills current and fresh in my memory. A new CTF challenge was posted today, for the Infosec Institute N00bs CTF Challenge.

So, without further ado, please see below for answers to the Infosec Institute’s CTF “N00bs Challenge”.

(– SPOILER ALERT –)(– SPOILER ALERT –)(– SPOILER ALERT –)(– SPOILER ALERT –)(– SPOILER ALERT –)

Level 1:

The first level is pretty easy. All you have to do, is look at the source code for the HTML page, and boom, there it is, the first flag text:  infosec_flagis_welcome

n00bs-CTF-Screenshot-0

n00bs-CTF-Screenshot-1

FLAG: welcome

Level 2:

Enter Level 2, well, looks like there is something wrong with the website/image.

n00bs-CTF-Screenshot-2

I grabbed the location of the image file.

n00bs-CTF-Screenshot-3

Downloaded it with wget: wget http://ctf.infosecinstitute.com/img/leveltwo.jpeg. Using the linux ‘file’ command, I was able to see that it was ASCII text, and not an image at all. Using the ‘cat’ command, I look at the contents of that jpeg file.

n00bs-CTF-Screenshot-4

Looks like base64 encoded text, I’ll go ahead and decrypt it, using ‘base64 -d’. There we have it, its the flag: infosec_flagis_wearejuststarting

n00bs-CTF-Screenshot-5

Flag: wearejuststarting

Level 3: 

I had a feeling that level 3 was going to be pretty easy. On the page we are presented with a QRCode. I download the QRCode, and take a look at it with ‘zbarimg’, and odd, a bunch of dots and dashes. I quickly assume that it is related to morse code.

Throw the suspected morse code into an online translator, and there we have it, our third flag: infosecflagismorsing

n00bs-CTF-Screenshot-7

Flag: morsing

Level 4:

My son loves Sesame Street! Look, it’s Cookie Monster. I have a hunch what I’ll have to do for this challenge ;-).

n00bs-CTF-Screenshot-8

Let’s take a peek, and see if we have any cookies to look at. Here it is, a cookie from ctf.infosecinstitute.com; that value looks like previously used key’s, lets transform that into something we can use.

n00bs-CTF-Screenshot-9

A simple ROT-13 cipher was used to encode this cookie. Here is a random searched website, to assist with decoding the ROT-13 text. Our flag: INFOSEC_FLAGIS_WELOVECOOKIES

n00bs-CTF-Screenshot-10

Here is me transforming the text from ROT-13, on the linux command line, using ‘tr’.

n00bs-CTF-Screenshot-11

Flag: WELOVECOOKIES

Level 5:

If you visit the actual CTF site for level 5, you notice that the image is pretty heavily distorted. I once again have a sneaking suspicion, that I can guess what this challenge will involve. I’m guessing a steg (steganography) challenge. Found this interesting program available to me, using linux, ‘SteGUI’, which is a GUI interface to ‘Steghide’. Let’s see if it can extract anything from the image.

n00bs-CTF-Screenshot-12

A bunch of binary information was found contained in the image, let’s keep digging a little deeper, to see if we can convert that binary to something we can read.n00bs-CTF-Screenshot-13

Once again, using a randomly searched page on the internet, to convert binary to ASCII, I plug in the binary code, and have it translate it to ASCII text, here is what we have: infosec_flagis_stegaliens

n00bs-CTF-Screenshot-14

Flag: stegaliens

Level 6:

Ah, nice, a pcap file, to examine network traffic. Fire-up good ‘ol ‘wireshark’ and start digging in. I immediately ignore all the encrypted traffic, as it won’t be worth my time to attempt to decrypt it (I don’t have enough machine to even handle attempting to crack all that traffic). I sorted by protocol, and there was only one conversation that occurred via UDP, seems like a good place to start.

n00bs-CTF-Screenshot-15

Looking at the payload, or the data involved with that UDP connection, and it looks familiar.

n00bs-CTF-Screenshot-16

The text pulled from the UDP connection looks like hex data, let’s attempt to convert it to ASCII, and see if we have any luck. There it is: infosec_flagis_sniffed

n00bs-CTF-Screenshot-17

Flag: sniffed

 Level 7: 

Now we have sweet, sweet, level 7. Interesting, it directed us to a 404 page, with bounty information.

n00bs-CTF-Screenshot-18

Using the past naming scheme of challenges, I try getting levelseven.php from the server, using telnet. Interesting enough, this one took me quite a bit of time, and I actually found this key by accident. Using telnet to download and read the pages from the server, I usually type the following: ‘GET /page.html HTTP/1.1’

Whenever I typed that, I would get an error. After circling back around, coming back to notice that the error I got with this one, was a little off, out of nowhere I attempted: ‘GET /levelseven.php HTTP/1.0’, and that made all the difference in the world; I was presented with this glorious information.

n00bs-CTF-Screenshot-19

Looks like some more base64 code, let’s decode it again, using ‘base64 -d’. We have found the key, it is: infosec_flagis_youfoundit

n00bs-CTF-Screenshot-20

Flag: youfoundit

Level 8: 

This one was extremely easy for me, and I’m guessing it has something to do with the fact that I’m running linux. I wasn’t about to be able to attempt to execute a file called app.exe, so I did the first thing that came naturally, and run strings against the file. There it is, right there: infosec_flagis_0x1a

n00bs-CTF-Screenshot-21

Flag: 0x1a

 Level 9:

This is going to be a password guessing/bruteforcing challenge, I can tell, as they have a prompt for Cisco IOS presented. I immediately tried all the cisco/cisco, cisco/ocsic password combinations I could think of, with no success. Then I found a URL that listed “default” logins used for devices, so I started going down the list. I finally found the login info with root/attack (I should also note, at this point, I started having trouble with Chrome, and switched to Firefox).

n00bs-CTF-Screenshot-22

 

n00bs-CTF-Screenshot-13

n00bs-CTF-Screenshot-23

After entering the root/attack credentials, it drops the infosec flag: infosec_flagis_defaultpass (I was able to reverse it, with my eyes ;-))

n00bs-CTF-Screenshot-24

Flag: defaultpass 

Level 10:

Level 10, was another one, that was really easier than it should have been. Downloaded the wav file, and started transforming it, to see if I could hear any recognizable audio. Slowed it down by 88%, and it became easy to hear: infosec_flagis_s-o-u-n-d

n00bs-CTF-Screenshot-25

Flag: sound

Level 11:

I wasn’t quite sure what to expect when I encountered this level. I assumed it was a php vulnerability of some sort. After I spent a fair amount of time exhausting attempts to exploit php in some way, I noticed that the images were once again distorted to a degree. So, I started playing around with the ‘SteGUI’ program again, to see if I could extract any steganography from them. Found this encoded flag, and once again, I tried our old ‘base64 -d’ trick against the text contained.

n00bs-CTF-Screenshot-26

It gave me a URL, so I followed the URL, and determined that the flag must be: infosec_flagis_powerslide

n00bs-CTF-Screenshot-27

n00bs-CTF-Screenshot-28

Flag: powerslide

 Level 12:

This level took my quite a while to figure out. I really didn’t know what I was after, or what I was going to do. After quite some time, I started looking at the css pages associated with it, and found that there was one, that wasn’t used on any of the other challenges, called design.css

n00bs-CTF-Screenshot-29

Looks like some more hex to convert, let’s see where this leads. We have the flag: infosec_flagis_heyimnotacolor

n00bs-CTF-Screenshot-30

Flag: heyimnotacolor 

Level 13:

This is another one, that ended up taking a fair amount of time for me. I finally found the magic combination of what this admin calls their backups, .old. While I generally name them .bak, but whatever, it works.

n00bs-CTF-Screenshot-31

After examining the levelthirteen.php.old file, I of course started downloading everything that looked like it was related to this challenge. I found the file imadecoy, and determined it was another packet capture file.

n00bs-CTF-Screenshot-32

After examining the file, decided to see what files the packet capture contained. Saw an interesting image, named HoneyPY.PNG, figured I would have a look.

n00bs-CTF-Screenshot-33

And we found our level 13 flag: infosec_flagis_morepackets

n00bs-CTF-Screenshot-34

Flag: morepackets

Level 14:

Level 14, was another one, that took quite a while. There was so much information contained. There was a mysql database. Just because I love the mysql interface so much, I loaded it up into my separate mysql instance, to play around with it. There were mysql encoded passwords that I tried to brute force, and I finally found it, in a table called friends, and notice a lot of weird text in there.

n00bs-CTF-Screenshot-35

Ran the text found in the friends table, and it provides us with our flag for level 14: infosec_flagis_whatsorceryisthis

n00bs-CTF-Screenshot-36

Flag: whatsorceryisthis 

Level 15:

So, we have reached the last level of this challenge. I spent so much time on this, I don’t even know if the answer is correct or not. What you are presented with is a page to perform a dns lookup, using dig, and a php system() call. After thoroughly browsing through every file that I could, every directory that I could, I submit this, what I believe may be the answer.

So, this is a dangerous web application, as it allows the user to enter their own formatted text in, and perform system calls against the host OS. If you include a “;” and enter a command after that, it will happily execute for you.

The initial route I started to head down, there is a file named .hey in the level 15 directory, that contains the text:

At this point, I have to assume that it isn’t part of the challenge, I’ve tried ever cipher I can find against what looks like hash, with no luck.

n00bs-CTF-Screenshot-37

Found this encrypt/decrypt page and tested all the ciphers, and what do you know, I found one that worked on the above string!

n00bs-CTF-Screenshot-40

That shows infosec_flagis_rceatomized

Flag: morsecodetones

Flag: rceatomized

Bonus Level: 

So, on to bigger and other things, finally examined the /misc directory on the webserver (/var/www/html/misc/) and noticed there was a file there, that I wasn’t able to capture using my wget -mk command, that I ran earlier. There is another wav file. So, I ended up downloading the .wav file, and it sounded like a .wav of morse code. Attempted to find an online wav to morse code decoder, but was unable to find one, so I just used both my hearing, and my sight (looking at the wavform in ‘audacity’) to copy down the morse code.

n00bs-CTF-Screenshot-38

After translating the morse code to text, this is what I got: infosecflagismorsecodetones

n00bs-CTF-Screenshot-39

Flag: morsecodetones

UPDATE: 

I found this glorious page: Encrypt or Decrypt, and digging through, I finally found the cipher used. It was ATOM 128, which I have honestly, never heard of before.

Short URL: http://bit.ly/1IjsdZR

Leave a Reply

Your email address will not be published. Required fields are marked *