Support

Admin Tools

#11975 Error of PHP File Change Scanner‏

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 Friday, 13 April 2012 07:09 CDT

user62038
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? No
Have I searched the tickets before posting? No
Have I read the documentation before posting (which pages?)? No
Joomla! version: (unknown)
PHP version: (unknown)
MySQL version: (unknown)
Host: (optional, but it helps us help you)
Admin Tools version: (unknown)

Description of my issue:

I bought your "Admin Tools Pro". I met an error when use PHP File Change Scanner "JSON" {"status": true, "done": false,"error":""}

nicholas
Akeeba Staff
Manager
Please supply the mandatory information, as well as your operating system, browser and versions of your operating system and browser.

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!

user62038
thanks for your reply, I solved the problem.

By the way, can I monitor any changes of joomla files by Admin Tools?

For example:

If somebody revise the .htaccess, an email alert will come.

nicholas
Akeeba Staff
Manager
Just for the sake of future searches, it would be beneficial to tell us how you solved it. I assume it was a browser extension or an Internet security application conflicting with AJAX requests?

Regarding your question, right now it's not possible to have an email sent out. This will be included in a future version of Admin Tools (it's on our to-do list). However, if when that's added, you'll still need to have a CRON job to run every so often. It is not possible to have a file alteration monitor in PHP.

FWIW, the closest approximation I could think of to what you describe is installing the FAM (File Alteration Monitor) daemon in Linux and creating a custom service which would respond to FAM's event. This is a little too complicated and very OS-dependent to be implemented in a generic tool, let alone implement it in PHP (a custom programme in C/C++ would be much more apt to the task).

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!

user62038
You are right, this problem is caused by IE7.0

RSFirewall! has the function of "file changed alert". I enclosed a picture for you.

nicholas
Akeeba Staff
Manager
Well, as you can see from the screenshot, RSFirewall does that for just a handful of files. This means that on each and every page load of Joomla! it will check the (short) list of files to determine if the files are changed. And this is the problem.

If you do proper scanning (MD5 sums, content evaluation against potential threat signatures) just like Admin Tools does, you need 100-200msec per file. With just 10 files you get a performance hit of 1-2 seconds on each and every page load. This is a lot and will cause your site to be ranked lower by Google (and presumably other search engines). In order not to incur a performance hit, one would have to reply on file sizes and timestamps as this check is two orders of magnitude (that's 100x) faster. However, these are very easy to spoof if the hacker is not a complete moron.

So, a realtime file alteration monitor implemented as a Joomla! plugin has the following disconcerting limitations:
a. It will be limited to a few files. This means that, as a hacker, I can upload a hacking script with an inconspicuous filename (usually hackers use the name README.php) deep inside a folder, get the list of files you are monitoring, alter some other file you are not monitoring and which is loaded all the time and essentially hack you under your nose while you are lulled by a false sense of security.
b. It will either incur a performance hit or use a relatively unsafe method of monitoring changes. The performance hit will degrade site visitor experience and get your site downranked by search engines. The unsafe method is easy to bypass by any real hacker.

Therefore I consider that to be a bad form of a security feature. It will give you a false sense of security and may also cause a performance hit. If you want to have complete coverage you need to do a site-wide matching of files content, just like Admin Tools or Akeeba SiteDiff does. This is why RSFirewall is very careful in the language they are using in this feature's description: they tell you that you should use it to monitor downloadable files, not use it to make sure your site is not hacked ;)

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!