How to get rid of a virus.

webfly

New member
What happens if someone attached a virus or trojan horse to your webpage? How would you go about getting rid of it? Is it something you would contact your hosting service about?
 
Hi,

You can check your site pages code and remove virus code or reupload your site pages in your hosting account.
 
It usually happens because you had files/folders with permissions set too low "777" and someone injected code into your pages.

Look at the code for your pages and see if PHP code was inserted at the beginning of every file.

If you see "Base64", that is usually a dead giveaway. You'll need to change permissions on all of your files and folders and remove the injected code from all of your pages.

Only give write permissions to files and folders that absolutely require them.
 
Check all your file permissions and then after that check all the files in your account and make sure you don't see any funny looking coding like any php coding that wasn't there in the first place. Or if you have a back up of all your files re-upload it and the injection should be gone.
 
I had problems with virus Antivirus 2009 half a year ago. All my sites were infected and hosting company claimed it was my fault. But eventually they stop arguing with me because virus came from them.
 
Check the rights of your folders, your local Files and re-upload the site. Providers can never be 100% sure where Viruses are coming from.
 
Contact your hosting provider's support department about the issue - they should be able to remove it for you
 
Antivirus softwares can remove most of the popular viruses. Just scan your files and reupload. that is the easiest solution. Or contact your host's support.
 
Thanks for all the responses. I looked in my file manager and found some unknown files so I deleted them and it seems to be okay. I'll check with my host and see if I need to change my password or my permissions or both. Thanks again.
 
Check your file permissions and if you think you know what is infected just open the page's code and remove the virus code.

If you don't know what you are doing ask for help by your hosting provider. It's not their responsibility but maybe they'll help
 
Have your host verify the virus is actually on your site and not an ad. They should also be able to remove it for you if you pay for managed service. Also take measures to ensure your local machine is not infected and being used to infect your site(s).
 
What happens if someone attached a virus or trojan horse to your webpage? How would you go about getting rid of it? Is it something you would contact your hosting service about?

I think you should contact your hosting service about it... by the way how do you know your site or blog is affected by virus?
 
The only time I have had a problem was like was already mentioned-it was an ad script that was rotating through external ads that were not hosted on my pages. The ads were all infected, so I simply disabled the script and it was all ok.
 
Also make sure your apache binary is not infected. We found this clever exploit a while back on an unmanaged Linux server. You can try `grep test_header_filter /usr/local/sbin/httpd` to identify an exploited httpd if you have root access.
 
Top