## khop-sc-neighbors.cf v 201008292 ## 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]|187|201)(?:\.[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|89|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 =~ /___ 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:\b(?:1(?:2(?:3\.2[67]|2\.168)|1(?:5\.240|7\.241)|90\.40)|2(?:17\.165|22\.253)|89\.122)(?:\.[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(?:(?:3\.233|8\.248)\.64|7\.118\.82)|01\.191\.198)|1(?:09\.(?:166\.136|95\.39)|78\.162\.225|15\.78\.81)|8(?:(?:1\.20\.10|5\.26\.23)4|3\.149\.21|0\.65\.16)|9(?:5\.1(?:29\.16|54\.11)|3\.186\.9)6|7(?:8\.138\.17[01]|7\.74\.36)|41\.137\.(?:24|56))\.[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(?:2(?:1(?:3\.(?:233\.64|87\.76)|7\.118\.(?:81|90)|1\.191\.174)|0(?:3\.(?:152\.2|82\.95)|6\.181\.8[3456]|9\.239\.47)|2(?:2\.124\.178|1\.143\.46))|8(?:5\.26\.(?:2(?:3[2345]|41)|1(?:8[36]|64))|3\.149\.(?:3[27]?|21|45)|1\.192\.2(?:15|38)|9\.232\.105|2\.178\.69)|1(?:1(?:3\.(?:91\.24[0123]|162\.77)|7\.241\.25[23]|1\.224\.250)|93\.231\.238|88\.135\.2)|5(?:9\.9(?:9\.(?:1(?:5[234]|28)|5[68])|7\.104)|8\.186\.(?:196|220))|7(?:7\.232\.14[23]|8\.138\.171)|41\.(?:254\.[01]|95\.4)|91\.203\.67|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(?:2(?:0(?:0\.(?:2(?:06\.211\.187|19\.245\.41|\.137\.250)|1(?:41\.87\.135|52\.113\.24)|42\.204\.155|80\.140\.61|67\.91\.47)|3\.(?:1(?:5(?:2\.28\.130|3\.39\.194)|7(?:3\.123\.98|4\.53\.170))|2(?:01\.181\.64|17\.176\.65))|1\.(?:1(?:16\.140\.246|44\.130\.21)|2(?:21\.185\.195|51\.250\.3))|2\.(?:144\.157\.69|86\.206\.230|28\.66\.251|75\.38\.205)|4\.(?:10\.1(?:39\.19[37]|41\.182)|8\.46\.130)|8\.(?:131\.186\.2|91\.133\.61)|5\.209\.97\.203|9\.239\.47\.205)|1(?:7\.(?:1(?:7(?:4\.232\.12|3\.21\.5)|65\.133\.65|16\.47\.8)|76\.2\.129)|1\.(?:1(?:(?:91\.174\.14|3\.204\.)1|52\.12\.114)|61\.34\.22)|3\.(?:1(?:36\.101\.3|68\.182\.9)7|226\.144\.65|79\.125\.122)|2\.(?:118\.142\.77|200\.237\.18|85\.103\.45|57\.208\.0)|8\.(?:2(?:48\.44\.196|08\.76\.98)|150\.243\.114)|0\.(?:212\.126\.39|91\.239\.10)|6\.246\.(?:16\.164|55\.131)|9\.253\.2(?:0\.10|5\.13)0)|2(?:2\.(?:12(?:4\.178\.158|2\.157\.90)|252\.223\.2)|1\.1(?:43\.46\.33|66\.193\.5)|0\.231\.(?:69\.1[34]|127\.9))|4\.187\.205\.186)|1(?:9(?:5\.(?:2(?:2(?:5\.53\.57|\.104\.8)|09\.228\.70)|16(?:1\.(?:40\.10|9\.2)|0\.253\.4)|9(?:3\.160\.193|5\.223\.18)|46\.161\.21)|3\.(?:1(?:5(?:1\.12\.149|8\.99\.86)|07\.184\.193)|23(?:\.122\.106|1\.238\.4)|33\.187\.94)|6\.(?:2(?:01\.207\.183|9\.215\.6)|12\.236\.4)|0\.27\.251\.140|4\.146\.197\.5)|1(?:5\.(?:24(?:8\.(?:143\.99|56\.145)|0\.255\.254)|11(?:3\.(?:57\.139|228\.2)|8\.2\.218)|64\.110\.139)|9\.(?:(?:46\.164\.22|93\.114\.6)6|77\.210\.144)|8\.(?:102\.203\.115|69\.216\.102)|1\.224\.250\.1(?:3[02345]|29)|7\.(?:239\.20\.3|3\.4\.132)|4\.111\.197\.185|6\.0\.7\.2)|2(?:4\.(?:1(?:05\.61\.122|58\.110\.64)|217\.198\.141|83\.63\.203)|2\.(?:5(?:4\.185\.3|5\.48\.1)8|252\.2(?:46\.23|34\.7)4)|5\.(?:16\.133\.65|20\.82\.198|46\.41\.66)|1\.1(?:83\.97\.66|26\.95\.1)|3\.(?:19\.2\.13|27\.79\.1)1)|09\.(?:1(?:66\.1(?:36\.[04567]|28\.[04])|54\.240\.19)|228\.69\.24)|7(?:4\.139\.134\.226|8\.162\.225\.253)|86\.24\.(?:1[6789]|2[013])\.3|59\.148\.96\.251)|8(?:2\.1(?:1(?:4\.(?:7(?:6\.210|2\.62)|6(?:5\.246|9\.1))|7\.252\.136)|93\.140\.168|40\.91\.41)|9\.(?:161\.1(?:41\.147|99\.235|58\.80)|2(?:16\.194\.185|3\.134\.149))|3\.(?:1(?:42\.111\.228|6\.167\.14)|237\.74\.19)|6\.(?:1(?:09\.194\.22|80\.32\.196)|8\.221\.27)|1\.2(?:0\.104\.173|18\.174\.37)|4\.2(?:47\.178\.174|2\.48\.187)|5\.1(?:13\.210\.10|8\.214\.213)|7\.2(?:26\.242\.7|35\.18\.30)|0\.65\.16\.71)|9(?:1\.(?:1(?:9(?:(?:5\.136\.1|3\.199\.)4|9\.115\.110)|49\.173\.2)|207\.244\.1)|4\.(?:1(?:89\.212\.1|75\.1\.)9|30\.208\.4)8|5\.(?:154\.116\.22|20\.53\.159)|3\.(?:126\.15\.4|91\.196\.9)9)|7(?:6\.(?:161\.241\.115|212\.39\.233)|8\.(?:138\.170\.173|40\.254\.1)|0\.108\.253\.223|4\.198\.15\.16|7\.93\.96\.240|2\.54\.21\.45)|6(?:6\.96\.255\.7[12]|7\.166\.132\.217|1\.57\.32\.195|4\.70\.190\.10|8\.113\.3\.246)|41\.(?:1(?:37\.(?:24|30|56)\.4|41\.255\.22)|208\.116\.131)|58\.148\.33\.133)\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(?:0\.(?:1(?:7[012346789]|9[2345678]|8[012345]|4[456]|6\d)|2(?:1[0123456]|2[456]|0[89]|42)|9[68]|33|59)|4\.(?:1(?:6[012345678]|4[45])|2(?:2[56]|4[01]))|5\.(?:[05]|1(?:2[89]|4[45]|60?|31|7)?)|1\.(?:5[01]|112|65)|3\.[123]|6\.144)|4(?:1\.(?:2(?:(?:4?|2)4|5[234]|0[12]|3[23])|1(?:7[67]?|1[23]|[59]2|28|36|44)|8[0123]?|64)|2\.(?:1(?:4[04]|04|32|96)?|8[045]?|4[04]|24?8|0)))|19(?:5\.(?:[03]|1(?:0[0123456]|1)?|7[0123456]|6[456789]|9[6789])|9\.(?:1(?:1[2345689]|7?9|21|47)|4[89]|5\d|60)|6\.(?:2(?:3[123457]|2[45679]|17)|179)|8\.(?:9[012345]|3[234]|8\d|73|1)|7\.(?:6[456]|9[68]|20|1)))|3\.(?:1(?:6(?:2\.(?:2(?:2[45789]|4[0345]|3[478]|1[67])|1(?:3[189]|4[23]|01)|7[679]|9[678]|6[47]|56|87)|9\.(?:1(?:0[012389]|8[0123]|10|52)|9[012345]|3[28]|8[89])|6\.(?:[358]|1[0345]?)|8\.(?:1(?:28|43)|6?5)|7\.(?:168|81))|70\.1(?:08|35|54)|85\.1)|22\.[89])|8\.(?:68\.(?:1(?:9[236]|2[12])|2(?:4[89]|5[23]))|71\.[89])|5\.1(?:47\.(?:2(?:0[123]|3[012]|29)|192)|86\.65))|2(?:2\.1(?:6(?:8\.(?:[48]|2(?:[67]|0[12679]?|2[1358]?|1[126]?|3[19]?|5[15]?|45?)|1(?:[289]|7[245]|6?5)|6[89]?|[37]1)|1\.1(?:92?|30|8)|3\.34)|76\.153)|3\.(?:2(?:8\.(?:1(?:4[0123]|90)|236|30)|7\.(?:8[36]|103)|2\.5[24])|18\.152)|0\.6(?:0\.(?:[034567]|1(?:29|32))|1\.(?:[0478]|13|22)|2\.167))|8(?:3\.8(?:(?:0\.13|1\.5)2|7\.198)|8\.135\.2)|9(?:0\.110\.155|4\.230\.146)|78\.122\.36)|5(?:9\.(?:9(?:5\.(?:[089]|2[012345679]?|1[01345689]?|7[01234569]?|5[012345]?|6[456789]?|4[679]?|3\d?)|9\.(?:1(?:[36][01]|5[2345]|2[89]|44)|2(?:0[89]|10|5)|5[6789]|7[23]|32|40)|7\.(?:2(?:1[01678]|0[89])|1(?:9[23]|04))|8\.1(?:6[018]|[59]2|44|76)|4\.74)|164\.[03])|8\.18(?:6\.(?:2(?:1[6789]|20)|1(?:9[67]|4))|7\.8))|2(?:0(?:3\.(?:1(?:71\.19[67]|28\.250|92\.224|52\.2)|210\.197|82\.95)|2\.(?:1(?:24\.(?:73|89)|52\.243)|90\.102))|1(?:7\.(?:8\.2(?:25|36)|118\.90)|3\.(?:108\.172|87\.76)|2\.23\.10[45])|22\.25(?:3\.(?:1(?:7[79])?|29|30)|4\.(?:217|73)|2\.245))|8(?:5\.26\.(?:1(?:6[45]|8[36])|2(?:3[2345]|41))|3\.149\.(?:3[27]?|4[345]|2[18])|9\.2(?:04\.1(?:37|53)|32\.105)|2\.1(?:32\.248|78\.69)|1\.192\.2(?:15|38))|9(?:2\.39\.(?:7[01]|65)|1\.203\.67)|7(?:8\.138\.17[01]|7\.232\.142)|41\.(?:254\.[012]|95\.[248])|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