Our Joomla website has not been touched by us in a while. When I went to add new content, we have the following problem. The initial page displays fine, but whenever you click on any menu item or link we get the following russian text displayed:
Файл ключевиков keys/sharperdevelopment.com.txt пуст или не существует. Пропишите туда хотя бы один ключевик.
Which translates to:
File keywords keys / sharperdevelopment.com.txt is empty or does not exist. Prescribe to at least one of keywords.
Does anyone have any clue as to whether this is a hacking problem or a configuration problem? A view source on the web page shows no other HTML just the text shown above.
Our Joomla version was just upgraded to: Joomla! 3.4.8 Stable The website is SharperDevelopment.com
And of course this is happening just before we are meeting a new potential client. Any help or suggestions would be appreciated.
If your website has been hacked previous to the update, you'll need to comb through the file system for the files that have been modified and/or added.
Uploading a fresh copy of Joomla 3.4.8 will not resolve this problem.
I'm going to assume linux because that's when I run on. I manage multiple LAMP servers each hosting multiple domains.
Save a backup and mark it as infected. Do this because the site is working although infected.
first things...
You need to see who's posting to odd files on your website. Turn off word wrapping. Each find that gets posted to needs to be visually looked at. joomla files start with
<?php\n
then comment header. If you see a string of PHP code, you need to remove it.here's a list of some files posted to that I see a lot.
/includes/defines.php shouldn't be a long file. if you see //istart then you need to remove everything from that point on.
you need to grep for files that use eval or GLOBAL. istart should also be checked. These commands will most likely output a lot of data so pipe it to less.
Pipe to less works like this.
You'll be looking for files that contain encoded strings like this but longer: (code posted is not valid) 1ktebHkKHMh7oMftoPA4evcfEoVJs4sUmcTtLCl5Jq0IGoKAUnbzDC1f6C2rJpduyVxvDvRsEztPwSUb6ey73tAVtx8A6BPK+SwyqR/edx3BsfPnmsfbwCFG2kYk
Many times the file will end with eval base64_decode and gzuncompress.
Many legit files use eval and base64 decode. If you see a really long block of encoded data, it's most likely a malicious file. After a while, you'll be able to see patterns that don't look right.
Some files may have the user agents for google bots also. I've been seeing this recently so look for the string googlebot
grep files for the following strings too.
You can make a backup of any files you got and check them against joomla's github repo.
https://github.com/joomla/joomla-cms
Also check mailq for deferred messages that are cause by spam bots, that's what many of these files are used for..
I also added iptables rules like the following to stop it initially.
There's probably a lot of other ways to search for malicious files but this is the method I have right now.
After you get all the malicious files off, make a backup then update all extensions. I would check your files again after that and load the a fresh copy of the Joomla files onto your website, then search for the oldest files in your web directory.
After you're sure it's all clean, change all your passwords and backup. Do not store the backup locally.
Additional answer, maybe it may be helpful for you:
Your question:
Try Eyesite extension. It takes a snapshot of your J! site directory tree and later, if there is any change, it e-mails you until you reconcile the changes. (How often, it depends on you – you set schedule of checks using
cron
.) This way you can receive early warning, especially on sites like yours, where there is minimum of changes over long period of time.If you run your own server you can monitor for changes to your files in real-time with
incrond
. You will need to write a script to generate a list of directories to watch:If you do not block front end access to directories that should not be browsed you will get hacked period. The following directories should have front end access blocked:
You should also disable runnning of scripts in front end accessible directories:
You can then monitor the error logs with
incrond
for access to forbidden files & block attackers.Using the lists from I-Blocklist with
ipset
will also help. I block approximately120,000
abusive ip's in a fraction of a second. It is also useful to blocktor
nodes.If you use
ipset
you should place the blocking rules in the iptablesraw
table for better performance & not theinput
&output
tables as a lot of guides incorrectly show.Running Hiawatha Webserver as a webserver or reverse proxy will also stop a lot of attacks.
Your
/var/www
should be mountednoexec,nosuid
to prevent an attacker running a script they manage to upload.Use the
chroot
functionality inphp-fpm
to limit the files available to an attacker. To find the list of files needed fordns
resolution in thechroot
run:I'm curious what you've discovered? I have a Joomla 3 site that started after the 3.4.7 (I think .8 came out very shortly after .7 and I thought it might be a fix). What I learned here >>> http://forum.joomla.org/viewtopic.php?f=706&t=902833
Based on that information, I turned off SEF and the site works fine (well, not fine, because I want to use SEF).
I was concerned about hacked too, but the other posters on that thread seem to think it is a hosting issue (we're using BH).
Update: looks like someone posting after me found the solutions.
http://forum.joomla.org/viewtopic.php?f=706&t=902833#p3352730
This fixed my site. Cheers!