Hacked site, how to block IPs by URL accessed
-
[Moved to How To & Troubleshooting. This has nothing to do with code hacks.]
Hello.
What happened
I have been hacked, I’m not really sure of how.
I got code with URLs injected into my header, footer and other places, as well as a few files with HTML and scripts, one of them called ctioVp.php. The site was extremely slowed down at times, and wouldn’t even work some other times.My host alerted me that my site was abusing of use of the server (it was the hack obviously) and blocked my site. After locating the codes and files and deleting everything, my site was back up.
What is happening now
With the site published again, I have installed the plugin Wordfence, which allows me to monitor live traffic.I have currently tens of incoming calls from different IPs from random countries in the world (India, Sri Lanka, USA, Australia, Italy, Spain, UK, China and so on) trying to access the URLs of the files that do not exist anymore. I have been manually blocking these IPs, and in an afternoon I blocked over 150.
Then I set a Wordfence filter to block (during 24h) any IP that gets over two 404 errors per minute. I did that overnight and in the morning I had alerts of 300 IPs blocked, and they keep comming. Some of these blocked IPs have tried accessing 60-80 times again.
What I’m looking for
I’m looking for a way of directly denying the attempt or blocking any IP that attempts to access any of the URLs of these deleted files. I don’t know if once the files are deleted, these attempts of attack affect in any way the site’s stability, but if I could avoid it, given that I know how they target, it would be perfect.Any thoughts?
- The topic ‘Hacked site, how to block IPs by URL accessed’ is closed to new replies.