Beep
Personal Rating: Easy
Enumeration
sudo nmap -sV -sC -p- <IP>
Port 80/443:
The default creds of admin:palosanto did not work.
The SSL certificate only shows root@localhost.localdomain but nothing interesting here
/var is listable and shows Apache/2.2.3 (CentOS)
Apache < 1.3.37/2.0.59/2.2.3 mod_rewrite - Remote Overflow | multiple/remote/2237.sh
I do not know how this one works, that I found with searchsploit.
The last one looks interesting, so I will try that. It exists in metasploit: unix/http/freepbx_callmenumsear #This did not work
Port 10000:
This shows a very simple login page
feroxbuster -k -u https://10.10.10.7:10000/ -x cgi,sh,php,js,pl,rb
The cgi component is very interesting. I might try shellshock/os command injection and search for more scripts.
Testing with metasploit, this does not seem to be vulnerable to Shellshock at first glance.
The page seems to be running Webmin, but I do not know the version.
Webmin < 1.920 - 'rpc.cgi' Remote Code Execution (Metasploit)
Port 5038:
With a quick search on searchsploit and Exploitdb I only found DOS attacks
Port 4559:
Elastix LFI
This payload worked to get a config file:
This worked to log in!
We now see some versions:
elastix 2.2.0
postfix 2.3.3
cyrus-imapd 2.3.7
asterisk 1.8.7.0
hylafax 4.3.10
freePBX 2.8.1
Asterisk has a CLI and a file editor:
This certainly is interesting:
We have some sort of secret here
Root Access
I want to try ssh with the credentials we got:
https://unix.stackexchange.com/questions/340844/how-to-enable-diffie-hellman-group1-sha1-key-exchange-on-debian-8-0
https://stackoverflow.com/questions/69875520/git-error-no-matching-host-key-type-found-their-offer-ssh-rsa
This worked:
ssh -oKexAlgorithms=diffie-hellman-group-exchange-sha1 -o HostKeyAlgorithms=+ssh-rsa root@10.10.10.7
password: jEhdIekWmdjE
The key takeaway is to always try the simple things first. Just check searchsploit for the simple exploits, try the ones that make sense and if you have any credentials, try them out with ssh with all usernames you know. Always work from simple to complex to not miss an easy win.
Last updated