[help] Malware code keep re-appearing and infecting .htaccess and other files

maria002

Registered Member
Joined
Apr 30, 2018
Messages
92
Reaction score
45
Hello everyone,

When I met with this problem previously, I was able to fix it but this time, I am not able to do it on my own. I hope someone will advise me to restore my website.

This is very strange. I have shared web hosting with Hostgator. I have been using HostGator for a very long time and never had this problem but since this account had an outdated PHP version that couldn't be upgraded to the latest one as they were running low-end hardware, they offered me to move my account to CentOS6.

I was skeptical but had no choice so I gave go ahead.

But that's the day since then I started to face the problem.

I have about 12 websites hosted on hostgator and all of them are now infected with malware.

Every directory of these websites has a .htaccess file that keeps reappearing even after I delete them. Not just the .htaccess file, there are several other files that keep reappearing.

I replaced all the infected files with fresh WordPress files that I have downloaded from the internet but again after a few hours, they get infected.

I have replaced core files as well, scanned wp-content, and made sure there is no malicious code but when I uploaded it on the server and checked after a few hours, the .htaccess file with malicious code appears again and all the directories have infected files.

I don't see any solution and I am worried. I have written so much content on these websites and I can't leave them and start new.

Please help me to fix this problem. Hostgator people are offering me to buy their Sitelock service that I can't afford at the moment due to financial problems.
PLEASE HELP ME!
 
Hello everyone,

When I met with this problem previously, I was able to fix it but this time, I am not able to do it on my own. I hope someone will advise me to restore my website.

This is very strange. I have shared web hosting with Hostgator. I have been using HostGator for a very long time and never had this problem but since this account had an outdated PHP version that couldn't be upgraded to the latest one as they were running low-end hardware, they offered me to move my account to CentOS6.

I was skeptical but had no choice so I gave go ahead.

But that's the day since then I started to face the problem.

I have about 12 websites hosted on hostgator and all of them are now infected with malware.

Every directory of these websites has a .htaccess file that keeps reappearing even after I delete them. Not just the .htaccess file, there are several other files that keep reappearing.

I replaced all the infected files with fresh WordPress files that I have downloaded from the internet but again after a few hours, they get infected.

I have replaced core files as well, scanned wp-content, and made sure there is no malicious code but when I uploaded it on the server and checked after a few hours, the .htaccess file with malicious code appears again and all the directories have infected files.

I don't see any solution and I am worried. I have written so much content on these websites and I can't leave them and start new.

Please help me to fix this problem. Hostgator people are offering me to buy their Sitelock service that I can't afford at the moment due to financial problems.
PLEASE HELP ME!
best solution: get a vps and run everything yourself.
hostgator has been crap for years
 
But how to handle the current situation. The pages are multiplying? how to stop them, how to get them to remove from Google?
 
Are these sites Wordpress?

I had the same issue for about 20 websites. I had to pay around 200USD to get a guy from Fiverr to fix it.

I swear I was about to lose my mind and I was pulling hair everyday until the shit was sorted.
 
Hello everyone,

When I met with this problem previously, I was able to fix it but this time, I am not able to do it on my own. I hope someone will advise me to restore my website.

This is very strange. I have shared web hosting with Hostgator. I have been using HostGator for a very long time and never had this problem but since this account had an outdated PHP version that couldn't be upgraded to the latest one as they were running low-end hardware, they offered me to move my account to CentOS6.

I was skeptical but had no choice so I gave go ahead.

But that's the day since then I started to face the problem.

I have about 12 websites hosted on hostgator and all of them are now infected with malware.

Every directory of these websites has a .htaccess file that keeps reappearing even after I delete them. Not just the .htaccess file, there are several other files that keep reappearing.

I replaced all the infected files with fresh WordPress files that I have downloaded from the internet but again after a few hours, they get infected.

I have replaced core files as well, scanned wp-content, and made sure there is no malicious code but when I uploaded it on the server and checked after a few hours, the .htaccess file with malicious code appears again and all the directories have infected files.

I don't see any solution and I am worried. I have written so much content on these websites and I can't leave them and start new.

Please help me to fix this problem. Hostgator people are offering me to buy their Sitelock service that I can't afford at the moment due to financial problems.
PLEASE HELP ME!

Make sure that you revert a backup of your website (scan it first with an anti malware tool such as WordFence or Malcare).
 
Make sure that you revert a backup of your website (scan it first with an anti malware tool such as WordFence or Malcare).
Already done it several times.

I replaced core files as well.
Scanned the Wp-content folder for malicious injections, and replaced the suspicious file with freshly downloaded WordPress package.
but they keep reappearing over and again.

Every time I remove the files and malicious code, they are reappearing.

I have been using Hostgator for 7+ years. But facing this problem since they migrated my account to a new OS because the earlier version didn't have the hardware to update PHP to the latest version because I had been pushing them to upgrade PHP. They were using a very old and outdated version that necessarily had to update to the latest version if I want to install Rank Math Plugin.

Now all my website's Japanese links are indexed in Google and they are large in number. I have been putting in hours of work every day submitting removal requests from GSC.

I don't know what to do. I also checked if anyone had accessed my account and started a cron job as a malicious file (.htaccess and index.php) keep reappearing but there is no cron job.

I learned from a youtube video that someone (a hacker) can stay logged on to a hosting account using FTP and run a cron job on their pc that keeps uploading the malicious file again and again. I could relate it because I wasn't able to change the FTP password and had to take customer support's help to change the password.

Any valuable suggestion is highly welcomed.
 
Back
Top