Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Joomla! 3 Extension Development

You're reading from   Learning Joomla! 3 Extension Development If you have ideas for additional Joomla 3! features, this book will allow you to realize them. It's a complete practical guide to building and extending plugins, modules, and components. Ideal for professional developers and enthusiasts.

Arrow left icon
Product type Paperback
Published in Jul 2013
Publisher Packt
ISBN-13 9781782168379
Length 458 pages
Edition 3rd Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Timothy John Plummer Timothy John Plummer
Author Profile Icon Timothy John Plummer
Timothy John Plummer
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Learning Joomla! 3 Extension Development
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Before you Start FREE CHAPTER 2. Getting Started with Plugin Development 3. Getting Started with Module Development 4. Getting Started with Component Development 5. Backend Component Development – Part 1 6. Backend Component Development – Part 2 7. Frontend Component Development 8. Security – Avoiding Common Vulnerabilities 9. Packing Everything Together 10. Extending your Component with Plugins and Modules Index

Remote File Inclusion


This is similar to a LFI, however with a Remote File Inclusion (RFI), a file from another website is loaded rather than a file from the same website.

Now we are going to add some code to our folio.php file under /components/com_folio, which will make it vulnerable to remote file inclusion. Obviously this code isn't required for our component and is only to demonstrate the vulnerability. You can add this code near the top of the file.

if($controller = JRequest::getVar('controller'))
{
  require_once $controller;
}

This time, create demo.txt and put it on another site, for example http://localhost/joomlatest/tmp/demo.txt. We won't give it a PHP extension as we will try to disguise it as a text file. Just because it doesn't have a PHP extension, doesn't mean it won't be executed as PHP code.

<?php
echo phpinfo();
die;

Note

You may have to enable allow_url_include = On in your php.ini for you to simulate this vulnerability.

Now try in your browser the following URL (where...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime