I'm getting bored by all those muieblackcat's and similar scripts ran on web sites. Can I block an IP address (for example with iptables) automatically, like for a hour or so, as soon as it accesses example.com/muieblackcat?

This is on Linux, with Apache.


Consider tarpitting these requests instead.

HAProxy (and I assume other HTTP proxies) has the ability to identify 'malicious' scan hits and delay the response (thus temporarily slowing the attack script).

Blocking the response entirely will just have the attack script move along to its next target immediately.

  • That's a nice idea. HAProxy seems documented well too. I think I will use it! – Simon A. Eugster Dec 21 '11 at 7:55

You could, but that would make denial-of-service attacks trivial. All an attacker needs to do is access your site through the same proxy I'm using and hit one of those URLs and then I can't access your site. There are still entire cities that use a web proxy.

  • 1
    And then there are the users whose PCs are infected with vulnerability scanning malware. One infected PC on, say, a University intranet could cause a denial of service for the whole campus. – Phil Dec 19 '11 at 19:34
  • Thanks for the hint – this is a good point. Especially for well-known web sites. – Simon A. Eugster Dec 21 '11 at 7:47
  • Countries too, c.f. China – Tom O'Connor Dec 29 '11 at 9:38

See Fail2Ban, it can parse Apache log files too.


I would start by using a program to watch the log files; if a particular URL is accessed, it should show up in the Apache logs. You can use SEC to watch for this URL access.

When the URL access happens, then SEC can run an iptables command to block the IP address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.