Enumeration

Nmap

Initial Nmap scan revealed HTTP, SSH, SMB ports and Port 3000, 8021 ports were open.

00 -nmap

WEB Enumeration

At first I checked the website at port 80, it only showed forbidden.

01 - port 80 website

Then I checked port 3000, it was Cassandra Web Website.

02 - port 3000 website

Exploitation

LFI in Cassandra Web

I checked Cassandra exploits and found one, which is remote file read. (Exploit)

03 - cassandra searchsploit

I tried to read /etc/passwd and it worked.

04 - 0 passwd file read

Then I read /proc/self/cmdline and found a password and noted it.

04 - 1 cmdline file read to check cassandra

Freeswitch command execution

Then I checked port 8021, it was a freeswitch application. I searched freeswitch pentesting and found this blog .

05 - freeswitch

Tried the default password as suggested but it did not work.

06 - password is not hardcoded

SMB Null Session

Then checked SMB and found out it had null session available.

07 - smb null session

Then I listed all the files and checked if there is a event_socket.conf.xml file and I found it. This file is used to store fireswitch password.

08 - event socket conf file

Then I downloaded the file and read it. It included default password, so it was not useful.

09 - non default password nah

Cassandra Web LFI to read Freeswitch Password

Then I went back to cassandra exploit and tried to read event_socket.conf.xml directly, unlike backup in smb. And it included a different password.

10 - freeswitch password

I tried it and it worked.

11 - it worked

Fireswitch Command Execution

Then I simply downloaded an script to run commands.

12 - exploit

And updated it to include correct password.

13 - updated

Then tried it and it worked.

14 - code execution

Later I ran a reverse shell. Note that, listener should run in the same port (8021) as server to communicate.

15 - exploit

And I obtained the shell.

16 - got it

I then could not find the user flag, run find command and then found it. It was in freeswitch directory.

20 - user flag

Privilege Escalation

Su to cassie

We had password for cassie but linpeas also showed the password. I used it with su and obtained cassie user.

17 - 0 cassie

17 - cassie

id_rsa

The cassie used had id_rsa file in her home directory.

18 - id_rsa

I tried it against root and it worked.

19 - root


<
Previous Post
Boolean - Proving Grounds Practice
>
Next Post
Cockpit - Proving Grounds Practice