## khop-sc-neighbors.cf v 2010041322 ## 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[45]|189|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 =~ /### KHOP_SC_CIDR16 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(?:2\.16[38]|3\.27)|18\.96|83\.87)|9(?:5\.133|2\.47)|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(?:3\.233\.64|7\.118\.82)|03\.8(?:2\.8[01]|7\.178))|11(?:8\.217\.216|3\.22\.69)|6(?:4\.187\.119|2\.95\.110)|8(?:9\.232\.105|3\.149\.3)|78\.138\.1(?:6[89]|71)|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(?:3[0127]|0[123]|29)|192)|1\.224\.250|2\.76\.5)|9(?:6\.12\.2(?:3[36]|4[45])|0\.104\.162)|73\.45\.96)|2(?:0(?:3\.82\.(?:9[234]|8[01])|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)|7(?:7\.232\.142|8\.138\.170|9\.106\.109|2\.21\.6)|6(?:1\.(?:19\.7|7\.23)1|2\.61\.164)|9(?:5\.129\.166|1\.203\.67)|41\.(?:140\.25|254\.)1)\.[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(?:83\.6(?:0\.253|2\.154)|49\.103\.238|61\.14\.132|7\.212\.73)|2(?:4\.150\.68|6\.67\.230|7\.80\.93)|41\.(?:171\.154|223\.167)|34\.154\.204|86\.207\.218|96\.68\.179)|5\.(?:1(?:8(?:2\.195\.212|9\.46\.253)|61\.(?:8\.1|9\.2)|38\.84\.213)|238\.191\.68|5\.41\.190)|3\.(?:1(?:0(?:7\.184\.192|8\.38\.228)|98\.8\.211)|200\.173\.154)|6\.1(?:\.209\.(?:69|83)|2\.226\.220)|4\.0\.252\.175)|2(?:1\.(?:1(?:\.(?:37\.14[67]|18\.244)|68\.226\.231|9\.41\.79)|7\.134\.61)|2\.(?:(?:252\.2(?:46\.23|34\.7)|166\.61\.13)4|34\.215\.210)|(?:5\.165\.106\.19|\.191\.88\.5)0|3\.140\.250\.254|4\.124\.43\.32)|1(?:5\.(?:1(?:18\.134\.54|40\.76\.100)|68\.53\.45)|9\.(?:226\.(?:161\.154|84\.218)|75\.19\.230)|(?:2\.221\.100\.17|8\.217\.216\.13)2|3\.(?:22\.69\.19|160\.2\.5)8|1\.224\.250\.1(?:3[034]|29))|73\.(?:45\.96\.(?:2(?:1[13459]|0[36])|19[37]|98)|1(?:61\.201\.15|2\.120\.21)7)|8(?:6\.24\.(?:1[69]|21)\.|9\.84\.174\.25)3|51\.(?:44\.239\.62|76\.20\.218)|63\.23\.104\.129)|2(?:0(?:0\.(?:1(?:1(?:6\.243\.197|7\.254\.129)|41\.87\.135)|3(?:2\.239\.139|\.170\.217)|6(?:8\.124\.169|\.193\.90)|95\.162\.200|80\.140\.61)|1\.(?:2(?:00\.178\.50|32\.107\.46)|1(?:0\.176\.43|44\.87\.36)|(?:59\.92\.24|43\.13\.8)6)|9\.(?:2(?:22\.0\.(?:1[29]|28|6)|54\.56\.106)|94\.196\.170)|2\.(?:144\.185\.170|42\.133\.58|75\.36\.72)|4\.(?:202\.250\.207|10\.139\.160)|3\.(?:126\.152\.242|59\.95\.113)|6\.48\.103\.222|7\.255\.89\.50)|1(?:3\.(?:1(?:98\.11(?:1\.207|2\.90)|63\.116\.2(?:26|30)|38\.90\.158|86\.47\.150)|226\.144\.65)|9\.(?:95\.(?:227\.218|148\.97|45\.81)|143\.134\.110)|1\.1(?:(?:91\.174\.14|08\.94\.7)1|71\.31\.100)|6\.(?:155\.3(?:8\.233|9\.14)|230\.133\.69)|(?:2\.63\.221\.1|8\.38\.29\.8)0|7\.(?:174\.229\.221|76\.2\.129)|0\.112\.121\.12)|2(?:2\.(?:12(?:4\.156\.231|0\.16\.15)|252\.223\.2)|1\.143\.46\.33))|6(?:1\.(?:1(?:00\.228\.61|9\.71\.74)|7\.2(?:31\.23|41\.7)0|247\.49\.142|9\.6\.245)|4\.(?:1(?:(?:20\.251\.18|64\.228\.20)6|87\.119\.[23])|70\.190\.10)|(?:9\.151\.79\.23|5\.163\.88\.9)8|0\.(?:49\.236\.137|51\.225\.213)|2\.(?:103\.171\.28|95\.110\.33)|7\.(?:115\.179\.198|217\.48\.9)|3\.253\.107\.166)|8(?:2\.(?:1(?:14\.(?:65|90)\.246|78\.173\.197|40\.91\.41)|75\.56\.80)|9\.2(?:11\.4(?:6\.218|7\.162)|48\.126\.206|32\.124\.80)|0\.(?:1(?:79\.231\.205|22\.70\.11)|93\.125\.186)|5\.1(?:75\.6\.123|54\.6\.71)|1\.192\.48\.62|6\.72\.93\.138|7\.117\.35\.15|4\.22\.56\.50)|7(?:7\.(?:1(?:20\.251\.37|92\.142\.63)|22\.162\.99|73\.139\.2)|8\.1(?:38\.169\.158|50\.110\.116)|(?:1\.49\.48\.25|5\.77\.187\.1)0|6\.2(?:27\.84\.105|52\.37\.46)|9\.(?:29\.110\.27|87\.57\.186)|2\.21\.6\.(?:24|81))|9(?:3\.(?:91\.196\.(?:132|99)|157\.148\.46)|(?:1\.150\.127\.9|4\.23\.203\.17)3|5\.(?:188\.80\.244|51\.121\.90)|8\.244\.54\.105|7\.66\.79\.81)|41\.(?:2(?:06\.61\.243|15\.18\.110|50\.251\.88)|1(?:41\.251\.126|90\.239\.178))|5(?:9\.(?:90\.214\.99|6\.146\.24)|8\.27\.196\.84))\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(?: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 # 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 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 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 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 # spam/ham s/o corpus # 25.6744/0.0677 0.997 20100410 net, beat estimated ceiling (for ham)! # 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