Beep

Overview

Initial Foothold : RCE Using known exploit of Elastix service running on webserver

Privilege Escalation : Abusing SUDO rights of the user

Enumeration

Start with port scanning

Port Scanning

So many ports are open lets start with common port 80 and 443

Web Service Enumeration

Lets Visit the webpage

The web server was running on apache we can see in our nmap scan

Elastix web application was running on webserver

Search exploit for this service

We got two exploits one requires authentication so we will not use that one right now

Lets start with LFI as it doesnt require any Authentication

circle-info

If we get the username and password using this LFI we can use the Above exploit to get RemoteCodeExecution

We will manually craft the url

The Above url will exploit the LFI and we can get the configuration file of the service

Now we have to find password for user admin in this configuration file.

We will search for password

We got the password and username

admin : jEhdIekWmdjE

Lets try to login using this creds

Boom !! we got in

Summary

We got admin creds we also have the exploit for this service that can give us RCE

Exploitation

As we got the admin session we can now use the exploit

According to this exploit code we need extension value for exploiting

We can try to find it by some enumeration on the website

We got it on PBX section of the website

Now update this extension value, lhost, rhost and lport in the exploit

Now we are ready to exploit

we will manually pass the url payload to browser

Yeah we got the shell

Upgrade shell to tty shell using python

Thats all for the low privilege shell

Lets start Privilege Escalation

Privilege Escalation

Simply run

Cool we can run many commands as root user

circle-info

For abusing sudo and suid rights search that command in gtfobins

Privilege Escalation using nmap

Using gtfobins reference

Got root shell

In this similar manar we can exploit other sudo rights using gtfobins

Last updated