## khop-sc-neighbors.cf v 201009212 ## 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|78|89)|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|90)|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:\b(?:1(?:1(?:5\.240|8\.96)|23\.27)|78\.96)(?:\.[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(?:0(?:3\.(?:144\.136|217\.145)|1\.191\.198|2\.129\.235)|1(?:7\.(?:118\.8[123]|66\.146)|3\.(?:233|87)\.64))|6(?:4\.187\.118|6\.118\.177|9\.172\.199)|8(?:7\.252\.227|3\.149\.21|5\.26\.235)|7(?:8\.138\.17[01]|7\.74\.36)|9(?:5\.129\.166|1\.203\.67)|121\.78\.236|41\.254\.1)\.[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(?:7\.(?:8\.2(?:25|36)|118\.90)|3\.(?:233\.64|87\.76)|8\.248\.64)|0(?:3\.(?:152\.2|82\.95)|9\.(?:55\.0|62\.7)|2\.152\.243)|21\.143\.46)|8(?:5\.26\.(?:1(?:6[45]|8[36])|2(?:3[2345]|41))|3\.149\.(?:3[27]?|4[345]|21)|1\.192\.2(?:15|38)|9\.232\.105|2\.178\.69)|1(?:1(?:3\.162\.(?:6[47]|100|245|77|96)|1\.224\.250)|09\.166\.128|74\.137\.41|88\.135\.2)|7(?:7\.232\.14[23]|8\.138\.171|9\.106\.109)|9(?:(?:5\.154\.11|3\.186\.9)6|2\.39\.7[19])|41\.(?:254\.[01]|95\.4)|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(?:1(?:7\.(?:1(?:7(?:4\.232\.11|3\.21\.5)|16\.47\.8|6\.4\.31)|76\.2\.129|26\.6\.96)|2\.(?:11(?:8\.142\.7[67]|1\.203\.180)|57\.143\.163|85\.103\.45|45\.2\.110)|3\.1(?:(?:98\.113\.14|38\.94\.13)4|8(?:8\.130\.113|4\.224\.44))|8\.(?:1(?:58\.156\.103|45\.71\.242)|248\.44\.196)|1\.(?:2(?:24\.129\.18|02\.2\.6)0|13\.204\.1)|0\.122\.170\.6|6\.157\.146\.2)|0(?:0\.(?:1(?:07\.125\.82|41\.87\.135)|234\.200\.240|80\.140\.61)|9\.(?:62\.7\.(?:7[26]|8[37])|239\.47\.205|55\.0\.170)|1\.(?:1(?:16\.140\.246|44\.130\.21)|251\.250\.3)|3\.14(?:6\.252\.241|4\.136\.7)|2\.(?:145\.138\.5|29\.52\.12)|4\.10\.1(?:39\.194|41\.183)|8\.131\.186\.2)|2(?:2\.(?:2(?:36\.47\.95|52\.223\.2)|122\.157\.90)|0\.(?:231\.69\.13|82\.69\.24)|1\.143\.46\.33))|1(?:9(?:4\.(?:1(?:26\.180\.1(?:19|0)|58\.206\.(?:54|90)|35\.105\.232|70\.16\.85)|50\.(?:1(?:16\.29|25\.38)|9\.114)|44\.21\.49|79\.63\.86)|5\.(?:1(?:6(?:1\.(?:40\.10|8\.1|9\.2)|0\.253\.4)|82\.194\.(?:195|223)|28\.230\.126)|2(?:30\.(?:180\.15|99\.2)0|22\.127\.19))|3\.(?:1(?:7(?:8\.147\.164|\.253\.13)|07\.184\.193)|239\.44\.190|40\.160\.32)|0\.4\.15\.58)|1(?:5\.(?:248\.56\.1(?:37|45)|117\.35\.158)|1\.224\.250\.13[234]|8\.165\.204\.209|6\.0\.7\.2)|2(?:1\.(?:78\.236\.47|1\.18\.242|50\.16\.11)|2\.252\.2(?:46\.23|34\.7)4|4\.232\.147\.10)|7(?:8\.(?:217\.208\.2|32\.64\.195)|4\.137\.41\.2(?:3[239]|28|49))|09\.(?:166\.128\.[01234567]|95\.192\.131)|88\.95\.51\.1(?:35|48)|63\.21\.100\.4)|8(?:9\.(?:1(?:61\.1(?:41\.147|99\.235|58\.80)|89\.169\.1[34])|2(?:0(?:0\.152\.10|8\.157\.59)|51\.107\.35)|74\.3\.215)|2\.(?:1(?:14\.(?:76\.210|89\.164)|93\.140\.16[48]|40\.91\.41)|76\.132\.177)|0\.(?:9(?:5\.70\.173|7\.51\.66)|235\.105\.140|65\.16\.71)|3\.(?:1(?:42\.111\.228|6\.195\.134)|234\.113\.116)|7\.2(?:52\.227\.(?:8[48]|[37]2|4?4|56)|26\.242\.7)|5\.(?:17\.3\.215|43\.241\.1)|4\.15\.191\.254|1\.88\.212\.2|6\.98\.9\.137)|9(?:1\.(?:1(?:9(?:5\.(?:230\.1[14]|136\.14)|3\.(?:34\.147|199\.4)|8\.175\.252)|21\.118\.218|87\.103\.60|49\.173\.2)|2(?:07\.(?:210\.46|42\.25)|15\.220\.2))|4\.(?:2(?:3\.219\.101|45\.156\.33|51\.108\.19)|1(?:88\.32\.73|02\.5\.20))|3\.(?:9(?:5\.168\.122|1\.196\.99)|113\.162\.195)|2\.243\.17\.222|5\.62\.150\.86)|6(?:6\.(?:11(?:8\.177\.19[378]|\.122\.27)|235\.160\.43)|9\.1(?:72\.199\.1(?:6[78]|7[26])|42\.92\.194)|2\.(?:141\.122\.146|75\.221\.65)|4\.1(?:5\.147\.204|87\.118\.71)|1\.1(?:39\.151\.18|9\.252\.89)|5\.254\.56\.162|7\.220\.196\.18)|7(?:(?:6\.161\.241\.11|2\.54\.21\.4)5|7\.2(?:24\.185\.117|39\.236\.193)|8\.111\.47\.(?:10|6)|0\.108\.253\.223)|41\.137\.(?:(?:24|30|56)\.4|63\.20[123])|38\.112\.60\.242|59\.18\.64\.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(?:7\.(?:2(?:0(?:0\.(?:1(?:9[2345678]|7[06789]|8[0123]|4[456]|6\d)|2(?:1[0123456]|0[89]|24)|34|97)|4\.1(?:6[01257]|4[45])|5\.(?:1(?:00|44|6)|21)|1\.4[89])|4(?:1\.(?:2(?:5[234]|1[67]|4[04]|00|24|32)|1(?:[37]?6|2?8|12|44)?|8[0128]|6[45]|48)|2\.(?:1(?:4[014]|12|96)?|(?:24?)?8|4?0)))|19(?:9\.(?:1(?:8[01]|16|20|45|79|93)|5[0123456]|4[89]|86)|8\.(?:[01]|9[01234]|3[234]?|5[01]|8\d)|6\.(?:2(?:2[458]|12)|34)|7\.(?:6[4567]|96|3)|5\.(?:7[24]|67)|4\.96)|6\.8[06])|3\.(?:1(?:6(?:2\.(?:2(?:2[45789]|3[04789]|4[03456]|1[67])|1(?:2[034678]|3[2389]|0[01])|7[014679]|9[0678]|6[457]|8[037]|56)|9\.1(?:8[0123]|0[48]|11|53)|8\.1(?:4[0123]|2[89]|36)|7\.(?:11)?1)|85\.1)|22\.6?8)|8\.(?:68\.(?:1(?:2[01]|9[26])|2(?:4[89]|53))|71\.[89])|5\.147\.(?:2(?:0[123]|3[012]|29)|192)|6\.109\.156|0\.49\.193|4\.79\.142)|2(?:2\.16(?:8\.(?:2(?:1[05]|08?|29|31)|1[279]|69)|3\.184)|0\.6(?:0\.[17]|1\.23)|3\.28\.14[03])|8(?:3\.8(?:0\.1(?:3[1235]|29|77)|1\.112|7\.198)|0\.194\.[01]|8\.135\.2)|78\.12(?:3\.(?:3[25]|24|42)|2\.200)|9(?:0\.110\.155|4\.230\.146))|5(?:9\.(?:9(?:9\.(?:1(?:5[2345]|2[89]|30)|5[6789]|4[08]|[37]2|208)|7\.(?:2(?:1[0678]|0[89])|192)|5\.(?:6[4578]|7[013]|13|28)|8\.1(?:6[01]|9[23]|44|52)|4\.113)|164\.[28])|8\.18(?:6\.(?:2(?:1[6789]|20)|1(?:9[67]|4))|7\.8))|2(?:1(?:3\.(?:1(?:08\.172|32\.255)|87\.(?:194|76|88))|7\.(?:8\.2(?:25|36)|118\.90|66\.146)|2\.23\.10[45]|8\.248\.64)|22\.25(?:3\.(?:1(?:77)?|2[4578]?|30)|2\.244|4\.78)|0(?:3\.(?:1(?:28\.250|52\.2)|82\.95)|2\.152\.243))|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)|1\.192\.2(?:15|38)|2\.178\.69)|41\.(?:2(?:54\.[0123]|02\.199)|95\.[248])|9(?:2\.39\.(?:7[019]|65)|1\.203\.67)|7(?:7\.232\.14[23]|8\.138\.17[01])|6(?:1\.19\.6[567]|2\.24\.127))\.[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