• We just launched and are currently in beta. Join us as we build and grow the community.

Hack the SpyderSec VM (CTF Challenge)

eLBRAYAN

Influence Amplifier
E Rep
0
0
0
Rep
0
E Vouches
0
0
0
Vouches
0
Posts
31
Likes
148
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 400 XP
In this article, we are going to solve another CTF challenge “SpyderSec” presented by vulnhub.com to practice OSCP lab challenges.

Challenge: You are looking for two flags. Using discovered pointers in various elements of the running web application you can deduce the first flag (a downloadable file) which is required to find the second flag (a text file). Look, read and maybe even listen. You will need to use basic web application recon skills as well as some forensics to find both flags.

You can download it from here: https://www.vulnhub.com/entry/spydersec-challenge,128/

Level: Intermediate

Penetrating Methodologies:
  • Network Scanning (Netdiscover, Nmap)
  • Extracting Metadata (ExifTool)
  • Decoding Hex to Ascii
  • Exploit eval function using javascript unpackage.
  • Capture HTTP request (Burpsuit)
  • Decode the URI to get them under.fbi file
  • Unlock the hidden drive (veracrypt)
  • Capture the Flag.

Walkthrough

Let’s start off with scanning the network to find our target.

Code:
netdiscover

Our target is 192.168.1.101. Scan the target with nmap.

Code:
nmap -A 192.168.1.101

1.png


There are only two ports open i.e. 22 and 80 for SSH and HTTPS respectively. Next, I opened this page in the browser.

2.png


There was nothing major on the page except for two images. There is a possibility about metadata behind these images. Therefore, I read these images with the exif tool. One of the images which were saved by the name of “challenge” had a comment behind it. To read it type:

Code:
exiftool Challenge.png

3.png


If you observe closely the comment is in hexadecimal form. We need to convert it into a readable form. No third party tool is required just go online to hex to Ascii converter copy the string and paste it in the text box and then click the convert button.

4.png


After converting we again have the hexadecimal string. No problem. Let’s convert it again as we did earlier.

5.png


This time we got base 64 encode and to decode it we use the following command.

Code:
echo 'bas64 text' |base64 -d

Now finally we have a readable string. This can be a password or a directory. Note it down for future use.

6.1.png


Moving on if you go through the source code of the home web page you will find that evil function is quite unusual.

6.png


I searched about eval function on google and found that it is a javascript. There can be code hidden behind it. So let’s unpack it with the javascript unpacker.

After unpacking you will again come face to face with a hexadecimal string. Convert this string just like before.

7.png


After conversion, the string became “alert(‘mulder.fbi);”.

8.png


I explored a lot and search a lot but found nothing about it so decided to capture its cookies through BurpSuite.

9.png


In cookies, I found an encoded URI that means it’s a part of a link. From here copy the link and open it in the browser.

10.png


Now when I opened it there was an error. Then I explored a d bit and remembered that there was a mulder.fbi so I added that to the link.

11.png


After adding mulder.fbi to the link it asked me to download a file. Save it.

15.png


When you open the file that you just saved then it will play a video with different quotes. Now I was clueless about this so I started searching about it on Google. And I found out that it was a TrueCrypt file. So to see what is hidden type:

Code:
python tcsteg.py mulder.fbi

17.png


There was a whole drive hidden behind it. And using veracrypt you can see and open the drive.

18.png


When you open it will ask for a password and we have found the password beforehand. So give the password there.

19.png


Hence the drive will be unlocked. Now open the drive. And you will find a flag there.

20.png


Author: Yashika Dhir is a passionate Researcher and Technical Writer at Hacking Articles. She is a hacking enthusiast. contact here
 

433,009

312,607

312,616

Top