## khop-sc-neighbors.cf v 2010041022 ## 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;mask=4294967295;net=0;sort=56 # 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(?:1(?:22|89)|201|94)(?:\.[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 without meta # 11.8578/0.4495 spam/ham, 0.961 s/o @ 20100402 half meta (oops) # decreased worst offenders 4/8->4/7 # 7.8856/0.1388 spam/ham, 0.983 s/o @ 20100403 meta, net, solo=7.9236/0.4189 # changed from rank by spam count to rank by hosts reported, back to 4/8 # 12.1963/0.0356 spam/ham, 0.997 s/o @ 20100406 (wow) solo=12.2454/0.0408.997 # 12.0753/0.0359 spam/ham, 0.997 s/o @ 20100409 solo=12.1265/0.0412.997 # 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(?:17|90)|59|95)(?:\.[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!) # 14.2553/0.0424 spam/ham, 0.997 s/o @ 20100403 net, solo=14.3609/0.4888.967 # 11.6252/0.1263 spam/ham, 0.989 s/o @ 20100406 solo=11.7104/0.5366.956 # 11.5987/0.1295 spam/ham, 0.989 s/o @ 20100409 solo=11.6856/0.5731.953 # http://www.spamcop.net/w3m?action=map;net=bmaxcnt;mask=16777215;sort=spamcnt header KHOP_SC_CIDR16 Received =~ /(?-xism:\b92\.85(?:\.[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 # 0.4399/0.0008 spam/ham, 0.998 s/o @ 20100403 net run # 0.2102/0.0011 spam/ham, 0.995 s/o @ 20100406 # no hits 20100409 (wha!?) header KHOP_SC_TOP_CIDR16 Received =~ /(?-xism:\b(?:1(?:2(?:2\.16[238]|3\.27)|18\.96|83\.87)|9(?:4\.179|2\.47)|41\.141)(?:\.[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 # 1.2077/0.0145 spam/ham, 0.988 s/o @ 20100403 net run # 1.2155/0.0142 spam/ham, 0.988 s/o @ 20100406 # 1.2779/0.0142 spam/ham, 0.989 s/o @ 20100409 # http://spamcop.net/w3m?action=map;net=cmaxcnt;mask=65535;sort=spamcnt header KHOP_SC_CIDR24 Received =~ /(?-xism:\b(?:2(?:1(?:(?:1\.191\.17|3\.233\.6)4|7\.118\.82)|03\.82\.(?:81|94)|21\.143\.46)|1(?:89\.112\.218|13\.22\.69)|7(?:8\.138\.171|9\.106\.109)|8(?:9\.232\.105|3\.149\.3)|64\.187\.119|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.1223/0 spam/ham, 1.000 s/o @ 20100402 (oops, too small a pool) # host-count 84/64->84/50, offenders 8/15->10/20 @ 20100402 # 0.2547/0 spam/ham, 1.000 s/o @ 20100403 net # 0.2126/0 spam/ham, 1.000 s/o @ 20100406 # 0.2960/0 spam/ham, 1.000 s/o @ 20100409 header KHOP_SC_TOP_CIDR24 Received =~ /(?-xism:\b(?:1(?:1(?:5\.147\.(?:2(?:3[0127]|0[123]|29)|192)|1\.224\.250|7\.242\.28|2\.76\.5)|9(?:6\.12\.2(?:4[245]|3[36])|0\.104\.162)|73\.45\.96)|2(?:0(?:3\.82\.(?:8[012]|9[234])|2\.(?:152\.243|70\.54)|9\.222\.0)|1(?:3\.(?:163\.11|87\.7)6|2\.63\.221|7\.118\.90))|8(?:5\.26\.(?:23[2345]|16[45])|1\.192\.211|9\.232\.105|2\.178\.69|3\.149\.3)|6(?:1\.(?:19\.(?:66|71)|7\.231)|2\.61\.164)|7(?:7\.232\.142|8\.138\.170|2\.21\.6)|41\.(?:2(?:23\.20|54\.)|140\.25)1|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.6448/0 spam/ham, 1.000 s/o @ 20100402 (wow!) # 0.6896/0 spam/ham, 1.000 s/o @ 20100403 net # 0.6255/0.0045 spam/ham, 0.993 s/o @ 20100406 # 0.7261/0.0045 spam/ham, 0.994 s/o @ 20100409 # http://www.spamcop.net/w3m?action=hoshame header KHOP_SC_TOP200 Received =~ /(?-xism:\b(?:1(?:9(?:0\.(?:1(?:49\.103\.238|83\.62\.154|7\.212\.73)|41\.(?:171\.154|223\.167)|34\.154\.204|96\.68\.179)|5\.(?:1(?:(?:38\.84\.21|89\.46\.25)3|61\.(?:8\.1|9\.2))|2(?:02\.81\.154|38\.191\.68)|5\.41\.190)|3\.(?:1(?:0(?:7\.184\.192|8\.38\.228)|98\.8\.211)|200\.173\.154)|4\.(?:0\.252\.175|250\.1\.111|44\.21\.49|54\.51\.28)|6\.(?:3\.166\.217|40\.10\.250))|2(?:2\.(?:16(?:0\.(?:179\.190|99\.42)|6\.61\.134)|252\.2(?:46\.23|34\.7)4|34\.215\.210)|1\.(?:1(?:\.(?:37\.14[567]|18\.244)|67\.33\.83)|242\.103\.202)|3\.1(?:40\.250\.254|9\.238\.212)|4\.(?:124\.43\.3|30\.252\.)2|(?:5\.20\.80|\.191\.88)\.50)|1(?:9\.(?:226\.(?:161\.154|84\.218)|110\.85\.126|75\.19\.230)|5\.1(?:18\.134\.54|40\.76\.100)|3\.(?:22\.69\.172|160\.2\.58)|1\.224\.250\.1(?:3[045]|29)|2\.221\.100\.172|4\.69\.241\.138|7\.110\.24\.250)|8(?:9\.(?:112\.218\.234|84\.174\.253)|6\.24\.(?:1[6789]|2[13])\.3|8\.108\.158\.135)|73\.(?:45\.96\.(?:2(?:1[01235]|0[18])|1(?:9[3578]|0[02])|99)|161\.201\.157)|5(?:5\.212\.105\.12|1\.44\.239\.6)2)|2(?:0(?:1\.(?:1(?:55\.130\.179|0\.176\.43)|2(?:32\.107\.46|51\.250\.3)|(?:59\.92\.24|43\.13\.8)6)|2\.(?:1(?:24\.110\.219|44\.185\.170)|4(?:2\.133\.58|3\.181\.7)|87\.47\.130|75\.36\.72)|9\.(?:2(?:22\.0\.(?:[67]|1[29]|28|30)|54\.56\.106)|94\.196\.170)|0\.(?:141\.87\.135|95\.162\.200|80\.140\.61)|3\.(?:126\.152\.242|202\.255\.67)|6\.48\.103\.222|7\.255\.89\.50)|1(?:3\.(?:1(?:98\.(?:11(?:1\.207|3\.144|2\.90)|25\.33)|63\.116\.2(?:26|30)|38\.90\.158)|226\.144\.65)|1\.(?:1(?:(?:91\.174\.14|08\.94\.7)1|71\.31\.100)|24\.209\.253)|7\.(?:1(?:74\.229\.221|14\.11\.35)|76\.2\.129)|9\.(?:95\.(?:227\.218|148\.97)|143\.134\.110)|2\.(?:175\.53\.1|63\.221\.)10|6\.230\.133\.69|8\.248\.44\.196)|2(?:2\.(?:12(?:4\.1(?:56\.2|98\.1)31|0\.16\.15)|252\.223\.2)|1\.143\.46\.33))|8(?:2\.1(?:14\.(?:7(?:0\.54|9\.86)|(?:65|90)\.246)|93\.140\.168|40\.91\.41)|0\.(?:1(?:79\.231\.205|22\.70\.11)|93\.125\.186|69\.146\.54)|3\.(?:23(?:9\.33\.38|4\.89\.2)|142\.111\.228)|9\.(?:211\.46\.21[08]|161\.141\.147)|1\.(?:192\.4|22\.)8\.62|6\.110\.168\.153|5\.18\.140\.45|7\.117\.35\.81|4\.22\.56\.50)|6(?:4\.(?:1(?:(?:20\.251\.18|64\.228\.20)6|87\.119\.[23])|70\.190\.10)|1\.(?:1(?:00\.228\.61|9\.71\.74)|7\.2(?:31\.23|41\.7)0)|0\.(?:49\.236\.137|51\.225\.213)|7\.(?:115\.179\.198|217\.48\.9)|9\.1(?:51\.79\.238|75\.88\.227)|3\.25(?:3\.107\.166|5\.22\.42)|6\.147\.115\.202)|7(?:7\.(?:1(?:20\.251\.37|92\.142\.63)|2(?:41\.17\.120|2\.162\.99)|73\.139\.2)|8\.(?:1(?:38\.169\.158|09\.36\.16)|40\.254\.1)|6\.(?:103\.160\.74|227\.84\.105)|2\.21\.6\.(?:24|81)|0\.118\.213\.198|5\.77\.187\.10)|9(?:(?:8\.126\.149\.9|7\.66\.79\.8)1|1\.1(?:93\.253\.23|50\.127\.9)3|3\.91\.196\.(?:132|99))|5(?:8\.27\.196\.8|9\.6\.146\.2)4|41\.215\.18\.110)\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 # 0.6558/0 spam/ham, 1.000 s/o @ 20100403 net # 0.6211/0 spam/ham, 1.000 s/o @ 20100406 # 0.5307/0 spam/ham, 1.000 s/o @ 20100409 # 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(?:[27][89]|3[01]|6[34]|80?)?|2(?:12|46|3)|4[089]|5[01]|0)|8\.(?:1(?:0[27]?|3[678]|4[01]|14)|8[01345]|96)|2\.(?:7[17]|80|97)|0\.112|5\.166|9\.88|6\.9)|22\.(?:[89]|6[89]|10)|56\.28)|7\.2(?:4(?:1\.(?:2(?:5[234]|2[48]|32|40)|1(?:7[678]|44|92)|8[012]|56|64|0)|2\.(?:[05]|1(?:40|96|2)|2[89]|7[23]|68))|05\.9[89])|8\.(?:6(?:8\.(?:2(?:4[89]|5[23])|19[236])|9\.13[789])|71\.(?:6?8|10|9))|5\.147\.(?:2(?:3[0127]|0[123]|29)|192)|6\.71\.(?:2(?:1[47]|22)|9[03]|38)|9\.(?:48\.19[23456789]|153\.7))|2(?:3\.(?:1(?:7\.(?:2(?:2[56789]|3[02])|1(?:6[14]|9[46]))|8\.1(?:7[125678]|5[78]|6[25]|8[12]|9[35])|6\.(?:174|221))|2(?:7\.(?:2(?:1[14678]|09)|32)|8\.14[0123]|3\.252))|2\.168\.(?:2(?:3[58]|17|48)|70))|9(?:6\.12\.2(?:3[36]|4[35])|5\.246\.48)|8(?:3\.8(?:0\.128|7\.115)|0\.234\.3)|49\.254\.48)|2(?:22\.25(?:4\.(?:1(?:08|11)|7[089]|218|93)|3\.(?:1(?:7[789]|8[05])|25|30)|2\.(?:1(?:5[5789]|86)|245))|0(?:2\.(?:70\.5[489]|152\.243)|3\.82\.(?:9[234]|8[01]))|1(?:7\.(?:118\.90|8\.225)|3\.87\.76))|5(?:9\.9(?:9\.(?:1(?:2[89]|5[23]|[36]0)|57)|8\.1(?:[59]2|44)|7\.20[09])|8\.1(?:8(?:6\.(?:21[6789]|1[23])|7\.8)|0\.102))|8(?:5\.26\.(?:1(?:6[45]|83)|23[2345])|3\.149\.(?:4[45]|28|3)|1\.192\.(?:199|211)|2\.178\.69)|41\.(?:2(?:54\.[12]|23\.201)|1(?:40\.251|89\.193))|6(?:1\.19\.6[567]|2\.61\.164)|7(?:7\.232\.142|8\.138\.170))\.[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 # 0.7486/0 spam/ham, 1.000 s/o @ 20100402 # 0.7317/0 spam/ham, 1.000 s/o @ 20100403 net run. min hosts 73->65 # 0.9316/0 spam/ham, 1.000 s/o @ 20100406 # 0.9473/0 spam/ham, 1.000 s/o @ 20100409 # test for ruleqa, 20100409, http://ruleqa.spamassassin.org/?rule=/KHOP_SPAMMY meta __KHOP_SPAMMY_CIDR24 KHOP_PSBL_CIDR24||KHOP_SC_CIDR24||KHOP_SC_TOP_CIDR24 # est. 1.2/0.0050@.996, floor: 1.0/0.0112@.989, ceiling: 1.4/0 meta __KHOP_SPAMMY_CIDR16 KHOP_SC_CIDR16||KHOP_SC_TOP_CIDR16 # est. 1.4/0.02@.986, floor: 1.3/0.0312@.977, ceiling: 2.0/0.0150@.993 meta __KHOP_SPAMMY_CIDR8 KHOP_SC_CIDR8||KHOP_SC_TOP_CIDR8 # est. 23.7/0.15@.994, floor: 23/0.2685@.988, ceiling: 26.5/0.0789@.997 meta __KHOP_SPAMMY_SUBNET __KHOP_SPAMMY_CIDR24||__KHOP_SPAMMY_CIDR16||__KHOP_SPAMMY_CIDR8 # est. 26.2/0.175@.993, floor: 24.5/0.5@.980, ceiling: 30.1/0.1@.997 # 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) # BRBL(98) XBL(95) endif