Forum Moderators: phranque

Message Too Old, No Replies

About virus attack, help!

My sites have been attacked

         

bubble

12:05 pm on May 7, 2009 (gmt 0)

10+ Year Member



Recently, I noticed two of my web sites are attacked by some funny codes on all of html pages and index.php, index.html pages. When visit the sites,an virus alert window pop out, something called "Exploit.Js.Agent.agc..."
Trogent horse virus.

And one of my friend's site which is hosting with the same host company is hacked as well.

I conteact one of hosting server, they provided facility to allow me to restore all contents back to one of their backup points, but another host company only reply me said "The only way that your website can be attacked is if your scripting and permissions have not been secured. This is not an attack on the server but your contents specifically...All we can recommend is to delete all the contents from the server and then secure your scripting before uploading...this issue is not related to any kind of security issue related to the hosting services we provide."

Is that not server's security problem at all? How did virus access/modefy my webpages? And how to script and set permission in a secure way?

I tried via ftp set CHMOD public read only on my web folder, but it will not let me do it, it alway goes back to 707, what number is best setting anyway?

Somebody geek please help!
Thank you!

Karma

1:42 pm on May 7, 2009 (gmt 0)

10+ Year Member



If you have two sites that have both been 'hacked' then I doubt it is anything to do with your host.

I suggest you update or replace any scripts that are running on both sites.

rocknbil

3:43 pm on May 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How did virus access/modefy my webpages?

Don't be as concerned about your server permissions. If you don't know what you are doing, you can do more harm than good, leave them at the defaults.

I say this because what your ISP is telling you, really, is your site is getting hacked because whatever scripts you are running are vulnerable to injection of some sort.

What is the nature of your web site scripts, did you write them yourself or are they open source software?

If it's open source, search Google for [software name] vulnerabilities, keep it updated and patched.

If you wrote them yourself, or had someone do it for you and any variables are allowed to pass through unfiltered, you are vulnerable to both cross site scripting and, if you use a database, mysql injection.

Example:

<input type="text" name="searchterm">

echo "$_POST['searchterm']";

I could send data in the field searchterm that could inject a malicious script, add data to your database, tons of things.

tabish

8:22 am on May 8, 2009 (gmt 0)

10+ Year Member



Hi,

This has nothing to do with your host or any of your file permissions.

It is a definitely case of your "Personal Computer" hacked. The PC from which you used to do the FTP is hacked by the virus and now the Virus is uploading files with it's own embedded code.

Lately this virus has attacked on so many PCs and websites and I have resolved more than 50 issues in the last 2 months.

Now, what you need to do is:

1) First thing, VERY Important, Change all the FTP passwords.
2) Do NOT save password in your FTP program. Put your password each time when you connect using FTP.
3) Download All the files and folders of your website and first search for the index files. There you will see <iframe> coding.. remove that. It also puts echo"<iframe ...." in PHP.. so search for that also.
4) These Iframe codes would have been embedded into <Body> Tags too .. remove that

Let me know if I can do anything more for you.

Regards

bubble

9:41 am on May 11, 2009 (gmt 0)

10+ Year Member



Thanks very much for everybody!
I agree with Tabish, I searched internet for this problem, and somebody mentioned same thing as you said,"my PC FTP has been attacked", so I did as what you suggested too, removed Iframe worms from each files one by one manually. I was searching is there an easy way to remove all these worms all over the index/php pages?