## khop-sc-neighbors.cf v 201005232 ## 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(?:9[25]|188|41)(?:\.[012]?\d{1,2}){3}\b) / # and gets cleaned up a bit 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.2 0.1 0.3 0.2 # spam/ham s/o corpus # 12.3692/1.0099 0.925 20100211 .2 .1 .3 .2 -> .1 .01 .1 .01 # 8.9412/1.1532 0.886 20100325 # 9.4362/0.4074 0.959 20100329 # 11.8281/0.4788 0.961 20100401 without meta # 11.8578/0.4495 0.961 20100402 half meta (oops). decreased worst 4/8->4/7 # 7.8856/0.1388 0.983 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 0.997 20100406 (wow) solo=12.2454/0.0408@0.997 # 12.0753/0.0359 0.997 20100409 solo=12.1265/0.0412@0.997 # 12.1449/0.0139 0.999 20100410 net, solo=12.1966/0.0197@0.998, ->.2 .1 .3 .2 header __KHOP_SC_TOP_CIDR8 X-Spam-Relays-Untrusted =~ /^[^\]]* (?:by|ip)=(?-xism:\b(?:1(?:17|22|90)|59)(?:\.[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 # spam/ham s/o corpus # 15.6795/0.1173 0.993 20100211 .5 .4 .8 .6 -> .6 .5 .8 .5 # 11.0578/0.3614 0.968 20100325 # 13.7809/0.4860 0.966 20100329 .9 .1 .9 .1 masscheck promoted # 14.1773/0.4799 0.967 20100401 # 14.1807/0.4960 0.966 20100402 without meta # 14.0841/0.0926 0.993 20100402 added meta (wow!) # 14.2553/0.0424 0.997 20100403 net, solo=14.3609/0.4888@0.967 # 11.6252/0.1263 0.989 20100406 solo=11.7104/0.5366@0.956 # 11.5987/0.1295 0.989 20100409 solo=11.6856/0.5731@0.953 # 11.6286/0.0475 0.996 20100410 net, solo=11.7224/0.6900@0.944, ->LE as above # http://www.spamcop.net/w3m?action=map;net=bmaxcnt;mask=16777215;sort=spamcnt header KHOP_SC_CIDR16 Received =~ /(?-xism:\b(?:1(?:22\.16[134]|15\.240)|9(?:2\.113|5\.135))(?:\.[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 # spam/ham s/o corpus # 0.7444/0.0129 0.983 20100211 # 0.5943/0.0139 0.977 20100325 .6 .5 .9 .75 # 0.8767/0.0167 0.981 20100329 1.6 .5 1.6 .5 masscheck promoted # 0.6952/0.0011 0.998 20100401 increased worst offenders 6/12->9/15 @ 20100401 # 0.6814/0.0149 0.979 20100402 # 0.4399/0.0008 0.998 20100403 net run # 0.2102/0.0011 0.995 20100406 # 0 /0 0 20100409 (wha!?) # crap, still empty 20100410 bad scrape, script failed to populate rule header KHOP_SC_TOP_CIDR16 Received =~ /(?-xism:\b(?:1(?:2(?:2\.16[28]|3\.2[78])|83\.87)|(?:89\.12|59\.9)2|41\.(?:141|249))(?:\.[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 # spam/ham s/o corpus # 0.8862/0.0008 0.999 20100211 # 0.5738/0.0008 0.999 20100325 .9 .8 1.3 1.2 # 0.6658/0 1.000 20100329 2 .5 2 .5 masscheck promoted # 0.8374/0 1.000 20100401 # 1.1534/0 1.000 20100402 # 1.2077/0.0145 0.988 20100403 net run # 1.2155/0.0142 0.988 20100406 # 1.2779/0.0142 0.989 20100409 # 1.0611/0.0009 0.999 20100410 net # 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)|0(?:3\.87\.178|9\.239\.47))|1(?:9(?:3\.108\.38|5\.93\.160)|1(?:0\.45\.144|3\.22\.69)|09\.166\.128)|8(?:2\.113\.121|3\.16\.167)|41\.(?:140\.25|214\.1)2|78\.138\.17[01]|58\.187\.85|93\.186\.96)\.[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 # spam/ham s/o corpus # 0.1350/0 1.000 20100211 # 0.0798/0 1.000 20100325 .9 .8 1.3 1.2 # 0.0159/0 1.000 20100329 2.5 .6 2.5 .6 masscheck promoted # 0.1577/0 1.000 20100401 # added top host-count /24s, increased worst offenders 6/12->8/15 @ 20100401 # 0.1223/0 1.000 20100402 (oops, too small a pool) # host-count 84/64->84/50, offenders 8/15->10/20 @ 20100402 # 0.2547/0 1.000 20100403 net # 0.2126/0 1.000 20100406 # 0.2960/0 1.000 20100409 # 0.2905/0 1.000 20100410 net header KHOP_SC_TOP_CIDR24 Received =~ /(?-xism:\b(?:1(?:1(?:5\.147\.(?:2(?:0[12]|3[27])|192)|1\.224\.250)|96\.12\.2(?:4[2345]|3[36])|21\.(?:54\.32|1\.37)|87\.45\.193)|2(?:1(?:7\.(?:8\.2(?:25|36)|118\.90)|3\.(?:233\.64|87\.76))|0(?:2\.(?:70\.5[489]|152\.243)|1\.220\.232))|8(?:5\.26\.(?:2(?:3[234]|41)|1(?:6[45]|86))|3\.149\.(?:21|3)|1\.192\.211|9\.232\.105|2\.178\.69)|7(?:7\.232\.14[23]|4\.208\.166|8\.138\.171|9\.106\.109|2\.21\.7)|41\.(?:2(?:54\.[01]|23\.201)|140\.251)|9(?:5\.129\.166|1\.203\.67|2\.39\.65)|61\.19\.66)\.[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 # spam/ham s/o corpus # 0.2528/0.0092 0.965 20100211 # 0.2231/0.0112 0.952 20100325 1.7 1.5 1.9 1.8 # 0.0249/0 1.000 20100329 2.7 .6 2.7 .6 masscheck promoted # 0.1594/0 1.000 20100401 # 0.6448/0 1.000 20100402 (wow!) # 0.6896/0 1.000 20100403 net # 0.6255/0.0045 0.993 20100406 # 0.7261/0.0045 0.994 20100409 # 0.7447/0.0054 0.993 20100410 net # http://www.spamcop.net/w3m?action=hoshame header KHOP_SC_TOP200 Received =~ /(?-xism:\b(?:1(?:9(?:0\.(?:1(?:4(?:9\.229\.141|1\.192\.3|4\.74\.94)|(?:83\.60\.25|7\.212\.7)3|\.129\.232)|(?:75\.130\.25|4\.48\.1)1|26\.(?:67\.230|97\.26)|34\.154\.204)|3\.(?:1(?:0(?:7\.184\.192|8\.38\.228)|98\.8\.211)|251\.95\.104)|5\.(?:1(?:61\.(?:8\.1|9\.2)|82\.195\.212)|5\.124\.250)|4\.(?:135\.105\.232|204\.203\.16|50\.9\.114)|6\.(?:12\.228\.253|28\.52\.1))|1(?:5\.(?:95\.25\.4[23]|248\.81\.91|68\.15\.83)|(?:0\.45\.144\.22|6\.39\.56\.)7|2\.1(?:62\.214\.78|85\.70\.224)|1\.224\.250\.1(?:3[01234]|29)|8\.161\.249\.196|4\.143\.48\.225|7\.16\.145\.24)|2(?:2\.(?:3(?:4\.215\.210|6\.231\.177)|252\.234\.74)|(?:4\.105\.75\.13|8\.134\.57\.7)5|5\.(?:128\.6\.253|7\.192\.146)|1\.1(?:27\.183\.70|\.18\.244))|8(?:8\.(?:1(?:24\.129\.126|41\.54\.241)|20\.248\.84)|7\.(?:45\.193\.223|85\.135\.190)|6\.24\.(?:1[689]|2[13])\.3|3\.76\.110\.115|9\.35\.100\.97)|7(?:3\.(?:224\.21(?:0\.138|2\.72)|161\.201\.157)|4\.123\.26\.108)|09\.(?:205\.112\.114|166\.136\.1)|51\.76\.29\.214|65\.98\.153\.46)|2(?:0(?:1\.(?:1(?:16\.140\.246|44\.130\.21)|2(?:20\.232\.61|32\.107\.46)|59\.92\.246)|3\.(?:1(?:5(?:1\.232\.191|3\.39\.18)|71\.240\.10)|2(?:13\.174\.37|49\.81\.4))|9\.(?:2(?:39\.47\.205|54\.56\.106)|94\.196\.170)|0\.(?:(?:80\.140\.6|70\.23\.5)1|111\.161\.194)|2\.(?:144\.185\.170|43\.181\.7))|1(?:1\.(?:1(?:9(?:1\.174\.141|9\.79\.198)|79\.124\.160|3\.204\.1)|247\.239\.239)|3\.(?:130\.111\.250|226\.144\.65)|8\.(?:166\.193\.135|248\.44\.196)|9\.70\.(?:78\.163|93\.129)|6\.155\.39\.1[257]|2\.123\.219\.162|0\.93\.109\.205|7\.76\.2\.129)|2(?:2\.(?:12(?:4\.1(?:56\.231|78\.158)|0\.16\.15)|2(?:37\.162\.200|52\.223\.2))|0\.(?:149\.(?:255\.195|56\.69)|255\.132\.156|67\.124\.241|82\.69\.23)|1\.143\.46\.33))|8(?:2\.1(?:14\.(?:7(?:9\.163|0\.54)|90\.246)|(?:78\.168|93\.140)\.168|69\.73\.11)|3\.(?:1(?:01\.72\.196|6\.167\.14)|240\.139\.195)|4\.(?:(?:58\.34\.11|22\.56\.5)0|126\.6\.128)|1\.(?:192\.103\.84|21\.115\.38|84\.95\.126)|0\.(?:93\.125\.186|53\.32\.122|65\.16\.71)|5\.1(?:26\.221\.147|93\.198\.36|54\.6\.71)|9\.(?:231\.178\.16|81\.115\.173)|6\.(?:148\.27\.221|26\.217\.78)|8\.42\.117\.185)|6(?:1\.(?:1(?:00\.228\.61|9\.71\.74)|9(?:7\.32\.104|\.202\.65)|7\.2(?:30\.226|41\.70)|50\.240\.58)|4\.(?:16(?:4\.228\.206|5\.253\.230)|244\.130\.98|46\.21\.153)|7\.(?:1(?:15\.179\.198|62\.212\.147)|217\.50\.44|40\.40\.218)|2\.1(?:63\.240\.135|03\.171\.28)|9\.1(?:51\.79\.238|43\.74\.77)|5\.39\.182\.1(?:6[67]|70)|8\.184\.77\.157)|7(?:4\.(?:9(?:3\.213\.145|2\.90\.58)|208\.166\.151|86\.21\.208)|2\.(?:130\.91\.162|51\.44\.78|21\.7\.79)|6\.(?:103\.160\.74|227\.84\.105)|9\.(?:187\.150\.122|4\.210\.14)|8\.(?:235\.1\.175|40\.254\.1)|7\.232\.133\.13)|9(?:4\.(?:2(?:12\.16\.61|3\.6\.143)|72\.108\.108|85\.241\.193|189\.153\.5)|1\.(?:(?:195\.230\.1|90\.126\.18)0|214\.128\.2[04])|3\.91\.196\.(?:132|99)|0\.149\.170\.15|5\.155\.7\.74|7\.66\.79\.81)|41\.(?:2(?:49\.255\.111|15\.18\.234|20\.241\.58|03\.64\.3)|190\.239\.178)|5(?:8\.27\.132\.51|9\.97\.168\.7))\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 # spam/ham s/o corpus # 1.2552/0 1.000 20100211 # 0.8558/0 1.000 20100325 3.4 3.2 3.7 3.5 # 0.1265/0 1.000 20100329 4 0 4 0 masscheck promoted # 0.7066/0 1.000 20100401 # 0.6558/0 1.000 20100403 net # 0.6211/0 1.000 20100406 # 0.5307/0 1.000 20100409 # 0.5617/0 1.000 20100410 net # 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(?:7\.(?:2(?:0(?:4\.(?:1(?:1[245789]|6[12]|00|21)|8[012345678]|9[06789]|225)|0\.(?:2(?:2[45]|08|41)|1(?:4[45]|76)|5[012589]|4[89]|96)|6\.(?:[02679]|3[2345689]?|1[6789]?|4[0189]|5[02]?)|5\.(?:1(?:4[4567]|2[89]|[03]0)|9[6789]|65)|1\.(?:4[89]|6[45]|50|96))|4(?:1\.(?:2(?:1[678]|2[48]|[04]0|[35]2)|1(?:[59]2|44|76)?|8[018]?|5[678]|0)|2\.(?:[58]|1(?:4[014]|9?6|32|8)|2(?:04|8)|7[0234]|6[089]|4[04])))|1(?:9(?:9\.(?:[02367]|1(?:4[4567]|8?0|13|79)?|5[0123]?|48?|83?)|6\.(?:1(?:6[012345]|3[346])|2(?:2[479]|32))|7\.(?:5[0234]|6[456]|9[678]|49)|8\.(?:1(?:4[457])?|3[2345]|0)|4\.96)|\.233))|3\.(?:16(?:2\.(?:6[47]|9[67]|77|80)|9\.182)|22\.(?:6?9|10|8))|8\.(?:68\.(?:2(?:4[89]|5[23])|1(?:66|92))|71\.(?:[89]|10))|5\.1(?:47\.(?:2(?:3[0127]|0[123]|29)|192)|86\.65)|9\.48\.19[23456789])|2(?:2\.1(?:6(?:8\.(?:[59]|2(?:1[012346789]?|0[01456789]|2[14568]?|4[014579]|5[0124]?|3[2467]|8)|1(?:68?|75|8)|3[01]|7[04]|68)|1\.(?:5[67]|68))|72\.1(?:1[234789]|2[3456]))|3\.2(?:7\.2(?:0[89]|1[46])|8\.14[01]))|8(?:(?:2\.48\.20|8\.135\.)2|3\.8(?:0\.134|7\.218)|9\.124\.31)|9(?:6\.12\.2(?:4[2345]|3[36])|4\.230\.146))|5(?:9\.(?:9(?:9\.(?:1(?:3[0123]|8[4567]|2[89]|5[23]|60?)|2(?:[456]|0[89]|10)|5[67]|40|64|72)|3\.(?:[0256789]|1(?:28|0)?|3[23459]?|4[01]?)|8\.(?:1(?:3[0126]|2[89]|[59]2|44)|200)|7\.(?:2(?:1[67]|2[45]|08|32)|176)|4\.(?:1(?:1[2345]|3[06]|42)|42))|164\.1?3)|8\.1(?:8(?:6\.21[6789]|7\.8)|0\.170))|2(?:1(?:3\.(?:1(?:08\.172|36\.121)|87\.76)|7\.(?:8\.2(?:25|36)|118\.90)|2\.23\.10[45])|0(?:2\.(?:1(?:52\.243|24\.89)|70\.5[489])|1\.191\.195|3\.171\.197)|21\.211\.143)|8(?:5\.26\.(?:1(?:6[45]|8[36])|2(?:3[2345]|41))|3\.149\.(?:2[18]|4[45]|3)|2\.1(?:32\.248|78\.69)|1\.192\.211|9\.232\.105)|41\.(?:1(?:40\.(?:8[67]|251|12|73)|89\.193)|2(?:54\.[0123]|23\.201|48\.40))|9(?:2\.39\.(?:65|77)|1\.203\.67|3\.85\.196)|78\.138\.17[01]|61\.19\.6[567])\.[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 # spam/ham s/o corpus # 0.5363/0 1.000 20100401 # 0.7486/0 1.000 20100402 # 0.7317/0 1.000 20100403 net run. min hosts 73->65 # 0.9316/0 1.000 20100406 # 0.9473/0 1.000 20100409 # 0.9545/0 1.000 20100410 net # 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@1 # spam/ham s/o corpus # 1.2645/0.0054 0.996 20100410 net # 1.1562/0.0058 0.995 20100417 net 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 # spam/ham s/o corpus # 1.0611/0.0009 0.999 20100410 net # 1.9539/0.0152 0.992 20100417 net 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 # spam/ham s/o corpus # 23.7686/0.0614 0.997 20100410 net # 22.2300/0.0616 0.997 20100417 net meta __KHOP_SPAMMY_SUBNET __KHOP_SPAMMY_CIDR24||__KHOP_SPAMMY_CIDR16 # est. 26.2/0.175@.993, floor: 24.5/0.5@.980, ceiling: 30.1/0.1@.997 # spam/ham s/o corpus # 25.6744/0.0677 0.997 20100410 net, beat estimated ceiling (for ham)! # 23.7846/0.0826 0.997 20100417 net, beat ceiling ham, but beat floor spam # 23.7505/0.1041 0.996 20100418 too much ham, nixing /8, new est. 3.0/.02@.993 # 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