Thread View: news.software.nntp
11 messages
11 total messages
Started by Christopher Sedore
Mon, 25 Aug 1997 00:00
posting and spam filtering
Author: Christopher Sedore
Date: Mon, 25 Aug 1997 00:00
Date: Mon, 25 Aug 1997 00:00
26 lines
1722 bytes
1722 bytes
I'm wondering if anyone has thought to write a perl or TCL script to do spam filtering on posts. I know about the nnrpd mods, but I'm hoping for something that can be cross-platform, and used (more or less) universally by admins. In the case of INN, nnrpd would give posts to this script, and the script would process them, then feed them to INN. In my case, my reader code would just hand the post to the script, and after the script finished with it, it could feed it back. Given the flexibility of perl (or TCL), you could even just feed it to the server via IHAVE if desired, which would make it completely software independent. Maybe a queue directory in a file per article scheme of some sort for handoff... If we get usenet2 going as proposed (with gateway interconnects), we're going to need software that can filter posts running on each server. The simplest way to do this would be to use a scripting language, and coming up with a slick auto-update methodology so that improvements can be broadcast (with appropriate authentication, of course) so that everyone gets the benefits of labors in the spam killing arena. -Chris
Re: posting and spam filtering
Author: Jeff Garzik
Date: Mon, 25 Aug 1997 00:00
Date: Mon, 25 Aug 1997 00:00
43 lines
1830 bytes
1830 bytes
(cc'd to author) Christopher Sedore <cmsedore@maxwell.syr.edu> wrote: >I'm wondering if anyone has thought to write a perl or TCL script to do >spam filtering on posts. I know about the nnrpd mods, but I'm hoping >for something that can be cross-platform, and used (more or less) >universally by admins. INN's stock Perl filter works like this: nnrpd receives post calls internal (C) routines to check article calls external Perl function in filter_nnrpd.pl connects to localhost sends post to server as peer server opens peer news cxn receives article from localhost calls internal (C) routines to check article calls external Perl function in filter_innd.pl INN's Perl filter is very cross-platform, something intrinsic to Perl itself. There are no INN-specific calls or methods of usage in the article filtering that could not transparently be moved over to NNTPRelay or something else. INN simply calls Perl routine filter_art, which provides an associative array including the important article headers. Very portable methodology. Jeff -- "The algorithm to do that is extremely nasty. You might want to mug someone with it." -- M. Devine, Computer Science 340
Re: posting and spam filtering
Author: Forrest J. Cavalier III
Date: Mon, 25 Aug 1997 00:00
Date: Mon, 25 Aug 1997 00:00
18 lines
1169 bytes
1169 bytes
In article <4E86915F977FD0119BCD08002BE28C4B040E88@exchange.maxwell.syr.edu>, cmsedore@maxwell.syr.edu wrote... [snip] >If we get usenet2 going as proposed (with gateway interconnects), we're >going to need software that can filter posts running on each server. >The simplest way to do this would be to use a scripting language, and >coming up with a slick auto-update methodology so that improvements can >be broadcast (with appropriate authentication, of course) so that >everyone gets the benefits of labors in the spam killing arena. > Java meets INN. Film at 11. Forrest
Re: posting and spam filtering
Author: Ron Echeverri
Date: Mon, 25 Aug 1997 00:00
Date: Mon, 25 Aug 1997 00:00
20 lines
1485 bytes
1485 bytes
In article <87yb5piyjt.fsf@erlenstar.demon.co.uk>, Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote: >While diddling in nnrpd (whomping up the stuff that Jeremy recently >posted to allow the nnrpd perl filter more options) I did notice an >oddity: the perl filter is never run if the article is mailed to a >moderator. Is this wise? I'm not sure; no moderator worth its salt would approve a spam submitted to them, but since there are several robomoderated groups out there, many of which do not always recognize spam and drop it, it might be best to take a closer look at nnrpd. rone -- Ron Echeverri <URL:http://www.ennui.org/~rone/> <rone@best.net> Systems/Usenet Administration "This is _my_ ISP, _i_ do the Best Internet Communications, Inc. ass-kicking around here!" -rpwhite
Re: posting and spam filtering
Author: Christopher Sedore
Date: Mon, 25 Aug 1997 00:00
Date: Mon, 25 Aug 1997 00:00
69 lines
3682 bytes
3682 bytes
Jeremy wrote: > > Christopher Sedore <cmsedore@maxwell.syr.edu> wrote: > > >I know that you can work around this, but I'd like to be able to do > >these things: > > > > 1. baseline article posting rates, and change behaviour when > >rates dramatically exceed the baseline > > The Perl filter could do this; with Andrew's patch I recently > posted, it would also have access to the authinfo username if > used. There's no reason the filter can't save state information > even from one instance to the next. It's doubtful that one > server's users are posting quickly enough that a brief exclusive > lock on a file would make any difference -- and if that is > happening, it's probably because someone is trying to spam. > > > 2. set "suspicious" posts aside, to see if more like them are > >coming and perhaps to send them to a more complex filter (and then > >deciding a little later what to do with them) > > 3. be able to hold "really suspicious" posts for potential > >operator intervention or other system based action > > That same patch adds this ability as well. You can return "SPOOL" > to have the posts saved for manual inpection. With that code, > you're on your own after that, but additional tools could be > created for examining the suspect posts if there are that many > of them. > > > 4. sign posts with an MD5, pgp, or pgp-like system > > This would require write access to the headers, which I've already > discussed briefly with Andrew, and he tells me it's non-trivial. > It could be done from within the nnrpd source, of course, which > wouldn't be nearly as flexible. > > > 5. log post tracing info for some or all posts > > That's certainly possible, even without the patch. > > >In the case of INN, it seems that you'd want to pull this out > >anyway--some of this work may be time consuming, and you'll tie up > >all of INN while you're scanning for spam. > > If you're scanning local posts, you aren't involving innd. Each > connections uses its own nnrpd process. I was going by Jeff's description of the process. As I apply a little more thought now, I guess he was referring to the "regular" spam filtering perl script in INN as opposed to something new-post specific. I still wonder if it wouldn't be simpler to have nnrpd queue posts into files and then let a single process parse through them. You could write nnrpd's context info into the head end of the file, and the post afterward. If you wrote a nice core of routines for reading and writing the article, you could do anything you wanted (including rewriting the header), without worrying about either nnrpd or inn. You'd also avoid the whole problem of keeping state synchronized across multiple nnrpd's. I'll probably implement at least a skelaton of this in TCL for my own reader code. -Chris
Re: posting and spam filtering
Author: Mark Hittinger
Date: Mon, 25 Aug 1997 00:00
Date: Mon, 25 Aug 1997 00:00
28 lines
1772 bytes
1772 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> writes: >While diddling in nnrpd (whomping up the stuff that Jeremy recently >posted to allow the nnrpd perl filter more options) I did notice an >oddity: the perl filter is never run if the article is mailed to a >moderator. Is this wise? We do need to pull back and reconsider this. Here we've hacked rnews instead and we wind up with a lot of spam trying to go to uunet or clarinet. Spammers start at 3b and wander down into clari.*. All of a sudden a bunch of sendmails fire up. Spammers don't realize (or care) if the group is moderated - they are going to try to post to them. The latest batch of "more is better" spammers that flood groups sometimes create a problem here with resource consumption. A bunch of sendmails we'd rather not fire up :-) Their posts generally go to /dev/null but we missed the moderated case. We will be migrating our traps out of rnews and further up into nnrpd in order to handle this annoyance :-) Regards, Mark Hittinger Netcom/Dallas bugs@freebsd.netcom.com
Re: posting and spam filtering
Author: Mark Hittinger
Date: Mon, 25 Aug 1997 00:00
Date: Mon, 25 Aug 1997 00:00
38 lines
2578 bytes
2578 bytes
Christopher Sedore <cmsedore@maxwell.syr.edu> writes: >I still wonder if it wouldn't be simpler to have nnrpd queue posts into >files and then let a single process parse through them. You could write >nnrpd's context info into the head end of the file, and the post >afterward. If you wrote a nice core of routines for reading and writing >the article, you could do anything you wanted (including rewriting the >header), without worrying about either nnrpd or inn. You'd also avoid >the whole problem of keeping state synchronized across multiple nnrpd's. We queue posts here and check them later in rnews. It generally works ok untill you get a couple of "3b to znet.zzzz" spammers that drop 22k articles into the rnews spool over an hour. The side effect is that ordinary user posts get delayed significantly while the robot goes through all of it. We've added a tweak that recognizes how many posts a particular user has made and attempts to drop his stuff into another directory - but - it may be better (now that we've played with things a bit) to move the trap into nnrpd and have nnrpd eat the posts instead. This improves the posting speed of the ordinary users - which is a goal. I've also been toying with the idea of a SIGUSR1 activated mode for nnrpd that makes it go into a "sure sure, whatever, bit bucket mode" for an nnrpd that is connected to a spammer. We have guys that will get on and pump articles in all weekend for the same group! Very competitive players - it would be nice to tell nnrpd to go into a dumb mode where it kept the spammer's sekretmegapost ware happy but consumed minimal resources in the process. :-) Regards, Mark Hittinger Netcom/Dallas bugs@freebsd.netcom.com
Re: posting and spam filtering
Author: Andrew Gierth
Date: Tue, 26 Aug 1997 00:00
Date: Tue, 26 Aug 1997 00:00
26 lines
1722 bytes
1722 bytes
>>>>> "Jeff" == Jeff Garzik <jgarzik@pobox.com> writes: Jeff> INN's stock Perl filter works like this: Jeff> nnrpd receives post Jeff> calls internal (C) routines to check article Jeff> calls external Perl function in filter_nnrpd.pl Jeff> connects to localhost Jeff> sends post to server as peer While diddling in nnrpd (whomping up the stuff that Jeremy recently posted to allow the nnrpd perl filter more options) I did notice an oddity: the perl filter is never run if the article is mailed to a moderator. Is this wise? Something else that Jeremy has asked me about, but that I haven't got around to hacking on yet, is the possibility of having the nnrpd perl filter add to or modify the headers. This requires more fiddling than the mods I've done so far, which is why I haven't tackled it. Any opinions on how useful this would be? -- Andrew.
Re: posting and spam filtering
Author: Jeremy
Date: Tue, 26 Aug 1997 00:00
Date: Tue, 26 Aug 1997 00:00
27 lines
1731 bytes
1731 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote:
>
>While diddling in nnrpd (whomping up the stuff that Jeremy recently
>posted to allow the nnrpd perl filter more options) I did notice an
>oddity: the perl filter is never run if the article is mailed to a
>moderator. Is this wise?
No, not at all. And, if I'm reading correctly (which I may not
be) it looks like moderated groups skip pretty much all of the other
checks as well. That should be changed. Can you just move that
bit of code down further?
>Something else that Jeremy has asked me about, but that I haven't
>got around to hacking on yet, is the possibility of having the nnrpd
>perl filter add to or modify the headers. This requires more fiddling
>than the mods I've done so far, which is why I haven't tackled it.
>Any opinions on how useful this would be?
The use I see for that is allowing admins to add headers, tracing
information for example, easily.
--
Jeremy | jeremy@exit109.com
"Bunch of savages in this town!" --Dante ("Clerks")
Re: posting and spam filtering
Author: Jeremy
Date: Tue, 26 Aug 1997 00:00
Date: Tue, 26 Aug 1997 00:00
52 lines
2755 bytes
2755 bytes
Christopher Sedore <cmsedore@maxwell.syr.edu> wrote: >I know that you can work around this, but I'd like to be able to do >these things: > > 1. baseline article posting rates, and change behaviour when >rates dramatically exceed the baseline The Perl filter could do this; with Andrew's patch I recently posted, it would also have access to the authinfo username if used. There's no reason the filter can't save state information even from one instance to the next. It's doubtful that one server's users are posting quickly enough that a brief exclusive lock on a file would make any difference -- and if that is happening, it's probably because someone is trying to spam. > 2. set "suspicious" posts aside, to see if more like them are >coming and perhaps to send them to a more complex filter (and then >deciding a little later what to do with them) > 3. be able to hold "really suspicious" posts for potential >operator intervention or other system based action That same patch adds this ability as well. You can return "SPOOL" to have the posts saved for manual inpection. With that code, you're on your own after that, but additional tools could be created for examining the suspect posts if there are that many of them. > 4. sign posts with an MD5, pgp, or pgp-like system This would require write access to the headers, which I've already discussed briefly with Andrew, and he tells me it's non-trivial. It could be done from within the nnrpd source, of course, which wouldn't be nearly as flexible. > 5. log post tracing info for some or all posts That's certainly possible, even without the patch. >In the case of INN, it seems that you'd want to pull this out >anyway--some of this work may be time consuming, and you'll tie up all >of INN while you're scanning for spam. If you're scanning local posts, you aren't involving innd. Each connections uses its own nnrpd process. -- Jeremy | jeremy@exit109.com "Okay, at this point you're abusing sarcasm." --Buffy
Re: posting and spam filtering
Author: Jeremy
Date: Wed, 27 Aug 1997 00:00
Date: Wed, 27 Aug 1997 00:00
20 lines
1310 bytes
1310 bytes
Joe Greco <jgreco@ns.sol.net> wrote: >:Also, it will make the spammers a lot happier, since their throughput >:*rises* quite dramatically :-). >: >:"This ISP is great, I can post 50,000 articles per hour". > >We've come full circle; that was the point of my original nnrpd spam >dumping patch. And the spammers love it too. :) Nailed another one this week (I'm running Andrew's version for more flexibility). They start dumping them in, and they think they've hit the Mother Lode. -- Jeremy | jeremy@exit109.com "Do you think a princess, and a guy like me..." --Han Solo
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads