My website has been infected by a malware that spamming my traffic. This is what was happened to my website:
- Traffic from France with Agent named contains
ahrefs.com
- Bandwidth is up to 1.7 GB a day
- Some weird folders have been appeared automatically like:
wp-content/uploads/.w3-cache
- Malware code has been added to
wp-config.php
,wp-content/themes/current-themes/index.php
Actions
Follow these steps to remove them from your website.
Block traffic from Ahrefs.com
I’m using CloudFlare for my website. So it is easily to block traffic with User-Agent contains ahrefs.com
Detect and remove all infected files
Use terminal/ssh, login to your website’s root. Then you can find infected files using grep
command.
grep -r eval.*base64_decode
A list of files should be appeared. You can delete the infected files then.