Okay, after couple of day trying to figure it out which files are attacked I was able to locate the problem. The site's that very injected with this script are all Joomla! site's. There are two different ways how the script was injected. On is for Joomla! 1.0 and the other for 1.5.
Joomla! 1.0:
A line of code is added to your DB and in my case it was in "jos_mambots" table. the code looks something like this:
../../../../../../../hsphere/local/home/youraccount/yourdomain.com/ - and then the path that calls for a file that was added on your web server.
In some cases this code in your DB also calls for a script on a different server. I have even visited the sites who's domain I found in the database, and they look like sites that were also attached.
Files on your server can be any where. It can be and image file, third party extension, or Joomla! core file.
By removing this from your DB and deleting the file from your server (if it is located there) will fix the problem.
Joomla 1.5
This one is more complicated and I will recommend for you to ask the your host to restore your files from earlier date. I have downloaded the files locali and in BBEdit did a search for the following code:
It is injected at the end of the file and it calls for a Javascript located at this IP address (78.157.142.58)
I just searched for <?php if(!function_exists('tmp_l and was able to locate the files and to remove the code. After that everything worked great.
But this code spreads really fast. In few days one of my account had almost 500 files with this code - Crazy. In this case my host helped. They wrote a FIND and REPLACE script on the server and were able to remove all of the code.
I am not sure how they manage to do all this but this is very serious and you need to act right away. Make sure to check for permissions on your site. Added files have 444 permission.