## khop-sc-neighbors.cf v 201012261 ## 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|88|90)|94)(?:\.[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|78)|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 # 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 =~ /___ FAILED TO POPULATE ___/ 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:\b1(?:13\.(?:169|22)|23\.26)(?:\.[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(?:21(?:(?:3\.(?:233\.6|87\.7)|8\.248\.6)4|7\.118\.(?:8[12]|93))|8(?:5\.26\.(?:2(?:3[234]|25)|165)|9\.232\.105|0\.83\.238)|1(?:09\.172\.40|13\.162\.77|78\.49\.255)|41\.137\.(?:24|63)|77\.232\.14[23])\.[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(?:8(?:5\.26\.(?:1(?:6[45]|8[36])|2(?:3[2345]|41))|3\.149\.(?:3[68]?|2[18]|4[16])|1\.192\.(?:2(?:11|38)|199)|(?:0\.83\.23|2\.178\.6)9)|2(?:1(?:7\.(?:118\.(?:83|90)|8\.2(?:25|36)|66\.146)|3\.(?:2(?:26\.63|33\.64)|87\.74))|03\.(?:152\.2|82\.95))|1(?:1(?:3\.(?:162\.(?:(?:24|5)6|67)|30\.110)|2\.196\.252)|78\.49\.255|95\.91\.70)|6(?:1\.19\.6[67]|4\.187\.113)|9(?:1\.203\.67|8\.139\.91)|41\.(?:254\.[01]|95\.4)|79\.106\.109)\.[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(?:2(?:1(?:6\.(?:1(?:57\.1(?:4(?:6\.(?:128|64)|8\.2)|5(?:0\.(?:64|2)|4\.192))|07\.108\.158|66\.222\.146)|81\.7(?:3\.(?:128|2)|0\.(?:64|2)|1\.64|2\.2))|2\.(?:1(?:(?:74\.227\.10|46\.157\.1)0|16\.164\.2|99\.76\.14)|(?:31\.116\.2|66\.127\.)17|52\.129\.193|71\.150\.146)|0\.(?:2(?:45\.234\.130|12\.163\.42)|115\.223\.46|91\.239\.10)|3\.(?:123\.138\.237|39\.250\.139|85\.132\.98)|1\.(?:147\.3\.74|58\.59\.73)|8\.248\.44\.196|7\.195\.206\.2)|0(?:0\.1(?:5(?:0\.182\.165|2\.113\.24)|23\.133\.73)|1\.(?:30\.239\.114|144\.87\.45|251\.250\.3)|2\.1(?:52\.194\.129|02\.194\.78)|3\.217\.1(?:76\.6|47\.)5|6\.193\.200\.47|8\.86\.229\.129|4\.8\.46\.130|7\.212\.4\.26)|2(?:2\.(?:1(?:28\.203\.214|79\.44\.11)|252\.223\.2)|0\.231\.69\.13)|4\.1(?:06\.153\.180|51\.126\.203|30\.222\.58))|1(?:9(?:5\.(?:1(?:6(?:1\.(?:40\.10|8\.1|9\.2)|0\.253\.4)|91\.104\.135|38\.78\.124|89\.46\.246)|210\.138\.143|82\.172\.28)|(?:3\.(?:107\.18|239\.4)4\.19|2\.115\.132\.)3|4\.1(?:26\.180\.118|65\.147\.23|35\.105\.1)|(?:0\.127\.249\.12|6\.201\.207\.19)1)|1(?:3\.1(?:62\.2(?:18\.196|37\.30)|2\.124\.138)|5\.(?:78\.0\.207|93\.12\.20)|1\.224\.250\.13[45]|9\.207\.27\.230|4\.32\.89\.43|7\.3\.4\.129)|2(?:(?:1\.52\.158\.24|2\.252\.234\.7)5|3\.(?:192\.245\.137|27\.79\.11)|4\.1(?:58\.110\.64|24\.43\.32)|\.197\.249\.232|5\.20\.82\.196)|7(?:3\.(?:166\.141\.252|31\.40\.229|9\.205\.197)|8\.(?:49\.255\.104|32\.64\.195)|4\.26\.118\.219|5\.115\.92\.120)|8(?:6\.81\.105\.238|9\.10\.85\.30)|68\.187\.(?:24\.98|95\.74)|40\.135\.131\.202|\.53\.11\.59)|8(?:9\.(?:(?:2(?:12\.48\.16|51\.226\.1)|121\.184\.10)6|87\.248\.42)|4\.(?:1(?:25\.128\.173|5\.191\.254)|255\.203\.15|50\.200\.53)|7\.(?:6(?:9\.211\.75|8\.81\.32)|(?:126\.253|25\.52)\.24)|8\.(?:162\.180\.223|255\.153\.106|59\.66\.58)|2\.(?:193\.140\.168|239\.185\.75)|0\.1(?:22\.199\.138|79\.118\.46)|3\.1(?:42\.111\.228|7\.92\.220)|5\.(?:152\.84\.43|72\.55\.104)|1\.52\.167\.38|6\.98\.23\.121)|7(?:6\.(?:1(?:61\.241\.115|05\.19\.41)|0\.149\.219|3\.133\.86)|0\.(?:108\.253\.223|43\.129\.162|91\.160\.186|28\.8\.154)|1\.(?:230\.221\.79|63\.145\.180|54\.77\.97|16\.3\.38)|7\.(?:(?:125\.134\.14|78\.190\.13)7|221\.143\.163)|2\.(?:(?:150\.234\.6|2\.203\.4)4|54\.21\.45)|4\.(?:120\.242\.146|206\.27\.160|50\.95\.17)|8\.(?:128\.57\.66|42\.238\.34)|5\.(?:148\.7\.17|75\.168\.5))|6(?:7\.(?:(?:62\.168\.25|88\.172\.20)0|2(?:10\.160\.2|40\.57\.48)|189\.214\.92)|9\.(?:1(?:(?:99\.164\.22|81\.6\.3)2|36\.55\.210|5\.194\.153)|64\.155\.181)|5\.(?:18(?:3\.197\.46|5\.130\.79)|96\.162\.50)|8\.(?:204\.69\.158|52\.244\.12|67\.95\.89)|4\.(?:187\.113\.23[04]|50\.151\.101)|2\.(?:214\.127\.148|33\.218\.49)|6\.(?:64\.245\.254|30\.67\.130))|9(?:1\.(?:1(?:9(?:5\.(?:(?:230\.1|61\.16)3|136\.14)|3\.199\.4)|21\.175\.20|42\.173\.11)|21(?:0\.87\.206|4\.83\.2))|(?:2\.103\.162\.25|7\.102\.164\.22)2|(?:3\.126\.15\.4|5\.62\.161\.6)9|9\.1(?:1\.169\.198|89\.245\.70)|4\.2(?:45\.156\.33|3\.60\.124)|8\.197\.233\.144|6\.40\.187\.226)|41\.(?:137\.(?:(?:2[04]|56)\.4|63\.20[123])|206\.13\.3))\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(?:9\.15(?:9\.(?:2(?:1[0123689]|0[149]|2[123])|19[279])|5\.(?:3[478]|4[26]|23)|3\.9[34]?)|6\.71\.(?:[578]|1(?:[0289]|4[5678]|5[01]?)?|2(?:[369]|16?)?|63?|32|44)|3\.1(?:62\.(?:2(?:[23]8|46)|6[57]|9[67]|100|56|77)|0\.168)|7\.2(?:00\.192|41\.248)|0\.49\.(?:193|205))|25\.23(?:4\.144|5\.192)|88\.135\.2|95\.91\.70)|8(?:5\.26\.(?:1(?:6[45]|8[36])|2(?:3[2345]|41))|3\.149\.(?:3[68]?|2[18]|4[16])|9\.2(?:04\.1(?:37|53)|32\.105)|1\.192\.(?:2(?:1[15]|38)|199)|(?:0\.83\.23|2\.178\.6)9)|2(?:1(?:7\.(?:8\.2(?:3[68]|25)|118\.(?:83|90)|66\.146)|3\.87\.(?:8[01789]|9[012]|74))|0(?:3\.(?:152\.2|82\.95)|2\.152\.243))|41\.(?:95\.(?:[48]|12)|254\.[0123])|6(?:1\.19\.6[567]|6\.87\.[08])|59\.9(?:9\.15[234]|7\.217)|77\.232\.14[23])\.[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