An older Linux machine running a heavily-featured VoIP platform — a well-known local file inclusion vulnerability exposes a configuration file, and the credentials inside turn out to open more doors than expected.
Recon
Nmap
1 | |
The scan reveals a heavily-featured VoIP stack. Key services:
443/tcp— Apache serving an Elastix login page5038/tcp— Asterisk Call Manager 1.110000/tcp— Webmin 1.57025/tcp,110/tcp,143/tcp,993/tcp,995/tcp— mail services (SMTP, POP3, IMAP and their SSL variants)
Foothold
TLS Version Fix
Navigating to https://10.129.229.183/ returns SSL_ERROR_UNSUPPORTED_VERSION — the server uses an outdated TLS version that modern browsers reject by default. Fix this in Firefox by going to about:config and setting security.tls.version.min to 1.
Directory Enumeration
1 | |
Nothing immediately useful, but the Elastix version running is known to be vulnerable to LFI.
Elastix LFI — Credential Extraction
This version of Elastix is vulnerable to a local file inclusion in the vtigercrm module. The following URL reads /etc/amportal.conf — the FreePBX/Asterisk configuration file — which contains plaintext credentials:
1 | |
The file yields the admin password: jEhdIekWmdjE.
Logging in to the Elastix web panel with admin:jEhdIekWmdjE succeeds but provides nothing further of use.
Privilege Escalation
Password Reuse — Direct Root SSH
The password jEhdIekWmdjE is reused for the root system account. Since the server runs a very old OpenSSH version, legacy key exchange algorithms must be specified explicitly:
1 | |
Logged in directly as root. Both the user and root flags are accessible.