DC6

DC: 6 Vulnhub Walkthrough

Enumeration

nmap

nmap -sC -sV -oA nmap/DC6 192.168.1.115
Starting Nmap 7.80 ( https://nmap.org ) at 2020-05-18 07:20 EDT
Stats: 0:00:09 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan
Service scan Timing: About 100.00% done; ETC: 07:20 (0:00:00 remaining)
Nmap scan report for wordy (192.168.1.115)
Host is up (0.00016s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.4p1 Debian 10+deb9u6 (protocol 2.0)
| ssh-hostkey: 
|   2048 3e:52:ce:ce:01:b6:94:eb:7b:03:7d:be:08:7f:5f:fd (RSA)
|   256 3c:83:65:71:dd:73:d7:23:f8:83:0d:e3:46:bc:b5:6f (ECDSA)
|_  256 41:89:9e:85:ae:30:5b:e0:8f:a4:68:71:06:b4:15:ee (ED25519)
80/tcp open  http    Apache httpd 2.4.25 ((Debian))
|_http-generator: WordPress 5.1.1
|_http-server-header: Apache/2.4.25 (Debian)
|_http-title: Wordy – Just another WordPress site
|_https-redirect: ERROR: Script execution failed (use -d to debug)
MAC Address: 00:0C:29:EC:F5:FF (VMware)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 10.11 seconds

After that, as usual, we put the IP to the address bar and see what we got

We can see the URL there has a domain called wordy.

Let's navigate to the /etc/hosts and add the IP into it.

Reload the browser.

We got a wordpress file!

Dirb

As we can see we can navigate to wp-admin and it will redirect us to the login form.

After poking around I still can't find anything interesting

wpscan

We can see that there are 5 usernames available, admin, graham, mark, sarah and jens.

Let's put it inside a text file.

We can see from the vulnhub site, the author gave us a clue about getting a new password.txt so that we don't need to waste our time on brute-forcing it.

Then at wpscan, type

Then we can run the command

We get a username and password and that is mark and helpdesk01

Let's login to the wordpress

We've successfully logged in to the account.

Exploitation

Searchsploit

Since we got the Activity monitor plugins, so I went to searchsploit to search for the exploit.

The exploit that what we want is the third one.

Copy the file to a directory that we can access later.

Then nano into that file

We can see that there is a reverse shell will be called after we execute the file.

Change the URL from localhost to wordy and the reverse shell to your IP and the port that you want to put.

We first set up the listener at our machine

Then open the file

Click submit request

Then we got a shell, type

to get a proper shell.

Then navigate to /home/mark/stuff. We got a file called things-to-do.txt

Open up and we will see something inside.

We see that there is a graham user and his password, GSo7isUM1D4. Let's logout and ssh to graham

Privilege Escalation

When we type sudo -l, we can see this

It seems like we need jens user to run this thing.

Append /bin/bash to the backups.sh file in order to let us get a shell when we switch to jens user

Then, type

We successfully got to jens user, then we type sudo -l again and got this

We can go to the site and search for nmap

Follow the instruction given

We got root !

Navigate to the /root to get the flag

Congratulation !

Last updated

Was this helpful?