Beep
Last updated
Was this helpful?
Last updated
Was this helpful?
Initial Foothold : RCE Using known exploit of Elastix service running on webserver
Privilege Escalation : Abusing SUDO rights of the user
Start with port scanning
So many ports are open lets start with common port 80 and 443
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
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
We got admin creds we also have the exploit for this service that can give us RCE
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
Simply run
Cool we can run many commands as root user
Using gtfobins reference
Got root shell
In this similar manar we can exploit other sudo rights using gtfobins