CTFroom: Ignite — Exploiting Fuel CMS 1.4.1 RCE & Root Escalation
Exploiting a pre-auth remote code execution vulnerability in Fuel CMS 1.4.1 (CVE-2019-14322) via PHP evaluation, locating hardcoded database root credentials in configuration files, and escalating to root.
Challenge Overview
The Ignite machine features a default installation of Fuel CMS version 1.4.1. This walkthrough demonstrates identifying outdated software versions, leveraging public CVE exploits for initial access, and conducting post-exploitation credential harvesting in application configuration files.
Phase 1: Reconnaissance & Fingerprinting
We perform an initial TCP port scan:
Only port 80 (HTTP Apache 2.4.29) is open. Visiting http://10.10.210.45/, the landing page clearly displays:
Welcome to FUEL CMS — Version 1.4.1
The default landing page also helpfully mentions default credentials for the administrator panel (/fuel):
adminadminPhase 2: Vulnerability Analysis (CVE-2019-14322)
Researching Fuel CMS 1.4.1 reveals CVE-2019-14322, a critical pre-authentication Remote Code Execution vulnerability in the pages/select controller. The vulnerability exists because user-controlled input in the URL parameter is evaluated directly through PHP's template engine:
We can write a concise Python exploit script to give us an interactive command shell:
Executing id reveals we are running as www-data.
Phase 3: Foothold & TTY Shell Upgrade
We establish a stable reverse shell using Netcat:
We stabilize the shell:
We navigate to the user's home directory and retrieve the user flag:
Phase 4: Privilege Escalation via Database Config
During Linux post-exploitation enumeration, web application configuration files should always be inspected for hardcoded credentials. In Fuel CMS (CodeIgniter framework), database configurations are stored in fuel/application/config/database.php:
Examining the database connection settings:
Notice the credentials:
rootmememeWe test whether this password was reused for the Linux system root account:
Password reuse is confirmed. We are root. We read the final root flag at /root/root.txt.
Remediation Recommendations
chmod 640 owned by www-data:www-data).