## khop-sc-neighbors.cf v 201004222 ## 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=%2FKHOP_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(?:(?:12|9)2|89)(?:\.[012]?\d{1,2}){3}\b) / meta KHOP_SC_CIDR8 __KHOP_SC_CIDR8 && !(__VIA_ML||__freemail_safe||__RCVD_IN_DNSWL||RCVD_IN_HOSTKARMA_WL) 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 # 11.8578/0.4495 spam/ham, 0.961 s/o @ 20100402 # decreased worst offenders 4/8->4/7 (should reduce to 8.8% at lowest) # 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(?:9[45]|190|201)(?:\.[012]?\d{1,2}){3}\b) / meta KHOP_SC_TOP_CIDR8 __KHOP_SC_TOP_CIDR8 && !(__VIA_ML||__freemail_safe||__RCVD_IN_DNSWL||RCVD_IN_HOSTKARMA_WL) 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 # 14.1807/0.4960 spam/ham, 0.966 s/o @ 20100402 without meta # 14.0841/0.0926 spam/ham, 0.993 s/o @ 20100402 added meta (wow!) # http://www.spamcop.net/w3m?action=map;net=bmaxcnt;mask=16777215;sort=spamcnt header KHOP_SC_CIDR16 Received =~ /(?-xism:\b(?:12(?:1\.247|2\.162)|41\.140|59\.94)(?:\.[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 # 0.6814/0.0149 spam/ham, 0.979 s/o @ 20100402 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\.141|59\.92)(?:\.[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 # 1.1534/0 spam/ham, 1.000 s/o @ 20100402 # http://spamcop.net/w3m?action=map;net=cmaxcnt;mask=65535;sort=spamcnt header KHOP_SC_CIDR24 Received =~ /(?-xism:\b(?:2(?:0(?:3\.8(?:7\.178|2\.81)|2\.152\.243)|1(?:2\.63\.221|3\.233\.64|7\.118\.82))|1(?:13\.167\.197|89\.112\.218|21\.54\.32)|7(?:8\.138\.168|9\.106\.109)|8(?:9\.232\.105|3\.149\.3)|64\.187\.117|41\.214\.12)\.[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 # 0.6448/0 spam/ham, 1.000 s/o @ 20100402 (wow!) # host-count 84/64->84/50, offenders 8/15->10/20 @ 20100402 header KHOP_SC_TOP_CIDR24 Received =~ /(?-xism:\b(?:1(?:1(?:5\.147\.(?:2(?:3[17]|29)|192)|7\.24(?:1\.176|2\.28)|1\.224\.250|3\.22\.69)|96\.12\.2(?:3[36]|45)|73\.45\.96)|2(?:0(?:3\.82\.(?:9[234]|8[01])|2\.(?:152\.243|70\.54)|9\.222\.0)|13\.(?:(?:163\.11|87\.7)6|233\.64))|8(?:5\.26\.(?:1(?:6[45]|83)|23[2345])|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)|9(?:5\.129\.166|1\.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 # 0.1223/0 spam/ham, 1.000 s/o @ 20100402 (oops, too small a pool) # http://www.spamcop.net/w3m?action=hoshame header KHOP_SC_TOP200 Received =~ /(?-xism:\b(?:1(?:9(?:0\.(?:1(?:83\.62\.154|7\.212\.73)|2(?:6\.67\.230|7\.80\.93)|41\.(?:171\.154|223\.167)|34\.154\.204|86\.207\.218|96\.68\.179)|5\.(?:(?:24\.93\.25|88\.93\.9)2|1(?:89\.46\.253|61\.9\.2)|95\.223\.26)|3\.(?:10(?:7\.184\.192|8\.38\.228)|40\.244\.211)|6\.1\.209\.(?:69|83)|4\.0\.252\.175)|2(?:1\.(?:1(?:(?:68\.226\.23|90\.176\.16)1|\.(?:37\.14[567]|18\.244))|241\.168\.162)|2\.(?:1(?:66\.60\.118|80\.15\.2)|252\.2(?:46\.23|34\.7)4)|3\.(?:1(?:40\.250\.254|6\.147\.68)|237\.252\.35)|4\.(?:124\.43\.32|3\.117\.204)|5\.22\.85\.134)|1(?:(?:2\.221\.100\.17|8\.131\.153\.8)2|(?:6\.50\.191\.19|3\.160\.2\.5)8|5\.(?:118\.134\.54|93\.111\.218)|1\.224\.250\.1(?:3[012345]|29)|9\.75\.19\.230)|7(?:3\.45\.96\.(?:2(?:1[134569]|0[02689])|19[24679]|98)|4\.121\.63\.133)|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(?:3\.(?:1(?:(?:66\.207\.1|99\.72\.22)8|21\.88\.162)|249\.162\.7|59\.95\.113)|0\.(?:1(?:11\.161\.194|04\.58\.227)|23\.18\.172|80\.140\.61|6\.193\.89)|9\.(?:2(?:22\.0\.(?:1[0135]|2[169])|54\.56\.106)|94\.196\.170)|2\.(?:(?:164\.52\.10|87\.47\.13)0|4(?:2\.133\.58|3\.181\.7))|1\.(?:(?:59\.92\.24|43\.13\.8)6|116\.208\.58|200\.178\.50)|5\.209\.97\.201|6\.48\.103\.222|7\.255\.89\.50)|1(?:3\.(?:1(?:98\.11(?:1\.207|3\.144|2\.90)|63\.116\.(?:2(?:26|30)|174))|226\.144\.65)|1\.(?:1(?:91\.174\.141|71\.31\.100)|24\.209\.253)|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)|7\.(?:76\.[24]\.129|114\.11\.35))|2(?:0\.(?:2(?:27\.46\.186|31\.69\.13)|149\.255\.194)|2\.(?:124\.156\.231|252\.223\.2)|1\.143\.(?:109\.250|46\.33)))|6(?:1\.(?:1(?:00\.228\.61|7\.76\.197|9\.71\.74)|7\.2(?:31\.23|41\.7)0|28\.150\.162)|(?:9\.(?:151\.79\.23|79\.214\.11)|7\.115\.179\.19|2\.103\.171\.2)8|4\.(?:(?:237\.33\.3|70\.190\.1)0|187\.117\.69)|5\.(?:17\.164\.162|212\.20\.218)|3\.25(?:3\.107\.166|5\.22\.42)|0\.49\.236\.137|8\.232\.189\.41)|8(?:2\.(?:1(?:14\.(?:7(?: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)|(?:9\.101\.99\.15|2\.21\.6\.2)4|5\.1(?:46\.77\.237|21\.65\.32)|1\.179\.231\.70|6\.227\.84\.105|8\.109\.36\.8)|9(?:1\.1(?:98\.175\.252|50\.127\.93)|8\.1(?:08\.72\.114|26\.149\.91)|7\.6(?:7\.160\.34|6\.79\.81)|3\.91\.196\.(?:132|99)|6\.252\.172\.23)|41\.2(?:0(?:4\.190\.12|6\.61\.243)|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]|80?|64|79)?|48|51|0)|8\.(?:1(?:37|40)|8[14]|96)|2\.(?:7[17]|80|97)|5\.166)|22\.(?:6?8|10|9))|7\.24(?:1\.(?:2(?:5[23]|24|40)|1(?:44|76)|8?0|64)|2\.(?:1(?:40|96|2)|28|72|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[2356789]|6\.71\.215)|2(?:3\.(?:1(?:7\.2(?:2[56789]|30)|8\.1(?:7[167]|81))|2(?:8\.14[12]|3\.252|7\.214))|2\.168\.70)|8(?:3\.87\.115|0\.234\.3)|96\.12\.2(?:3[36]|45)|49\.254\.48)|2(?:22\.25(?:4\.(?:7[089]|218)|2\.1(?:5[78]|86)|3\.1(?:7[79]|80))|0(?:2\.(?:70\.5[489]|152\.243)|3\.82\.(?:9[234]|8[01]))|1(?:7\.118\.90|3\.87\.76))|5(?:9\.9(?:8\.1(?:[59]2|44)|9\.(?:12[89]|57)|7\.200)|8\.18(?:6\.(?:21[6789]|1[23])|7\.8))|8(?:5\.26\.(?:1(?:6[45]|83)|23[2345])|1\.192\.(?:199|211)|3\.149\.(?:45|3)|2\.178\.69)|41\.(?:2(?:54\.[12]|23\.201)|1(?:40\.251|89\.193))|6(?:1\.19\.6[567]|2\.61\.164))\.[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