ColddBox:Easy - Walkthrough [Vulnhub]
Here's my solution for ColddBox:Easy
The machine can be downloaded from here.
Port Scanning
Using nmap to scan all TCP ports.
$ nmap -sC -sV -p- 192.168.1.103

We find 2 ports open.
Enumeration.
Browsing the web, we observe that it is built on CMS- Wordpress.

We use wpscan to enumerate all plugins and users.
$ wpscan --url http://192.168.1.103/ -e ap,u

No plugins are found but wpscan did find users for us.
Since we have usernames we try to brute force the password.
$ wpscan --url http://192.168.1.103/ -U c0ldd -P /usr/share/wordlists/rockyou.txt

Lets us login with the found credential.
Username: c0ldd
Password: 9876543210

We navigate to Appearance > Editor and select the 404 Template to place the php reverse shell payload.

Getting Access
To run the exploit, we browse /wp-content/themes/twentyfifteen/404.php and on the other hand we start the netcat listener.

We find a file- wp-config.php under /var/www/html/ directory.

On viewing the file we find database credential.
$ cat wp-config.php

We switch to user- c0ldd and enter the same password.
$ su c0ldd
Password: cybersecurity

User Flag

Privilege Escalation
We check for SUDO rights.

Lets escalate and get the root flag.

Comments
Post a Comment