Sau
Personal Rating: Medium
Last updated
Personal Rating: Medium
Last updated
nmap:
Webpage1:
You can create a basket and get a token. It then seems to log requests to the directory you created.
This Basket service seems to have an issue that allows forwarding to other local pages.
Since there are two firewalled local ports, I will try to use this PoC to get to them:
Alright, lets see
Doing the same for port 8228 shows the same page. It seems broken, but revealed Maltrail as backend service.
The vulnerability abuses an OS command injection in the login parameter of username.
Although the page seems broken, the vulnerable directory exists.
The PoC worked immediately.
I could extract the ssh private key for the puma user, which is generally great for persistence.
I generated an ssh key, but a password is still required. There are no other users on the box. The user is not part of interesting groups.
sudo -l
reveals that the user can run a command as sudo without password:
sudo /usr/bin/systemctl status trail.service
This might be the way
I cannot edit the trail service: -rwxr-xr-x 1 root root 461 Apr 15 2023 trail.service
It was even easier than that, I could run the status command and just execute !sh in the pager to get a root shell.
./CVE-2023-27163.sh
The page seems to be vulnerable to an RCE, which there is a PoC for here