At this point in the thread, I'd just like to say a thing or two about security. A lot of blame is being placed at the feet of IX Webhosting, and although this is understandable, there is a grim reality we must each accept. Ultimately, the buck stops somewhere, and a website admin can throw blame at whomever they wish, but it is the responsibility of the website admin configuring Joomla! to ensure that their site is secure. Web host selection is part of that. Understanding web security is part of that. If you think a halfway job is well enough, then you might as well not run a Joomla! site in the first place. Before you cry out "flame-bait", understand that Joomla! themselves state this very clearly in
the Joomla Administrators Security Checklist.
Merely the fact that IX has
register_globals set to
on globally is evidence that they are probably a poor choice for someone wanting a
secure shared hosting service. This is considered a huge flaw by any serious developer, and has been a deprecated setting for a very long time now, (and subsequently removed from PHP altogether as of version 6), so why they are forcing it on is beyond me.
Some of you have mentioned that IX has told you setting a directory's permissions to 777 is a huge risk. Well, here's a shocker - it is. Only set a directory to 777 if you want a hacker to have write-access to the directory as well. Joomla! doesn't suggest 755 permissions on all folders just to be cute. Even if you've disabled scripting through
.htaccess, it is still going to allow saving and overwriting within that directory. Give your modules temporary access when need be. I know, it's a pain, but if you care about security, you will keep your access to folders locked down. As well, IX will allow you to use the ftp feature of Joomla! for everyday modification of content or any updates to the configuration of the site.
Now for a couple quick questions - how many of you have had sites hacked where your permissions were all locked down? And a second part to that question - if any of you had sites hacked where you also had exposed directories, (777 or 757 permissions on a directory), exactly what protection, (through
.htaccess or otherwise), were you using on those directories? Finally, how many of you are certain that you have register_globals off? Seeing as responses from IX have been somewhat convoluted, I'd like to try and discover exactly what might be happening in the majority of these cases. It's obvious a lot of IX accounts are being hacked/targeted. If IX won't tell us in clear terms why this is happening, perhaps we can narrow it down a little.
Here are some quick tips for IX Webhosting customers:First off:
.htaccess. Many accounts on IX, especially older ones, do not have access to
php.ini for modifying PHP settings. You are able to use
php_flags within
.htaccess to allow you to change some of these settings. By default, for heaven knows what reason, IX has
register_globals on in their global
php.ini. This is dangerous on several levels, especially because IX provides shared hosting and is probably susceptible to session poisoning. The best we can do is to turn it off locally. In addition, it's a good idea to turn off error reporting as well, to prevent cross-site scripting hacks. As per the security suggestions of Joomla!, you can also disable
allow_url_fopen in your
.htaccess as well. Just add this to the end of your
.htaccess file:
Code:
php_flag register_globals off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_flag allow_url_fopen off
Important Note: If you do turn off the PHP error reporting, the "Parse error:" message will not appear if, heaven forbid, your site is hacked again. More than likely you will just end up with a blank white page. If you do get hacked, and really need to see the error messages, simply reverse the settings to re-enable the error reporting in your .htaccess file.If you want to have a look at your current global and local PHP settings, simply copy this code and make a little file called phpinfo.php, (or whatever you want to call it), and upload it into your web's root, then browse to it:
Code:
<HTML>
<BODY>
<?php phpinfo();?>
</BODY>
</HTML>
Don't forget to delete the file from your website when you're done. This will list all your PHP settings. Pay close attention to
register_globals and other such security settings.
Finally, if you absolutely must have write access opened up on a directory, at the very least add a local
.htaccess file which will prevent script execution from that directory, (see this post:
http://forum.joomla.org/viewtopic.php?f=267&t=288032#p1285547). Here is an example which you can modify to suit:
Code:
# Don't list contents, that would be bad :D
IndexIgnore *
Options All -Indexes
# Secure directory by disabling script execution
AddHandler cgi-script .php .php2 .php3 .php4 .php5 .php6 .php7 .php8 .pl .py .jsp .asp .htm .html .shtml .sh .cgi
Options -ExecCGI
# Don't show this file, that would be bad as well!
<Files .htaccess>
order allow,deny
deny from all
</Files>
#Deny access to a specific file in the directory that has been set to 777, except the webuser (and ftp of course)
<Files configuration.php>
order allow,deny
deny from all
</Files>
Let me know if you have trouble with any of this. Note that these tips are helpful for other kinds of CMS software as well.
Cheers, and good luck.