Writeup by wook413

Recon

Nmap

My methodology typically begins with three Nmap scans. First, I scan all 65,535 TCP ports. Next, I perform a service enumeration on the discovered ports, and finally, I scan the top 10 UDP ports.

Initial Access

HTTP 80

Whenever I encounter an HTTP service, my first step is to run Nmap’s http-enum scripts, as they often reveal some low-hanging fruits.

I mapped the domain name to the target IP address and updated the /etc/hosts file accordingly.

Browsing the service on port 80 revealed BoxBilling. While I found an RCE exploit in Searchsploit, I noted that it required valid authentication.

image-20260205211439733

I then proceeded with further enumeration, ranging from checking /robots.txt to performing directory brute-forcing with gobuster. This led to the discovery of a /.git directory.

Using git-dumper, I dumped the entire Git repository.

Inside bb-config.php, I discovered a set of credentials.

Furthermore, running git log -p exposed the admin’s email and the username “Yuki.”

I tested these credentials on the /bb-admin login page and successfully authenticated as an administrator.

image-20260205211504816

image-20260205211509513

With valid credentials in hand, I attempted the Authenticated RCE exploit I had identified earlier.

After analyzing the code, I executed the exploit. I confirmed it was working by successfully rendering the phpinfo page.

image-20260205211518423

image-20260205211523303

image-20260205211528496

I replaced the command with a reverse shell payload, which successfully granted me a shell as the user “yuki.”

image-20260205211535161

Shell as yuki

Privilege Escalation

Once I gained shell access, I checked the user’s privileges using sudo -l. This revealed that Yuki was authorized to run all commands with elevated (root) privileges. I executed /bin/bash -p to spawn a shell with these elevated privileges, successfully obtaining root access.

Shell as root

found proof.txt