Katana Bot trawling one of my pages

Hi All,

Just looking for some help on dealing with a Katana Bot emanating from New Jersey that is trawling a dynamic page I have and which is also setup to send the admin an email if any one clicks on any of the treatment buttons.

We like to try and see what area the person clicking the button is from so the form grabs their ip address and runs it through an ip address finder before sending the results to the admin.

Am I best just blocking the email using a filter on the sending name or is there a more elaborate way?

Last night I got over 200 emails as the bot went through all possible pages!

Here is what the emails look like:

katana) RLIKE (SELECT (CASE WHEN (3707=9408) THEN 0x6b6174616e61 ELSE 0x28 END)) AND (4565 BETWEEN 4565 AND 4565 link was clicked in treatment page.

IP: 159.203.180.36

Visit: https://api.hackertarget.com/ipgeo/?q=159.203.180.36

Device: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

Time: 2025-02-20T04:41:12

What server type are you using? If you're on Apache you could try adding a rule to your .htaccess file to deny the IP address.

You would need to add the following to the file:

Deny from 159.203.180.36

You could also register for Cloudflare and use their Free Tier to block the requests.

Do you have a rule to deny access to admin area set up in robots.txt?

Are you using a captcha in your form? Blocking an individual IP address is just masking the problem, this is a fundamental security architecture problem. Imagine you get hit with a DoS attack and they flood your page with many requests per second, you'll receive tons of e-mails and then your e-mails will be marked as spam and so on...

1 Like

Thanks to both of you and your brilliant suggestions, have implemented them both and no more emails from Katana so far!

Thank you

I think it is just a bot which has latched on to a dynamic page which a couple of hundred possibilities and so the same amount of submit buttons. I have updated the robots.txt and the htaccess and for now the emails have stopped and the usual requests are getting through

It's not always going to catch all bots, but a simple action you can take is to add a hidden input field on the form, so normal users can't put a value in it, then check the form submission in the server action with a condition, if the field has a value, do not continue the steps to update your database or send an email.

1 Like

Thank you for that idea, I have something similar on my contact pages to stop spammers and spam bots, will setup some on this page too I think!