Clue
Nmap Scan
$ nmap -sC -sV -p- --min-rate 10000 -Pn -oN nmap 192.168.231.240
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-04 15:07 +08
Nmap scan report for 192.168.231.240
Host is up (0.011s latency).
Not shown: 65529 filtered tcp ports (no-response)
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
| ssh-hostkey:
| 2048 74:ba:20:23:89:92:62:02:9f:e7:3d:3b:83:d4:d9:6c (RSA)
| 256 54:8f:79:55:5a:b0:3a:69:5a:d5:72:39:64:fd:07:4e (ECDSA)
|_ 256 7f:5d:10:27:62:ba:75:e9:bc:c8:4f:e2:72:87:d4:e2 (ED25519)
80/tcp open http Apache httpd 2.4.38
|_http-title: 403 Forbidden
|_http-server-header: Apache/2.4.38 (Debian)
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 4.9.5-Debian (workgroup: WORKGROUP)
3000/tcp open http Thin httpd
|_http-server-header: thin
|_http-title: Cassandra Web
8021/tcp open freeswitch-event FreeSWITCH mod_event_socket
Service Info: Hosts: 127.0.0.1, CLUE; OS: Linux; CPE: cpe:/o:linux:linux_kernel
Host script results:
| smb-os-discovery:
| OS: Windows 6.1 (Samba 4.9.5-Debian)
| Computer name: clue
| NetBIOS computer name: CLUE\x00
| Domain name: pg
| FQDN: clue.pg
|_ System time: 2024-06-04T03:08:09-04:00
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
| smb2-time:
| date: 2024-06-04T07:08:06
|_ start_date: N/A
|_clock-skew: mean: 1h20m01s, deviation: 2h18m36s, median: 0s
| smb2-security-mode:
| 3:1:1:
|_ Message signing enabled but not required
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 64.70 secondsInitial Access
Port 445
There are shares that we are able to list down using Null session.
Next, we will enter backup shares to see if there is anything special. There are 2 folders with service name that correspond to the Nmap Scan we did just now.
The next step is to download all the files into the current directory.
However, there is nothing much is interesting in the backup files.
Port 3000
There is a Cassandra Query Language running on that port.

Next, we will query the version and it is 3.4.4

After some searching online, there is file read exploit that might work for this version.
We will test if it actually works with files that are definitely in the system such as /etc/passwd
There are also only 3 users that we can login.
In the exploit, they also give us a file that we can get the password of the user.
So the password for cassie is SecondBiteTheApple330.
However we are unable to login as cassie using SSH.
Further enumeration on the config file for SSH reveals that the only 2 users that can be logged in using SSH is root and anthony.
Port 8021
There is FreeSWITCH mod_event_socket running on that port. After searching online, there is an RCE exploit for that.
However if we try to run it, it will tell us Authentication Error which means it is the incorrect password.

So I went to relook again at the backup files that is being shared on port 445. There must be something I missed out there.
However, there is no password in the backup files.
After searching online for hints, we can see that they have a default file location for the configuration file.
But, there is no such configuration file at the default location.

Getting the password from the config file
I am not sure but apparently the default location got changed when I was doing this box. The location of the configuration file is: /etc/freeswitch/autoload_configs/event_socket.conf.xml.
We can see the password is StrongClueConEight021.
The modified payload is:
So we will try the payload and it worked.


We can call the reverse shell.
Lateral Movement
Next we can log in as cassie using su.
Privilege Escalation
sudo -l
When we sudo -l, we can see this

We can upgrade the shell using this:
Next we will run this server at port 4000.
However, we can only curl internally, so we will curl to get the id_rsa file of anthony as we do not have anything in root.
We will then copy the content out to our own kali machine.
However, we are unable to ssh into anthony
However, we are able to ssh into root to get root access.
Last updated