Support

Admin Tools

#9997 Bad Behavior - not blocking something that was blocked before

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, 12 August 2011 07:40 CDT

elau24
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Not related
Have I searched the forum before posting? No
Have I read the documentation before posting (which pages?)? No
Joomla! version: 1.5.23
PHP version: 5.2.16
MySQL version: 5.0.92-community-log
Host:
Admin Tools version: 2.1.5 Pro


Description of my issue:

Before upgrading to 2.1.5, this attempt was blocked:

"GET /index.php?option=com_user&view=reset&layout=confirm HTTP/1.1" 403 - "-" "Mozilla/3.0 (compatible; Indy Library)"

After upgrading, a similar attempt isn't blocked:

"GET /index.php?option=com_user&view=reset&layout=confirm HTTP/1.1" 200 25003 "-" "-"

Is there a setting somewhere that I missed? Thanks for your help.

nicholas
Akeeba Staff
Manager
"Why it was cold and now it's not?" What you make out of this question. Not much, really, as it's taken out of context. If I told you that I was talking about a beer bottle, you might entertain yourself a few speculations as to where the beer bottle was and what happened. If I told you that I'm talking about the beer bottle that I took out of the refrigerator three hours ago, you'd know exactly what is going on. In other words: context is of paramount importance to understanding and answering a question.

What you've given me is inadequate context. Just the URL tells me nothing much. Try visiting it on your site to see what I am talking about. It's the password reset form, the one a user must fill out to reset his account's password. Should it be generally blocked? No. Should it be blocked to spammers? Preferably yes. Is the user in the first case a spammer? I have no idea, there's not enough data to know within any degree of accuracy. Is the user in the second case a spammer? Likewise, I have no idea. So, based on the information you can give me, I'd say that I can see no problem whatsoever.

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!

elau24
Sorry, my mistake! The first wasn't blocked by Bad Behavior. It's not on admintools_breaches.log. But both are NOT from legit users. There are no normal user activities before or after the request. The 2nd one doesn't even have user agent info. Also, I only have a handful of local users, but these requests are from foreign countries. Maybe they're trying to do this: http://www.governmentsecurity.org/forum/index.php?showtopic=30939

The post says the vulnerability is on older versions of Joomla only, so I guess it's not a concern then.

nicholas
Akeeba Staff
Manager
He he! That was a hack that worked on some early Joomla! 1.0.x versions (IIRC before 1.0.11) and Mambo sites. Of course it doesn't work on Joomla! 1.5.x, so there is no need to worry about that.

The difference you observed between the two releases of Admin Tools is that I decided to allow an empty referrer string, since many legitimate requests coming from modern browsers do not include it under many circumstances (private browsing, accessing HTTPS sites, etc). That said, you would be in no danger even if a similar hack succeeded because:
0. I doubt that the hack would even work, since it's very likely that a security feature like XSSShield, SQLiShield or Bad Behaviour would block the attack in its very beginning.
1. The back-end of your site can (and should be!) protected by a secret URL parameter
2. You get an email even if the user logs in so that you can turn on the Emergency Off-Line mode before he is able to do anything
3. You can whitelist only your IPs, so that nobody else has access to the back-end
4. Even if you have not turned on anything of the above and the attacker does log in to the back-end and does change the allowed MIME types to allow uploading of PHP files, the UploadShield protection will block him from doing so.
5. The .htaccess Maker's default settings disallow running PHP files even if the attacker manages to upload it.
6. Trying to change Admin Tools settings requires knowing the Master Password. Without it, he can't change any of the above settings.
7. Even an enterprising hacker, trying to circumvent all of the above restrictions by uploading a specially crafted extension installation file would have to leave empty handed, as installing extensions can be blocked using Admin Tools.

All and all, the default security settings put a series of barricades in the way of an attacker to hacking your site. While each of them, by itself, can not provide 100% protection of your site, combined they can be a strong deterrent for most attackers. The idea is that it will become so time consuming for the attacker to hack your site that, unless you are a very valuable site, will cause the attacker to leave your site in peace and seek a different victim. And that's exactly how security works, in all contexts. For example, buildings. A secure lock can be cracked using liquid nitrogen. A reinforced door can be blown away with dynamite (I've seen that on the news, five years ago!). Bars on windows can be pulled out of the wall using a very powerful track (happened to a friend with a house in a far-off location). 2-feet concrete walls can probably be demolished. But all of the cracking methods are so messy, time consuming and noisy that make them impractical. Therefore secure locks, reinforced doors, bars on windows and 2-feet concrete walls add to the security of a building.

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!

elau24
Hey, thanks for the explanation. It's very reassuring. I got paranoid a couple of weeks ago when I got a bunch of CSRF attempts from different countries just when I was about to go on vacation. In the end I turned off blog commenting from unregistered users just so I could enjoy my vacation. I guess that was needless worry too.

nicholas
Akeeba Staff
Manager
Yes, indeed. The CSRFShield will always be triggered by users using Private Browsing on their browsers and if your site is using HTTPS as, in this case, the referrer HTTP header field will be blank. Some legitimate CSRF attacks will also be caught by the filter but, overall, treat CSRF notifications as warnings, not as grave security exceptions.

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!

elau24
Yup, I'll keep that in mind. Thanks again!

nicholas
Akeeba Staff
Manager
You're welcome!

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!