Support

Admin Tools

#10063 Master htaccess and hacked through Beez

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Saturday, 15 October 2011 15:08 CDT

user3678
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? No
Have I searched the forum before posting? Yes
Have I read the documentation before posting AdminToolsPro - Master htaccess Yes
Joomla! version: 1.5.23
PHP version: 5.2.17
MySQL version: 5.1.56
Host: HostUpon
Admin Tools version: NA


Description of my issue:
Prior to my recent purchase of ATPRO I was running your excellent Master Htaccess file customized for a site and I had followed all your suggestions in the "Only a Ninja warrior and kill another Ninja" article but it didn't matter it got hacked anyway.

What's surprising is that they actually mounted their C99 file through the beez template which wasn't default and gained access to the main template and redirected its index.php to the hack files in beez.

The hacker said Good Luck at getting your site back and left an email presumably for payment to get the site back.

However 20 minutes later with the help of Akeeba Backup it was up and running.

I deleted all unused templates and blocked the IP address.

My next step was the purchase of ATPRO

I guess I was just surprised that the default templates of Joomla somehow weren't covered by the Master htaccess file.

Since you've created all this great software how about an addition to ATPRO of an apache log analyser so to present the data in a better format than raw text?

Thanks again for such great software!

nicholas
Akeeba Staff
Manager
Hi,

You can "thank" the majority of template providers for that :( The majority of template providers require that PHP files inside their template directory are accessible over the web. Since most people have no idea about that, the default settings in both the Master .htaccess and Admin Tools Professional's .htaccess Maker is to allow the execution of PHP files inside subdirectories of the templates directory.

With Admin Tools Pro, however, you can increase the security by doing the following:
- Activate all Web Application Firewall settings as per the Quick Setup instructions. These will prevent upload of rogue PHP files and using an arbitrary template in the URL, essentially disabling the attack vector which was used to hack your site.
- In the Server Protection pane of .htaccess Maker, find the "Allow direct access, including .php files, to these directories" and remove "templates" from the list. Note: this is a new feature which is going to be added in version 2.1.11 next week; the current version has the exception for the templates directory hard-coded. This will prevent the execution of PHP files inside the templates directory.

Regarding the Apache log analyzer, that would be like asking for a silver bullet :D First we have the objective difficulty in obtaining access to Apache's access log. Not all hosts allow PHP to read it. Then, we have the size issue. My access logs are in the order of several dozens of Megabytes long and I only have a medium traffic website. Loading and analyzing such a big file would cause PHP memory outage and timeouts. Then, we have the question "what to look for". This is not as easy as you might think. That's why it's hard and you need a human to assess the information. Having software to track each session by IP could yield some results, but if I were a clever hacker I would use TOR to effectively randomise my IP on each request, making tracking me down nigh impossible without much effort. That's why there is no such feature in ATPRO.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!