Tryhackme Daily Bungle

Goal: Get to Root!

1. Gaining shell

Start with the Room I start with simple nmap command, learning from my mistake and have to wait for full 65535 ports scan isn't smart.

┌──(kali㉿kali)-[~]
└─$ nmap -sN  10.10.161.209
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-31 14:41 +07
Nmap scan report for 10.10.161.209 (10.10.161.209)
Host is up (0.25s latency).
Not shown: 997 closed tcp ports (reset)
PORT     STATE         SERVICE
22/tcp   open|filtered ssh
80/tcp   open|filtered http
3306/tcp open|filtered mysql

After that I hit

┌──(kali㉿kali)-[~]
└─$ nmap -sV -A -p 22,80,3306  10.10.161.209
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-31 14:42 +07
Nmap scan report for 10.10.161.209 (10.10.161.209)
Host is up (0.25s latency).

PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 7.4 (protocol 2.0)
| ssh-hostkey: 
|   2048 68:ed:7b:19:7f:ed:14:e6:18:98:6d:c5:88:30:aa:e9 (RSA)
|   256 5c:d6:82:da:b2:19:e3:37:99:fb:96:82:08:70:ee:9d (ECDSA)
|_  256 d2:a9:75:cf:2f:1e:f5:44:4f:0b:13:c2:0f:d7:37:cc (ED25519)
80/tcp   open  http    Apache httpd 2.4.6 ((CentOS) PHP/5.6.40)
| http-robots.txt: 15 disallowed entries 
| /joomla/administrator/ /administrator/ /bin/ /cache/ 
| /cli/ /components/ /includes/ /installation/ /language/ 
|_/layouts/ /libraries/ /logs/ /modules/ /plugins/ /tmp/
|_http-title: Home
|_http-generator: Joomla! - Open Source Content Management
|_http-server-header: Apache/2.4.6 (CentOS) PHP/5.6.40
3306/tcp open  mysql   MariaDB 10.3.23 or earlier (unauthorized)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Linux 4.15 (99%), Linux 3.2 - 4.14 (96%), Linux 4.15 - 5.19 (96%), Linux 2.6.32 - 3.10 (96%), Linux 4.4 (96%), Linux 3.10 - 3.13 (95%), Linux 2.6.32 - 3.5 (94%), Linux 2.6.32 - 3.13 (94%), Linux 3.10 - 4.11 (94%), Linux 5.0 - 5.14 (94%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 5 hops

TRACEROUTE (using port 3306/tcp)
HOP RTT       ADDRESS
1   110.89 ms 10.17.0.1 (10.17.0.1)
2   ... 4
5   260.96 ms 10.10.161.209 (10.10.161.209)

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

┌──(kali㉿kali)-[~]
└─$ nmap -sN -p- -T4 --min-rate 8000 10.10.161.209
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-31 14:47 +07
Nmap scan report for 10.10.161.209 (10.10.161.209)
Host is up (0.27s latency).
Not shown: 65532 closed tcp ports (reset)
PORT     STATE         SERVICE
22/tcp   open|filtered ssh
80/tcp   open|filtered http
3306/tcp open|filtered mysql

Nmap done: 1 IP address (1 host up) scanned in 10.50 seconds

With these I saved bunch of time waiting for ports.

I also ran this:

Some cool things right here!

Tryhackme also hint at:

So I immediately visit each enumerate directories to see what's going on, only 2 are up!

And

I captured the 2 random login request to both of this site and toss it to SQLmap:

Doesn't seem so promising.

Ok so, let's check if Tryhackme left us any hints?

I immediately open:

Scrolling around I saw this:

Notice these 2:

I tried visit:

And it's ACCESSIBLE!

I then jump to gobuster!

Looks familiar?

Go back to our nmap result, you can see:

We should check and visit each directory!

I did just that and I found:

First URL:

Show:

Second URL:

Show:

Third URL:

Show:

THE CORRECT ANSWER IS 3.7.0

Why?

According to a friend:

Why the language-pack XML gives the right Joomla version while the others don’t

Manifest you looked at

What its <version> actually means

Why it’s not the core CMS version

administrator/modules/mod_stats_admin/mod_stats_admin.xml``administrator/components/com_admin/admin.xml

Version of that single module / component (both happen to be 3.0.0 because they were created when Joomla 3 was first released).

Each extension keeps its own changelog. They don’t bump every time the CMS does.

administrator/language/en-GB/en-GB.xml

Version of the entire language pack build that ships with each Joomla release.

Joomla ships a new language pack for every point release, so its number always mirrors the core version (here 3.7.0).

How the numbering works

  1. Extension manifests (<extension …> … <version>X.Y.Z</version>) X.Y.Z is just the maintainer’s semantic-version for that plugin / module / component. It will stay at 3.0.0 until that specific extension changes.

  2. Schema attribute (<extension type="module" version="3.1">) The version="3.1" up top is the manifest-schema version, not Joomla’s release.

  3. Language-pack manifest (<metafile version="3.7"> … <version>3.7.0</version>) The language files are rebuilt and re-tagged every time Joomla is tagged. So if the site is updated to 3.7.5 you’d see 3.7.5 there.

Because every Joomla installation must have at least one language pack—and that pack’s version is bumped in lock-step with the core—grabbing the value from administrator/language/<lang>/<lang>.xml is the most reliable passive way to fingerprint the running Joomla version.

That’s why TryHackMe expected 3.7.0: it’s the number that reflects the core build, not the frozen extension numbers you saw first.


Cool, Back to gaining foot hold, from searching I found this:

Very convenient?

So let's run it!

There we got: $2y$10$0veO/JSFh4389Lluc4Xya.dfy2MF.bZhz0jVMw.V.d3p12kBtZutm

Decrypt it with https://hashes.com/en/decrypt/hash we got the password!

Now if we login to the:

We don't see much.

But if we use login to:

We got our nice admin panel!

Now, I tried metasploit using CVE-2017-8917 https://www.exploit-db.com/exploits/44358

Seems like we need another entry point.

No worries, we are now web admin, let's execute the shell ourselves!

Now if you go to:

Choose template:

Choose Beez3:

And choose: Editor -> html -> modules.php

Set up our netcat:

Edit it, paste our reverse shell, press save and preview.

We got our Reverse shell!

2. Privilege Escalation

Let's set up our python server and upload linpeas.sh

Then:

Earlier, we can see that, Tryhackme hint at the fact that we might need to privilege escalate from yum, we might try sudo -l to check if we have right to run password-less yum:

This means we need credential of another user to login, luckily, if we go back to our linpeas.sh results:

Let's try it!:

Great, so our user jjameson has privilege to run sudo yum with out password.

The privilege from yum below can be found here:

Escalate from jjameson to root:

Last updated