[Plugin] Antispam DNS trackback. The end solution
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions -> Fighting spam!
View previous topic :: View next topic  
Author Message
Austriaco
Hooked :)
Hooked :)

Joined: 03 Feb 2005
Posts: 335
Reputation: 182.7Reputation: 182.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 11

PostPosted: Mon Jul 16, 2007 12:57    Post subject: [Plugin] Antispam DNS trackback. The end solution Reply with quote

Trackback spam is really a pain in the, you know where. Sometime ago I proposed a solution to the problem of trackback spam. The rationale is here: http://forums.b2evolution.net/...hp?t=10584

Since nobody replied to that message and I thought I have learned one thing or two about B2evolution, I decided to write a very small plugin. The name is "DNS Anti-spam Trackback" and I have it deployed on my b2evo blog for a week now with total success.

What does it do? It checks th IP address of the host sending a trackback and compares it with the IP address of the host pointed to by the URL sent in the trackback. If these two IP addresses are differents, then the odds are very high this is a trackback spam.

In fact, the only case I can think of that can produce false positives are trackbacks sent from Haloscan. Since I have never received any trackback from Haloscan I didn't worry about that case, but I think it would not e difficult to implement an exception rule to take care of it.

The downside of this are sites which are very heavily hit by trackback spam, they could end up overloading the DNS server, because a query is sent for every trackaback received. I guess some form of caching or something like that could also be implemented, but that's far far away from my capabilities. The idea is there though.

Currently I'm running B2evo 1.10 and as I said before I haven't received trackback spam in one week, when normaly I would receive between 5 and 15 trackbacks per day.

Caveat Emptor, I cannot assure that this plugin does what it claims or that it won't burn your server after 10 minutes. It hasn't mine, but as they say your mileage may vary.

How to use: Unzip the attached ZIP file inside your plugins/ directory and later activate the plugin from the backoffice.

Comments, improvements and whatever are welcome.

Enjoy.
Back to top
View user's profile Send private message Visit poster's website
balupton
1.8 & 1.9 expert

Joined: 22 Jun 2005
Posts: 2087
Reputation: 138 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 24

PostPosted: Tue Jul 17, 2007 12:14    Post subject: Reply with quote

Theoretically that sounds like a pretty neat idea. I'll give it a shot when I get my blog back up.
_________________
Products & Services:
ShareHouseHQ - Shared expenses made easy., Web 2.0 Architect, jQuery Lightbox.
- The best user reports problems, don't be sorry, be proud! Smile
Back to top
View user's profile Send private message Visit poster's website
Austriaco
Hooked :)
Hooked :)

Joined: 03 Feb 2005
Posts: 335
Reputation: 182.7Reputation: 182.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 11

PostPosted: Tue Jul 17, 2007 12:16    Post subject: Reply with quote

Great!

I have 10 days now without receiving any trackback spam (until the spamers [hopefully not] read this thread and figure out a way around)

_________________
Linux y otras cosas más
No more trackback Spam: DNS Trackback Anti-Spam Plugin
Let your readers share! ShareThis Plugin
Back to top
View user's profile Send private message Visit poster's website
balupton
1.8 & 1.9 expert

Joined: 22 Jun 2005
Posts: 2087
Reputation: 138 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 24

PostPosted: Tue Jul 17, 2007 12:25    Post subject: Reply with quote

But are you sure that all legitimate ones are getting through? Like i'm trying to think of a scenario that would break it, but I can't think of any! Probabally only if the trackbacker is playing silly buggers, in which case dosn't really matter. Oh what about if say blogger.com does it, as they have hosts all over the world (i'm guessing), maybe the ip addresses would be different? But if you check the ips of the domains the same way (by doing a request), instead of just $_SERVER['whatever it was'] then it should be fine. Smile Good work.

Or maybe say for live spaces, they might host the blog on whatever server the user's country is. And maybe the site that posts it is different?

When I get my blog up, I'll go test all these theories.

_________________
Products & Services:
ShareHouseHQ - Shared expenses made easy., Web 2.0 Architect, jQuery Lightbox.
- The best user reports problems, don't be sorry, be proud! Smile
Back to top
View user's profile Send private message Visit poster's website
Austriaco
Hooked :)
Hooked :)

Joined: 03 Feb 2005
Posts: 335
Reputation: 182.7Reputation: 182.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 11

PostPosted: Tue Jul 17, 2007 12:34    Post subject: Reply with quote

Haloscan is the only scenario I had thought but I never receive anything from that service.

At least my own trackabacks go through! :-) Since I'm not the most popular blogger on earth, I don't receive many legitimate trackbacks (almost none, in fact) and I don't have a way to test this. Maybe somebody here can send a couple of trackbacks to see how things works.

_________________
Linux y otras cosas más
No more trackback Spam: DNS Trackback Anti-Spam Plugin
Let your readers share! ShareThis Plugin
Back to top
View user's profile Send private message Visit poster's website
balupton
1.8 & 1.9 expert

Joined: 22 Jun 2005
Posts: 2087
Reputation: 138 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 24

PostPosted: Tue Jul 31, 2007 11:08    Post subject: Reply with quote

Hi I'm going to try it on my blog now, I get a lot of traffic, so it will be interesting to see Smile Will let you know how it goes Smile
- If you want to test it out on mine and your blog, I'm up for firing off test trackbacks / receiving them.


Edit: I've made a few changes to the plugin, cleaned things up. Was there a reason with it being opt-in rendering though?

Anyway I you can get my changed one here http://www.balupton.com/blogs/...plugin.zip

Hope you don't mind, and hope it helps Smile

_________________
Products & Services:
ShareHouseHQ - Shared expenses made easy., Web 2.0 Architect, jQuery Lightbox.
- The best user reports problems, don't be sorry, be proud! Smile
Back to top
View user's profile Send private message Visit poster's website
cslepage
Hooked :)
Hooked :)

Joined: 21 Apr 2006
Posts: 363
Reputation: 73.5Reputation: 73.5Reputation: 73.5Reputation: 73.5Reputation: 73.5Reputation: 73.5Reputation: 73.5 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 1

PostPosted: Wed Aug 01, 2007 5:10    Post subject: Reply with quote

I've just installed it to a blog of mine that gets a small amount of traffic each day. The trackback spam only started when I upgrated to 1.10.

Balupton, does your change mean I don't have to do anything up install the plugin? Will it work for existing messages, or only for new ones?

_________________
Back to top
View user's profile Send private message Visit poster's website
Austriaco
Hooked :)
Hooked :)

Joined: 03 Feb 2005
Posts: 335
Reputation: 182.7Reputation: 182.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 11

PostPosted: Wed Aug 01, 2007 5:15    Post subject: Reply with quote

For new ones. It will try to block new trackbacks coming from hosts different than the refered host. As far as I can see, you can just upload the updated povided by balupton and things should keep working without any intervention on your part, but I haven't done it yet. YMMV.
_________________
Linux y otras cosas más
No more trackback Spam: DNS Trackback Anti-Spam Plugin
Let your readers share! ShareThis Plugin
Back to top
View user's profile Send private message Visit poster's website
balupton
1.8 & 1.9 expert

Joined: 22 Jun 2005
Posts: 2087
Reputation: 138 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 24

PostPosted: Thu Aug 02, 2007 1:02    Post subject: Reply with quote

Yeah my change only cleans up the code (if that), no feature changes or anything. Austriaco is the mastermind Smile

Austriaco, for the problems were it is a legit blog but using a different domain, maybe it could check the hostname against a known good hostname, so make a white list?

Oh btw, so far so good on my blog, not sure if any legit trackbacks have got through though... Mind throwing one at me sometime? http://www.balupton.com/blogs/...1&pb=1 (hope you like my little shoutout to your plugin, and should drive some traffic to it)

_________________
Products & Services:
ShareHouseHQ - Shared expenses made easy., Web 2.0 Architect, jQuery Lightbox.
- The best user reports problems, don't be sorry, be proud! Smile
Back to top
View user's profile Send private message Visit poster's website
jibberjab
Hooked :)
Hooked :)

Joined: 14 Feb 2005
Posts: 327
Reputation: 109.3 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 4

PostPosted: Fri Aug 03, 2007 9:52    Post subject: Reply with quote

One of the earlier posts states this will work for new posts but not for existing posts... Is it possible to go back and re-save existing posts once this plugin has been installed?

jj.

_________________
The Dark Sighed | Validate Your XHTML | Validate Your CSS | Get Firefox... Do it now. Now!!
Back to top
View user's profile Send private message Visit poster's website
¥åßßå
Blonde Bimbo

Joined: 07 Jan 2005
Posts: 6579
Reputation: 29.5Reputation: 29.5Reputation: 29.5 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 115

PostPosted: Fri Aug 03, 2007 10:01    Post subject: Reply with quote

The bit you read meant, "it'll work for any trackbacks that occur after the plugin is installed" even if they're on an old post Wink

¥

_________________
I may have opened the door but you entered of your own free will
normal life wrote:
yabba_hh: I think, I type, I read what I type, I think "fuck, what was I thinking when I typed that?!"
tuxnus: that's two more thoughts than I give you credit for
Back to top
View user's profile Send private message Visit poster's website
jibberjab
Hooked :)
Hooked :)

Joined: 14 Feb 2005
Posts: 327
Reputation: 109.3 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 4

PostPosted: Fri Aug 03, 2007 10:33    Post subject: Reply with quote

Ah, ok.... I really need to start getting more sleep. Smile

jj.

_________________
The Dark Sighed | Validate Your XHTML | Validate Your CSS | Get Firefox... Do it now. Now!!
Back to top
View user's profile Send private message Visit poster's website
¥åßßå
Blonde Bimbo

Joined: 07 Jan 2005
Posts: 6579
Reputation: 29.5Reputation: 29.5Reputation: 29.5 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 115

PostPosted: Fri Aug 03, 2007 10:37    Post subject: Reply with quote

Me too Wink

¥

_________________
I may have opened the door but you entered of your own free will
normal life wrote:
yabba_hh: I think, I type, I read what I type, I think "fuck, what was I thinking when I typed that?!"
tuxnus: that's two more thoughts than I give you credit for
Back to top
View user's profile Send private message Visit poster's website
Daniel
Hooked :)
Hooked :)

Joined: 09 Feb 2007
Posts: 215
Reputation: 54.4Reputation: 54.4Reputation: 54.4Reputation: 54.4Reputation: 54.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 1

PostPosted: Tue Aug 07, 2007 7:15    Post subject: Reply with quote

Ok... if I understood the description of this plugin correctly it´s not the same what I´ve seen yesterday by sending a trackback to a site without having the exact same URL linked in my post. My trackback was denied but after I saw my error, I added the source URL directly in my post and send the trackback again, and this time it works... Is the DNS plugin the same or is that what I wrote another possibility to increase spam trackbacks... Is there a b2evo plugin available what does what I have described?
_________________
Back to top
View user's profile Send private message Visit poster's website
Austriaco
Hooked :)
Hooked :)

Joined: 03 Feb 2005
Posts: 335
Reputation: 182.7Reputation: 182.7 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 11

PostPosted: Tue Aug 07, 2007 7:49    Post subject: Reply with quote

No, Daniel, it's not the same. This plugin will check that the IP addresses of the trackback sender and the trackback "referee" are the same. Let's say you receive a trackback pointing to www.domain.com and www.domain.com has IP address "X", but the trackback was sent from another machine, which has IP address "Y". If "X" != "Y" then the trackback will be rejected. (read the "rationale" for the plugin: http://forums.b2evolution.net/...hp?t=10584 maybe it will help to clarify he concept)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Fighting spam! All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
b2evolution Support Forum RSS Feed Forums powered by php Bulletin Board