ArtioSEF Hacks Joomla! MetaData in Shameless Self-Promotion Scandal

By shadyjoomlabuffoonery

It has been brought to our attention that ArtioSEF hacks Joomla’s Generator metadata, shamelessly appending links to generate self promotion and advertising revenue.

This is exactly the kind of Shady Buffoonery that we seek to expose.

This is achieved by the following line of code on 415 of administrator/components/com_sef/sef.class.php:

eval(base64_decode('JHNlZkRpckFkbWluID0gJEdMT0JBTFNbJ21vc0NvbmZpZ19hYnNvbHV0ZV9wYXRoJ10uJy9hZG1pbmlzdHJhdG9yL2NvbXBvbmVudHMvY29tX3NlZi8nOwovLyBsb2FkIGNoZWNrc3VtcwokbGljZW5zZSAgPSB0cmltKEBmaWxlX2dldF9jb250ZW50cygkc2VmRGlyQWRtaW4uJ3NpZ25hdHVyZS5iNjQnKSk7CiRjaGVja3N1bSA9IHRyaW0oQGZpbGVfZ2V0X2NvbnRlbnRzKCRzZWZEaXJBZG1pbi4nY2hlY2tzdW0ubWQ1JykpOwokY2hlY2tzdHIgPSAnJzsKZ2xvYmFsICRzZWZDaGVja0E7CiRzZWZDaGVja0FbM10gPSAkc2VmQ2hlY2tBWzJdID0gJHNlZkNoZWNrQVsxXSA9ICRzZWZDaGVja0FbMF0gPSAnJzsKJHNlZkNoZWNrQSA9IGV4cGxvZGUoJy0nLCAkbGljZW5zZSk7CmZvcmVhY2ggKCRzZWZDaGVja0EgYXMgJGlkID0+ICRjaGVja3BhcnQpIHsKJHNlZkNoZWNrQVskaWRdID0gYmFzZTY0X2RlY29kZSgkY2hlY2twYXJ0KTsKJGNoZWNrc3RyIC49ICRzZWZDaGVja0FbJGlkXTsKfQ0gICAgICAgICR0aGlzLT5lbmFibGVkICY9ICgkY2hlY2tzdW0gPT0gbWQ1KCRjaGVja3N0cikpOwpmdW5jdGlvbiB4bWxQYXJzaW5nKCRwYXRoLCAkYmFzZSwgJGluZGV4LCAkb3B0aW9uKQp7Cmdsb2JhbCAkX1ZFUlNJT04sICRzZWZDaGVja0E7CmlmICgoJHBhdGggPT0gJG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vY29tX3NlZi9zZWZfZXh0LnBocCcpOwp9Cn0KJGZpcnN0ID0gZmFsc2U7Cn0='));

To fix, replace this evil line of code with the following:

        function xmlParsing($path, $base, $index, $option) {
            return;
        }

        function includeSef($once = false) {
            global $mosConfig_absolute_path, $sefCheckA;
            static $first = true;
            if( $once && !$first )  return;
            if( $once ) {
                include_once($mosConfig_absolute_path.'/components/com_sef/sef_ext.php');
            } else {
                include($mosConfig_absolute_path.'/components/com_sef/sef_ext.php');
            }
            $first = false;
        }

Tags: , , , , , , , , , ,

5 Responses to “ArtioSEF Hacks Joomla! MetaData in Shameless Self-Promotion Scandal”

  1. shadyjoomlabuffoonery Says:

    Fix posted to Joomla! forums: http://forum.joomla.org/viewtopic.php?t=121637

  2. kismert Says:

    On some versions of sef.class.php, the offending line is around 385. Search for ‘base64_decode’ and you can’t miss it!

    After looking at the eval’d code, this fix looks like the best solution, because certain links are hard-coded.

    Other links and meta-tag data are kept in:
    /administrator/components/com_sef/signature.b64
    This is a base-64 encoded file whose only purpose is to push ads.

    But, you can’t just delete signature.b64, because it’s MD5 value is checked against the one in:
    /administrator/components/com_sef/checksum.md5

    But, finding the proper MD5 value for signature.b64 requires reading the eval’d code around line 385-415.

    So, it’s best just to follow the fix outlined above.

  3. kismert Says:

    This holds for JoomSEF versions 2.2.3 – 2.2.6. Older versions may have the problem, but the fix may be different.

  4. Danny Says:

    Does it apply to artio 3.0.2? I mean, I already hacked class.php, but how can I check that out. You have an installed Joomla with hacked Artio. on my demo website.

  5. warper Says:

    For JoomSEF 2.3.0 just search for triggerEnabled() function and edit it

Leave a Reply