Sitemap

Daily Bugle (TryHackMe) write up

4 min readSep 3, 2024

The first step in checking the open ports on an IP address is crucial for network system analysis.

Press enter or click to view image in full size

We will see the open ports, one of which is the HTTP port. Therefore, access the IP address through a browser.

Press enter or click to view image in full size

When accessing the web server, you will find the answer to the question ‘Who robbed the bank?’

The next step is to use gobuster to brute-force and find any hidden paths.

Press enter or click to view image in full size

Here are some interesting paths you might come across, like /robots.txt and /administrator.

the /robots.txt file helps manage who can access different parts of the site, while /administrator leads to the admin panel, where backend management happens.

When you access the /robots.txt path, you can see which parts of the website have been restricted or disallowed for access. These sections are specified in the file using the Disallow directive

Press enter or click to view image in full size

After that, accessing the /administrator path will reveal that the web server is running Joomla

Press enter or click to view image in full size

The next step is to use the joomscan command, which is a tool for scanning security vulnerabilities on websites that use the Joomla content management system.

Press enter or click to view image in full size
Press enter or click to view image in full size

You will find that the web server is running Joomla version 3.7.0. Upon searching the exploit database, it will be revealed that there exists an SQL injection vulnerability that permits the insertion of malicious commands.

Press enter or click to view image in full size

The following step involves using the joomblah command to scan for and evaluate vulnerabilities in Joomla-based websites.

The user is a superuser. Both the username and an encrypted password are visible, requiring decryption with John the Ripper.

Press enter or click to view image in full size
Press enter or click to view image in full size

Return to the /administrator page and input the retrieved username and password.

Press enter or click to view image in full size
Press enter or click to view image in full size

Next, go to Extensions > Templates > Templates and select Beez3

Press enter or click to view image in full size

Select on index.php page to modify the content and replace it with a PHP reverse shell.

Afterward, initiate nc (Netcat), save the index.php page, and then select “Template view.”

Press enter or click to view image in full size

Once the reverse shell is established, use the whoami command to identify the current user.

Use the command ls -l to display a list of files and directories in the current directory along with additional details such as access permissions, file size, last modification date and time, and file owner.

Press enter or click to view image in full size

Go to the directory /var/www/html. This is where website data and files necessary for serving the website are stored.

Press enter or click to view image in full size

You will see a file named configuration.php. Use the command cat configuration.php to view the file’s content, and you will find the password for the user jjameson.

Press enter or click to view image in full size

Log in using the retrieved password for the user jjameson.

Press enter or click to view image in full size

By using the command ‘ls -l’, you can view the file user.txt. And to reveal the flag, use the command cat user.txt.

Press enter or click to view image in full size

The command sudo -l lists all commands that a user can execute with sudo privileges, including the actions the user is permitted to perform and which commands can be run without requiring a password.

Press enter or click to view image in full size

If you want to gain more access or control, you might be able to exploit the yum command by following the techniques described on the GTFOBins website

Press enter or click to view image in full size

Next, use the command whoami to check the current user’s permissions.”

Press enter or click to view image in full size

Change the directory to /root and use the command cat root.txt to reveal the flag.

Press enter or click to view image in full size

--

--

GrimTheRipper
GrimTheRipper

Written by GrimTheRipper

You get the best out of others when you give the best of yourself

No responses yet