block Wordpress spambot by user agent

All about creating websites!
Post Reply
User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

block Wordpress spambot by user agent

Post by bad_brain »

there's some peak in bot activity on the net, at least when I look at the logs of my servers.

a pretty annoying kind does Wordpress registrations, and it seems to be able to evade nocaptacha recaptcha (the kind where you have to check "I'm not a bot" first and then you have to mark cars or traffic signs).

what they all seem to have in common is the user agent (UA):
Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
it's pretty safe to block that UA because a 6-7 year old FF version...seriously? :lol:

in .htaccess:

Code: Select all

RewriteEngine on
 RewriteCond %{HTTP_USER_AGENT} Firefox/7\.0\.1 [NC]
RewriteRule !^fuckyou\.txt$ - [F]
Image

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Re: block Wordpress spambot by user agent

Post by Gogeta70 »

I love it... "fuckyou.txt" ha! =D>
¯\_(ツ)_/¯ It works on my machine...

User avatar
ph0bYx
Staff Member
Staff Member
Posts: 2039
Joined: 22 Sep 2008, 16:00
15
Contact:

Re: block Wordpress spambot by user agent

Post by ph0bYx »

Lisa FTW :)

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: block Wordpress spambot by user agent

Post by bad_brain »

got this in the back of my head since some days already....there must be ways to abuse those bots for fun & profit. had no time to really think about it or to create/analyze a tcpdump of their requests, but there are many possible options, I mean, you can forward their requests with mod rewrite to pretty much anything... :-k
Image

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: block Wordpress spambot by user agent

Post by ayu »

bad_brain wrote:got this in the back of my head since some days already....there must be ways to abuse those bots for fun & profit. had no time to really think about it or to create/analyze a tcpdump of their requests, but there are many possible options, I mean, you can forward their requests with mod rewrite to pretty much anything... :-k
Would be interesting to figure out if they will try to solve "every" captcha presented to them.
Then you could just put it in a captcha loop :lol:
"The best place to hide a tree, is in a forest"

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Re: block Wordpress spambot by user agent

Post by Gogeta70 »

Do they process javascript? Have them mine bitcoin!
¯\_(ツ)_/¯ It works on my machine...

User avatar
ph0bYx
Staff Member
Staff Member
Posts: 2039
Joined: 22 Sep 2008, 16:00
15
Contact:

Re: block Wordpress spambot by user agent

Post by ph0bYx »

Gogeta70 wrote:Do they process javascript? Have them mine bitcoin!
My thoughts exactly! :D

Post Reply