Book Image

Mastering Mambo : E-Commerce, Templates, Module Development, SEO, Security, and Performance

By : Christian Wenz, Tobias Hauser
Book Image

Mastering Mambo : E-Commerce, Templates, Module Development, SEO, Security, and Performance

By: Christian Wenz, Tobias Hauser

Overview of this book

<p>Mambo is a PHP-based Open Source CMS. Mambo is both easy to use at the entry level for creating basic websites, while having the power and flexibility to support complex web applications. <br /> <br /> Mambo implements the core requirements of a full featured CMS. It has a powerful and extensible templating system with the ability to upload and manage many different data types. User access control, content approval, rich administrative control, content display scheduling are all built-in. New features and extensions are constantly added to the core system, with many more being available and supported by the community.<br /> <br /> Most of the Mambo development team now works on a fork of Mambo known as Joomla. Mastering Mambo is fully compatible with Joomla's 1.0 release.</p>
Table of Contents (18 chapters)
Mastering Mambo
Credits
About the Authors
Preface
Index

Unexpected User Data


The aforementioned two attack methods can be controlled relatively simply. User data that we did not expect was passed. You can find another example of this method of attack again in the old Mambo version 4.0.3 and also at http://secunia.com/advisories/9796/ for your review. The weak point was in the contact.php file. That is where the useful function of sending an email is located. Fortunately, this function is very cooperative; unfortunately, also with attackers. All you need to call it is the op=sendmail GET parameter:

switch($op) {
    case "sendmail":
    sendmail($text, $from, $name, $email_to, $sitename);
    break;
    // ...
}

We are sure you remember that all GET parameters in this version are automatically raised to global variables. So, what happens in the sendmail() function? Primarily, the PHP mail() function is called with exactly the parameters that are passed to sendmail():

function sendmail($text, $from, $name, $email_to, $sitename){
    if ((isset...