## khop-sc-neighbors.cf v 201004122 ## Khopesh's syndication of SpamCop's top offenders and top offending networks. ## ## Spamassassin rules written by Adam Katz ## http://khopesh.com/Anti-spam ## khopesh on irc://irc.freenode.net/#spamassassin ## ## sa-update --gpgkey E8B493D6 --channel khop-bl.sa.khopesh.com ## ## These rules are Copyright 2001-2009 by Adam Katz ## Licensed under the Creative Commons Non-Commercial Share-alike License 2.0. ## The code that generated this output is GNU Affero General Public License v3. ## Source data (copyright Cisco subsidiary SpamCop.net) taken from links below. ## The author is receptive to relicensing requests for this and its generator. ## ## Frequent updates are needed for these rules, so they are marked 'nopublish' ## This keeps them from being automatically promoted to SpamAssassin proper ## from the testing system, which affirms their usefulness. You can check ## their efficiency at http://ruleqa.spamassassin.org/?rule=/KHOP_SC # http://spamcop.net/w3m?action=map;net=0;sort=spamcnt # Due to the massive block size, this rule only examines the last untrusted header KHOP_SC_CIDR8 X-Spam-Relays-Untrusted =~ /^[^\]]* (?:by|ip)=(?-xism:\b(?:9[24]|1?89)(?:\.[012]?\d{1,2}){3}\b) / describe KHOP_SC_CIDR8 Relay CIDR /8 is among worst in SpamCop tflags KHOP_SC_CIDR8 nopublish score KHOP_SC_CIDR8 0.1 0.01 0.1 0.01 # 12.3692/1.0099 spam/ham, 0.925 s/o @ 20100211 .2 .1 .3 .2 -> .1 .01 .1 .01 # 8.9412/1.1532 spam/ham, 0.886 s/o @ 20100325 # 9.4362/0.4074 spam/ham, 0.959 s/o @ 20100329 # 11.8281/0.4788 spam/ham, 0.961 s/o @ 20100401 # Due to the massive block size, this rule only examines untrusted relays header KHOP_SC_TOP_CIDR8 X-Spam-Relays-Untrusted =~ / (?:by|ip)=(?-xism:\b(?:1(?:22|90)|201|95)(?:\.[012]?\d{1,2}){3}\b) / describe KHOP_SC_TOP_CIDR8 Relay CIDR /8 leads SpamCop in worst /8s tflags KHOP_SC_TOP_CIDR8 nopublish score KHOP_SC_TOP_CIDR8 0.9 0.1 0.9 0.1 # 15.6795/0.1173 spam/ham, 0.993 s/o @ 20100211 .5 .4 .8 .6 -> .6 .5 .8 .5 # 11.0578/0.3614 spam/ham, 0.968 s/o @ 20100325 # 13.7809/0.4860 spam/ham, 0.966 s/o @ 20100329 .9 .1 .9 .1 masscheck promoted # 14.1773/0.4799 spam/ham, 0.967 s/o @ 20100401 # http://www.spamcop.net/w3m?action=map;net=bmaxcnt;mask=16777215;sort=spamcnt header KHOP_SC_CIDR16 Received =~ /(?-xism:\b(?:12(?:2\.16[28]|1\.247)|59\.9[24])(?:\.[012]?\d{1,2}){2}\b)/ describe KHOP_SC_CIDR16 Relay CIDR /16 is among worst in SpamCop tflags KHOP_SC_CIDR16 nopublish score KHOP_SC_CIDR16 1.6 0.5 1.6 0.5 # 0.7444/0.0129 spam/ham, 0.983 s/o @ 20100211 # 0.5943/0.0139 spam/ham, 0.977 s/o @ 20100325 .6 .5 .9 .75 # 0.8767/0.0167 spam/ham, 0.981 s/o @ 20100329 1.6 .5 1.6 .5 masscheck promoted # 0.6952/0.0011 spam/ham, 0.998 s/o @ 20100401 # increased worst offenders 6/12->9/15 @ 20100401 header KHOP_SC_TOP_CIDR16 Received =~ /(?-xism:\b(?:1(?:(?:8[36]\.8|23\.2)7|18\.96)|9(?:4\.179|2\.47|3\.41)|41\.14[01])(?:\.[012]?\d{1,2}){2}\b)/ describe KHOP_SC_TOP_CIDR16 Relay CIDR /16 leads SpamCop in worst /16s tflags KHOP_SC_TOP_CIDR16 nopublish score KHOP_SC_TOP_CIDR16 2.0 0.5 2.0 0.5 # 0.8862/0.0008 spam/ham, 0.999 s/o @ 20100211 # 0.5738/0.0008 spam/ham, 0.999 s/o @ 20100325 .9 .8 1.3 1.2 # 0.6658/0 spam/ham, 1.000 s/o @ 20100329 2 .5 2 .5 masscheck promoted # 0.8374/0 spam/ham, 1.000 s/o @ 20100401 # http://spamcop.net/w3m?action=map;net=cmaxcnt;mask=65535;sort=spamcnt header KHOP_SC_CIDR24 Received =~ /(?-xism:\b(?:2(?:1(?:2\.63\.221|3\.233\.64|7\.118\.82)|0(?:3\.82\.81|9\.222\.0))|189\.112\.218|79\.106\.109|89\.232\.105|61\.7\.231)\.[012]?\d{1,2}\b)/ describe KHOP_SC_CIDR24 Relay CIDR /24 is among worst in SpamCop tflags KHOP_SC_CIDR24 nopublish score KHOP_SC_CIDR24 2.5 0.6 2.5 0.6 # 0.1350/0 spam/ham, 1.000 s/o @ 20100211 # 0.0798/0 spam/ham, 1.000 s/o @ 20100325 .9 .8 1.3 1.2 # 0.0159/0 spam/ham, 1.000 s/o @ 20100329 2.5 .6 2.5 .6 masscheck promoted # 0.1577/0 spam/ham, 1.000 s/o @ 20100401 # added top host-count /24s, increased worst offenders 6/12->8/15 @ 20100401 header KHOP_SC_TOP_CIDR24 Received =~ /(?-xism:\b(?:1(?:1(?:5\.147\.(?:2(?:0[123]|3[017])|192)|7\.24(?:1\.176|2\.28)|1\.224\.250|8\.71\.8)|96\.12\.2(?:3[36]|45)|73\.45\.96)|2(?:0(?:3\.82\.(?:8[012]|9[234])|2\.(?:152\.243|70\.54))|13\.(?:163\.11|87\.7)6)|8(?:5\.26\.(?:23[2345]|16[45])|1\.192\.211|9\.232\.105|2\.178\.69|3\.149\.3)|7(?:7\.232\.142|8\.138\.170|2\.21\.6)|41\.(?:2(?:23\.20|54\.)|140\.25)1|6(?:1\.19\.(?:66|71)|2\.61\.164)|91\.203\.67)\.[012]?\d{1,2}\b)/ describe KHOP_SC_TOP_CIDR24 Relay CIDR /24 leads SpamCop in worst /24s tflags KHOP_SC_TOP_CIDR24 nopublish score KHOP_SC_TOP_CIDR24 2.7 0.6 2.7 0.6 # 0.2528/0.0092 spam/ham, 0.965 s/o @ 20100211 # 0.2231/0.0112 spam/ham, 0.952 s/o @ 20100325 1.7 1.5 1.9 1.8 # 0.0249/0 spam/ham, 1.000 s/o @ 20100329 2.7 .6 2.7 .6 masscheck promoted # 0.1594/0 spam/ham, 1.000 s/o @ 20100401 # http://www.spamcop.net/w3m?action=hoshame header KHOP_SC_TOP200 Received =~ /(?-xism:\b(?:1(?:2(?:1\.(?:1(?:(?:68\.226\.23|90\.176\.16)1|\.(?:37\.14[567]|18\.244))|24(?:1\.168\.162|6\.157\.214))|2\.(?:1(?:66\.60\.118|80\.15\.2)|252\.2(?:46\.23|34\.7)4)|3\.(?:1(?:40\.250\.254|6\.147\.68)|255\.248\.99)|4\.(?:124\.43\.32|3\.117\.204)|5\.22\.85\.134|\.191\.88\.50)|9(?:0\.(?:(?:183\.62\.15|34\.154\.20)4|2(?:6\.67\.230|7\.80\.93)|41\.223\.167|86\.207\.218|96\.68\.179)|5\.(?:(?:24\.93\.25|88\.93\.9)2|189\.46\.253|95\.223\.26)|3\.(?:10(?:7\.184\.192|8\.38\.228)|40\.244\.211)|6\.1\.209\.(?:69|83)|4\.54\.53\.237)|1(?:(?:6\.50\.191\.19|3\.160\.2\.5)8|8\.1(?:02\.131\.131|31\.153\.82)|9\.(?:226\.23\.215|75\.19\.230)|1\.224\.250\.1(?:3[012345]|29)|2\.221\.100\.172|5\.118\.134\.54)|7(?:3\.(?:45\.96\.(?:2(?:1[13459]|0[0278])|19[23467]|98)|79\.15\.189)|4\.121\.63\.1(?:33|41))|8(?:6\.24\.(?:1[6789]|2[0123])\.3|9\.112\.218\.234)|51\.(?:44\.239\.62|76\.31\.58)|68\.187\.214\.66)|2(?:0(?:0\.(?:1(?:11\.161\.194|04\.58\.227)|8(?:8\.198\.244|0\.140\.61)|23\.18\.172|6\.193\.89)|3\.(?:1(?:(?:66\.207\.1|99\.72\.22)8|01\.104\.69|21\.88\.162)|249\.162\.7)|9\.(?:2(?:22\.0\.(?:1[135]|2[69])|54\.56\.106)|94\.196\.170)|2\.(?:(?:164\.52\.10|87\.47\.13)0|43\.18(?:2\.178|1\.7))|1\.(?:59\.92\.24|43\.13\.8)6|5\.209\.97\.201|6\.48\.103\.222)|1(?:3\.(?:1(?:63\.116\.(?:2(?:2[26]|30)|1(?:38|74)|78)|98\.11(?:1\.207|3\.144|2\.90))|226\.144\.65)|1\.(?:1(?:91\.174\.141|71\.31\.100)|24\.209\.253)|7\.(?:1(?:74\.229\.221|14\.11\.35)|76\.[24]\.129)|2\.(?:(?:175\.53\.1|63\.221\.)10|52\.148\.109)|6\.(?:155\.39\.(?:2[03]|13)|230\.133\.69)|9\.95\.(?:227\.218|148\.97|45\.81)|0\.5\.68\.20)|2(?:0\.(?:149\.255\.194|227\.46\.186)|2\.(?:124\.156\.231|252\.223\.2)|1\.143\.(?:109\.250|46\.33)))|8(?:2\.(?:1(?:14\.(?:7(?:1\.182|9\.163|0\.54)|65\.246)|40\.91\.41)|66\.65\.144)|0\.(?:1(?:79\.231\.205|22\.70\.11)|93\.125\.186)|9\.2(?:36\.202\.134|11\.46\.210)|4\.22\.(?:56\.50|63\.74)|8\.134\.88\.45|3\.234\.89\.2|5\.154\.5\.90)|7(?:7\.(?:73\.1(?:42\.2|39\.)2|120\.192\.66|22\.162\.99)|5\.1(?:09\.187\.101|46\.77\.237|21\.65\.32)|(?:9\.101\.99\.15|2\.21\.6\.2)4|4\.50\.85\.(?:227|18)|1\.179\.231\.70|6\.227\.84\.105|0\.90\.82\.129|8\.109\.36\.8)|6(?:1\.(?:1(?:00\.228\.61|7\.76\.197|9\.71\.74)|7\.2(?:31\.23|41\.7)0|28\.150\.162)|5\.(?:17\.164\.162|212\.20\.218)|9\.(?:151\.79\.23|79\.214\.11)8|3\.25(?:3\.107\.166|5\.22\.42)|4\.187\.117\.69|8\.232\.189\.41)|9(?:3\.(?:91\.196\.(?:132|99)|188\.9\.34)|1\.1(?:98\.175\.252|50\.127\.93)|8\.1(?:08\.72\.114|26\.149\.91)|7\.6(?:7\.160\.34|6\.79\.81)|6\.252\.172\.23)|41\.2(?:04\.190\.12|15\.18\.110)|5(?:8\.27\.196\.8|9\.6\.146\.2)4)\b)/ describe KHOP_SC_TOP200 Relay listed in SpamCop top 200 spammer IPs tflags KHOP_SC_TOP200 nopublish score KHOP_SC_TOP200 4 0 4 0 # unnecessary if DNSBLs work # 1.2552/0 spam/ham, 1.000 s/o @ 20100211 # 0.8558/0 spam/ham, 1.000 s/o @ 20100325 3.4 3.2 3.7 3.5 # 0.1265/0 spam/ham, 1.000 s/o @ 20100329 4 0 4 0 masscheck promoted # 0.7066/0 spam/ham, 1.000 s/o @ 20100401 # PSBL-neighbors: any /24 with 73+ (2/7, 29%) IPs in the PSBL (not SpamCop), # as obtained from rsync://psbl-mirror.surriel.com::psbl/psbl.txt header KHOP_PSBL_CIDR24 X-Spam-Relays-Untrusted =~ /(?-xism:\b(?:1(?:1(?:3\.(?:16(?:7\.(?:1(?:2[89]|3[01]|6[45]|80?)?|48|51|0)|8\.(?:1(?:4[012]|3[67]|02)|8[134]|96)|2\.(?:7[17]|80|97)|5\.166)|22\.(?:[89]|10))|7\.24(?:1\.(?:2(?:5[23]|24|40)|1(?:44|76|92)|8?0|56|64)|2\.(?:1(?:40|96|2)|7[23]|28|5))|8\.(?:6(?:8\.(?:2(?:4[89]|52)|19[26])|9\.13[789])|71\.(?:6?8|10|9))|5\.147\.(?:2(?:3[0127]|0[123]|29)|192)|9\.48\.19[235689]|6\.71\.222)|23\.(?:1(?:7\.2(?:2[456789]|30)|8\.1(?:7[27]|65|81))|2(?:(?:3\.25|8\.14)2|7\.21[14]))|8(?:3\.87\.115|0\.234\.3)|96\.12\.23[36]|49\.254\.48)|2(?:0(?:2\.(?:70\.5[489]|152\.243)|3\.82\.(?:9[234]|8[01]))|22\.25(?:4\.(?:7[489]|218)|2\.15[78]|3\.17[79])|1(?:7\.118\.90|3\.87\.76))|8(?:5\.26\.(?:2(?:3[2345]|41)|1(?:6[45]|83))|1\.192\.(?:199|211)|2\.178\.69|3\.149\.3)|5(?:9\.9(?:8\.1(?:[59]2|44)|9\.(?:128|57))|8\.18(?:6\.(?:21[6789]|12)|7\.8))|41\.(?:2(?:54\.[12]|23\.201)|1(?:40\.251|89\.193))|6(?:1\.19\.6[567]|2\.61\.164)|77\.232\.142)\.[012]?\d{1,2}\b)/ describe KHOP_PSBL_CIDR24 Relay's IP/24 CIDR contains many PSBL hits tflags KHOP_PSBL_CIDR24 nopublish score KHOP_PSBL_CIDR24 1.8 0.8 1.8 0.8 # 0.5363/0 spam/ham, 1.000 s/o @ 20100401 # Bump these up to compensate for expected but absent overlap (94+% noted below) if (! plugin(Mail::SpamAssassin::Plugin::DNSEval) ) score KHOP_SC_CIDR8 (0) (0.1) (0) (0.2) # BRBL(98%) score KHOP_SC_TOP_CIDR8 (0) (0.9) (0) (0.9) # BRBL(98%) score KHOP_SC_CIDR16 (0) (1.5) (0) (1.5) # BRBL(99%), PBL(98%) score KHOP_SC_TOP_CIDR16 (0) (1.7) (0) (1.7) # BRBL(99%), PBL(94%) score KHOP_SC_CIDR24 (0) (1.9) (0) (1.9) # SC(99) BRBL(96) MSPIKE(96) score KHOP_SC_TOP_CIDR24 (0) (2.1) (0) (2.1) # MSPIKE(99) SC(98) BRBL(97) ... # PSBL(97) HOSTKARMA(97) score KHOP_SC_TOP200 (0) (4.4) (0) (4.4) # SC(99) PSBL(99) ... # HOSTKARMA(99) SEMBLACK(99) BRBL(98) MSPIKE(94) score KHOP_PSBL_CIDR24 (0) (1.5) (0) (1.5) endif