Website hacked redircted to Russian and Pharma sites
-
Hi Guys
I run my own VM which was recently hacked. The hack was pretty basic. Just 404 redirect in the .htaccess file to Russian and pharmaceutical websites. The problem was, no matter what I did to the .htaccess file, within 24 hours it was redirecting to some other spurious site.
I’ve got ClamAV and ReFX Maldetect monitoring the folders within /var/www/html, but they were coming up clean.
Turns out, they aren’t very good at detecting trojans, because I downloaded my websites to my desktop and ran them through Avast and t picked up all sorts of nasties.
Also, these nasties won’t be automatically cleaned, it will simply delete the files, which are essential for your WordPress install to work.
So, if you find that your site has been hacked, you’l need to do the following:
1. Change all your passwords. If you have SSH access, then ditch passwords altogether and use authenticated keys, for better security. For MAXIMUM security, install OpenVPN, then edit your /etc/apache2/apache2.conf file to only allow access to your wp-admin folder from your server IP address. You then VPN into your server to access the login. (Sounds more complicated than it actually is)
2. Log into your WordPress backend and make a note of all the plugins you currently have.
3. You’re already infected, so you need to clean up your files. The best way would be to backup your website folder, then ditch all the files and start a fresh.
4. Once you’ve extracted the latest wordpress folder into your website folder on the server, copy the wp-config.php file back in. This will reconnect you to your database, which brings all your posts and pages back to life.
5. Log into your website using your usual username and password. You’ll now need to reinstall all the plugins you noted earlier.
6. Download the latest version of your theme and either extract the files directly into your wp-content/themes folder or use the Themes installer on the WordPress backend
7. Make sure you scan the wp-content/uploads folder for viruses, then upload this back onto your server. This will bring all the images you’ve uploaded in the past back to life.
8. Get the Buletproof Security plugin to secure your site from the most common attacks.
If you perform the steps above, you should get your site back up and running very quickly and more importantly, stop it from getting hacked in the future.
[moderated]
- The topic ‘Website hacked redircted to Russian and Pharma sites’ is closed to new replies.