## khop-sc-neighbors.cf v 20110241 ## 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|87)|201|95)(?:\.[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:\b1(?:17|78|89|90)(?:\.[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(?:1(?:0\.139|8\.96)|89\.104)(?:\.[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(?:1(?:7(?:3\.245\.79|8\.49\.255)|13\.1(?:62\.237|0\.162)|01\.78\.31)|21(?:(?:3\.233|8\.248)\.64|7\.118\.81|1\.147\.3)|7(?:7\.232\.14[23]|2\.46\.153|4\.50\.94)|6(?:3\.246\.15|2\.183\.8)5|95\.1(?:29\.166|54\.240)|83\.149\.21)\.[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\.(?:2(?:26\.63|33\.64)|87\.(?:136|74))|7\.(?:118\.(?:83|90)|66\.146|8\.225))|0(?:9\.212\.153|5\.209\.97|3\.82\.95))|8(?:5\.26\.(?:2(?:3[2345]|41)|1(?:6[45]|83))|1\.192\.2(?:11|38)|3\.149\.(?:21|3)|2\.178\.69)|1(?:1(?:3\.(?:10\.16[27]|61\.63)|4\.112\.244)|95\.(?:161\.9|91\.70)|21\.54\.54)|41\.(?:254\.[012]|137\.24)|9(?:1\.203\.67|8\.139\.91)|79\.106\.109|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(?:5\.(?:1(?:6(?:0\.253\.4|1\.9\.2)|4\.0\.197|55\.1\.55)|95\.2\.245)|4\.(?:150\.113\.81|24\.174\.44)|0\.1(?:06\.130\.14|2\.80\.15)0|8\.106\.183\.189|6\.40\.84\.102)|8(?:8\.(?:(?:154\.157\.10|72\.196\.11)4|2(?:07\.130\.206|\.207\.93)|62\.69\.142)|9\.(?:4(?:2\.32\.210|5\.36\.38)|220\.47\.19)|7\.(?:45\.193\.174|66\.26\.141))|7(?:3\.(?:2(?:45\.79\.1(?:1[67]|09)|10\.25\.146|0\.18\.105)|10\.15\.253)|8\.(?:32\.(?:64\.195|80\.50)|22\.55\.93)|4\.121\.154\.16)|2(?:4\.(?:241\.255\.37|124\.43\.32)|\.1(?:55\.164\.16|99\.5\.)2|8\.121\.191\.18[12]|2\.252\.234\.75)|1(?:1\.(?:224\.250\.135|68\.108\.200)|6\.109\.172\.165|3\.162\.237\.59)|09\.2(?:28\.251\.225|37\.216\.117)|47\.236\.238\.10)|2(?:0(?:1\.(?:2(?:32\.85\.222|2\.56\.36)|(?:0\.105\.1|76\.50\.)44)|2\.(?:1(?:86\.96\.91|90\.70\.85)|28\.24\.99|64\.77\.93)|9\.(?:2(?:12\.153\.2(?:13|20)|0\.71\.184)|97\.216\.173)|0\.(?:234\.220\.32|98\.246\.205|80\.13\.66)|3\.(?:211\.134\.88|86\.10\.236)|5\.209\.97\.1(?:[57]3|17)|6\.188\.209\.18|7\.57\.124\.67)|1(?:7\.(?:1(?:1(?:5\.195\.160|8\.128\.95)|2\.160\.22)|2(?:1\.247\.8|3\.48\.)2)|0\.(?:1(?:22\.170\.6|\.58\.182)|245\.85\.179|48\.154\.253)|2\.(?:1(?:46\.157\.10|99\.29\.145)|67\.210\.18)|3\.(?:251\.168\.216|181\.48\.24)|1\.(?:202\.2\.178|147\.3\.74)|8\.248\.44\.196|9\.255\.47\.215)|22\.252\.223\.2|4\.151\.19\.203)|8(?:9\.(?:2(?:00\.169\.108|22\.240\.66|55\.61\.93)|1(?:87\.251\.168|23\.41\.124))|7\.(?:1(?:06\.(?:251\.156|81\.103)|18\.100\.98|26\.253\.24)|230\.27\.184)|8\.(?:1(?:9(?:0\.12\.240|1\.78\.136)|62\.180\.223)|255\.153\.106)|3\.(?:1(?:(?:68\.104\.7|73\.164\.1)0|42\.111\.228)|96\.132\.20)|2\.(?:193\.140\.168|223\.117\.224|67\.238\.180)|5\.(?:25\.1(?:35\.200|48\.243)|17\.91\.123)|4\.(?:15\.191\.254|242\.134\.37)|0\.(?:95\.70\.173|65\.16\.71)|6\.(?:111\.21\.168|36\.49\.1)|1\.0\.233\.90)|6(?:8\.(?:(?:5(?:4\.111\.13|8\.19\.18)|45\.227\.11)0|1(?:51\.32\.176|90\.19\.57)|62\.124\.151)|2\.(?:(?:212\.216\.24|83\.172\.15)9|1(?:49\.36\.40|\.206\.139)|62\.237\.148)|9\.(?:1(?:99\.164\.222|36\.55\.210)|64\.(?:155\.181|43\.148)|36\.181\.87)|1\.(?:19\.2(?:49\.216|50\.44)|67\.246\.2(?:26|37)|221\.67\.9[46])|6\.(?:1(?:43\.148\.249|63\.30\.180|73\.27\.214)|240\.255\.8)|0\.(?:199\.201\.120|234\.72\.175)|3\.246\.155\.(?:21[47]|44)|4\.148\.129\.140|5\.183\.197\.46|7\.67\.202\.194)|7(?:4\.(?:5(?:0\.(?:27\.125|94\.234|85\.16)|5\.84\.98)|208\.167\.179|86\.134\.138)|7\.(?:2(?:2(?:8\.214\.52|1\.71\.99)|43\.231\.55)|9(?:2\.159\.102|3\.222\.5))|2\.(?:4(?:6\.153\.2(?:2[01]|19)|7\.254\.50)|(?:3\.247\.10|52\.186\.6)0)|6\.(?:21\.49\.149|30\.91\.104)|0\.(?:45\.101\.42|25\.46\.60)|5\.126\.237\.130)|9(?:5\.(?:1(?:73\.163\.206|54\.240\.98)|48\.104\.170|62\.161\.69)|1\.1(?:21\.(?:80\.194|28\.86|9\.8)|37\.131\.53)|4\.(?:23(?:6\.202\.13|\.245\.124)|102\.209\.94)|3\.(?:1(?:25\.40\.15|90\.104\.7)|91\.196\.99)|8\.(?:142\.216\.4|206\.90\.15)1|2\.103\.162\.252|6\.226\.4\.60)|4(?:1\.137\.(?:(?:24|30|56)\.4|63\.203)|6\.17\.121\.1)|5(?:8\.15(?:8\.161\.236|0\.55\.59)|9\.158\.239\.2))\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(?:4(?:1\.(?:248|64|80)|2\.28)|00\.1(?:7[78]|82|94))|3\.1(?:62\.2(?:2[589]|4[46]|38)|0\.16[269])|0\.49\.(?:193|205)|4\.112\.244)|2(?:(?:1\.101\.2|2\.55\.1)06|5\.23(?:4\.144|5\.192))|9(?:0\.110\.155|6\.202\.214|5\.91\.70)|8(?:8\.146\.(?:127|255)|0\.149\.8))|2(?:1(?:3\.(?:87\.(?:1(?:14|28|36)|8[0189]|9[012]|7[46])|1(?:08\.173|62\.68)|226\.63)|7\.(?:8\.2(?:3[68]|25)|118\.(?:83|90)|66\.146)|8\.156\.80)|0(?:(?:1\.191\.1|3\.82\.)95|2\.152\.243|0\.85\.24))|8(?:5\.(?:26\.(?:1(?:6[45]|8[36]|55)|2(?:3[2345]|41))|115\.248)|3\.149\.(?:[89]|3[2678]?|4[1456]|2[18])|1\.192\.(?:2(?:1[15]|38)|199)|9\.204\.1(?:37|53)|0\.83\.23[89]|2\.178\.69)|59\.9(?:9\.(?:1(?:5[234]|2[89]|30)|56)|8\.152)|41\.(?:95\.(?:[48]|12)|254\.[012])|6(?:1\.19\.6[567]|6\.87\.0)|9(?:5\.107\.19|1\.203\.6)7)\.[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