duckMyBB

Reconnaissance

┌──(zwique㉿zwique)-[~/Downloads]
└─$ nmap -sC -sV 172.17.0.2
Starting Nmap 7.95 ( https://nmap.org ) at 2025-09-03 21:54 +08
Nmap scan report for 172.17.0.2
Host is up (0.0000010s latency).
Not shown: 999 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
80/tcp open  http    Apache httpd 2.4.58 ((Ubuntu))
|_http-server-header: Apache/2.4.58 (Ubuntu)
|_http-title: MyBB
MAC Address: 02:42:AC:11:00:02 (Unknown)

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 6.42 seconds

Great!!! We're given only one open port, which is http.

Visit the homepagearrow-up-right of the website built with MyBBarrow-up-right using the following URL. Then it leads to the panelarrow-up-right page, where you can see admin's account. Afterward, I ran gobuster , ffuf , and other fuzzing tools on the website. You'll eventually find this endpoint of admin's dashboard. [22:00:32] 200 - 810B - /admin

www-data

It shows us the login page. So, I thought bruteforcing the password could be possible since the username is known as admin. However, first, there has to be the error message from server in order to complete filtering successful logins.

Invalid administration session. -> after giving wrong password

Final Command to bruteforce the password using hydra

Try the list of possible passwords one-by-one until you login as admin.

Credentials of admin: admin:babygirl

CVE-2023-41362

As you can see, it clearly shows the late version of MyBB Open Source Forum Software, which led me to search for RCE.

Cool. It's vulnerable to Temple Code Injection. More detailed information can be found herearrow-up-right.

MyBB before 1.8.36 allows Code Injection by users with certain high privileges. Templates in Admin CP intentionally use eval, and there was some validation of the input to eval, but type juggling interfered with this when using PCRE within PHP.

I used this exploitarrow-up-right to access www-data

Using penelopearrow-up-right for get more powerful/optimized shell.

Alice

Check /etc/passwd to see the registered users. Alice, nice, but we'll need password of this username.

The MyBB database backup directory is located at the admin/backups/ folder within your MyBB installation, but this is a non-public directory and the backups are not meant to be stored there permanently for security reasons. For security, you should download backups and store them in a separate, off-server location, and regularly remove them from the admin/backups/ directory after downloading.

Inside /backups directory, there's a kinda log file that tracks the login dates of users. As you can see below, user alice's password is saved as hash bcrypt.

Hash Cracking

Done!!! creds are alice:tinkerbell

Root

A simple privilege escalation technique can be applied here, as the scripts directory allows any ruby script to run without restrictions.

Set up the payload (calling shell as root):

Make it executable and run the file. Done

Feel free to edit the index.html at the end in /var/www/html directory.

Last updated