Download the exploit, modify the reverse shell with my IP and port, and modify and config.yml by adding compatibility version 6 as it's not there by default.
I did exploitation steps manually instead of running exploit.py
Upload the zip file and click install
Activate the module.
Receive a shell as www-data after navigating to http://take-survey.heal.htb/upload/plugins/Y1LD1R1M/php-rev.php
Lateral Movement
On running linpeas.sh, I got interesting credentials from the config file. It's a credential for PostgreSQL instance.
I tried the password for two users, It only worked for ron
User Flag: 6532d7ea0abd75ce47e3exxxxxxxxxxx
Privilege Escalation
From the open ports inside the box, I will map them to my host to be able to attack it using port forwarding over SSH
http://localhost:8500/ui/server1/services
The version in the left corner is Consul v1.19.2. Looking for public exploit to this version, I found this https://www.exploit-db.com/exploits/51117
From this POC, I construct my command to do it manually and receive a shell