## khop-sc-neighbors.cf v 20101192 ## 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(?:13|89)|59|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|90)|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(?:1(?:3\.22|8\.96)|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(?:2(?:0(?:9\.(?:144\.30|51\.134)|3\.217\.145|7\.57\.122)|1(?:3\.233\.64|7\.118\.82|2\.1\.113)|7\.96\.1[45]9|22\.124\.178)|1(?:7(?:3\.236\.119|4\.122\.105)|25\.162\.243|94\.170\.16)|9(?:5\.129\.166|1\.203\.67)|8(?:9\.232\.105|3\.149\.3)|64\.187\.98)\.[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))|(?:0\.83\.23|2\.178\.6)9|3\.149\.(?:2[18]|36?|45)|1\.192\.2(?:11|38))|2(?:1(?:7\.(?:8\.2(?:25|36)|118\.90|66\.146)|8\.248\.64|3\.87\.76)|0(?:3\.(?:152\.2|82\.95)|8\.82\.115)|7\.96\.189)|1(?:1(?:3\.162\.(?:246|67)|1\.224\.250)|8(?:4\.154\.95|8\.135\.2)|94\.135\.105|74\.137\.41)|7(?:4\.(?:117\.211|50\.95)|7\.232\.14[23]|9\.106\.109)|6(?:7\.230\.174|4\.244\.62|1\.19\.66|9\.65\.59)|41\.(?:254\.[01]|95\.4)|98\.139\.91)\.[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(?:1\.(?:40\.10|8\.1|9\.2)|0\.253\.4)|82\.129\.182|35\.237\.20)|209\.228\.70)|3\.(?:107\.184\.193|238\.209\.1)|4\.1(?:35\.105\.1|70\.16\.85)|6\.201\.207\.185|9\.236\.117\.210|0\.69\.155\.99)|2(?:1\.(?:52\.15(?:8\.245|2\.2)|35\.174\.114)|4\.1(?:72\.200\.236|24\.43\.32)|2\.252\.234\.74|5\.20\.82\.195|3\.27\.79\.11)|1(?:1\.(?:224\.250\.1(?:3[012345]|29)|68\.108\.200)|3\.162\.237\.103|5\.178\.61\.34|8\.96\.24\.127)|7(?:4\.1(?:37\.41\.2(?:4[18]|5[24]|38)|22\.105\.66)|3\.236\.119\.(?:2\d|19|30)|8\.32\.64\.195)|8(?:4\.154\.(?:95\.2(?:4[789]|3[24]|5[23])|41\.57)|8\.138\.56\.208|2\.18\.31\.79)|63\.2(?:0\.(?:66\.202|94\.130|8\.5)|1\.100\.4)|59\.148\.96\.251)|2(?:0(?:0\.(?:2(?:19\.168\.178|34\.200\.116)|1(?:08\.109\.179|41\.87\.135))|1\.(?:1(?:44\.(?:130\.2|51\.4)1|16\.140\.246)|251\.250\.3)|9\.(?:144\.30\.(?:19[67]|204)|51\.134\.21[234])|8\.(?:82\.115\.1(?:8[1346]|67|74)|38\.137\.6)|(?:7\.57\.122\.8|4\.8\.46\.13)0|5\.251\.140\.186|2\.75\.38\.209)|1(?:2\.(?:1(?:64\.71\.128|\.113\.91)|52\.129\.193)|3\.(?:79\.125\.122|186\.38\.38)|7\.(?:173\.21\.5|76\.2\.129)|1\.1(?:3\.204\.1|47\.3\.74)|6\.157\.152\.128|8\.248\.44\.196|0\.91\.239\.10|9\.235\.2\.91)|2(?:0\.(?:152\.137\.124|231\.69\.13)|2\.(?:124\.178\.158|252\.223\.2))|4\.207\.15\.55)|8(?:7\.(?:2(?:3(?:7\.201\.132|9\.24\.214)|2(?:6\.242\.7|9\.73\.98)|52\.227\.[46]0)|101\.230\.38)|9\.1(?:61\.(?:1(?:41\.147|99\.235|58\.80)|2(?:06\.1|23\.2)47)|87\.131\.41)|2\.1(?:93\.140\.168|40\.91\.41)|3\.1(?:42\.111\.228|6\.167\.14)|0\.(?:253\.99\.22|65\.16\.71)|6\.(?:36\.49\.1|98\.6\.15)|8\.255\.153\.106|5\.90\.193\.240)|6(?:1\.(?:1(?:39\.151\.(?:18|22)|12\.19\.81|26\.28\.97)|47\.60\.228)|7\.(?:230\.174\.1(?:5[189]|7[479]|8[36]|45|66)|15\.97\.31)|9\.6(?:5\.59\.(?:[589]|2[127]|1[16])|4\.155\.181)|4\.(?:187\.98\.7[13]|244\.62\.22)|2\.1(?:29\.201\.209|19\.28\.251))|7(?:4\.(?:5(?:0\.(?:95\.1[07]|85\.15)|2\.87\.162)|117\.211\.1(?:5[027]|3[57]|45)|211\.64\.48)|(?:6\.161\.241\.11|9\.171\.16\.5|2\.54\.21\.4)5|8\.(?:1(?:00\.36\.138|59\.121\.15)|46\.78\.78)|7\.(?:232\.69\.160|92\.159\.102)|0\.108\.253\.223)|9(?:3\.(?:9(?:1\.1(?:44\.98|96\.99)|5\.168\.122)|1(?:78\.205\.238|26\.15\.49))|5\.172\.147\.15|8\.228\.22\.218|1\.193\.199\.4|4\.102\.5\.20)|41\.(?:137\.(?:(?:24|30|56)\.4|63\.20[123])|76\.168\.1)|59\.25\.182\.92)\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(?:00\.(?:1(?:6[12356]|7[6789]|8[0123]|9[2345])|2(?:1[01234]|0[89]))|4(?:1\.(?:2(?:4[89]|17)|1(?:44)?|8[01])|2\.196))|19(?:9\.(?:5[0159]|4[89]|182)|8\.(?:8[1356]|9[23])|6\.210))|3\.(?:16(?:2\.(?:1(?:1[678]|2[458]|4[13]|00|38)|2(?:4[3456]|2[578]|3[48])|7[4679]|6[57]|[59]6)|8\.(?:136|88)|9\.18[0123]|7\.111)|22\.8)|9\.15(?:9\.(?:2(?:1[01234567]|2[013]|0\d)|19[2345679])|3\.(?:[0235]|9[134568]?|1[1789]|8[69]?)|5\.(?:10[03]|9[679]|3?3|8)|6\.(?:17|24))|6\.71\.(?:[58]|2(?:[578]|1[014589]|2[123]?|0[89]?)|1(?:[26789]|4[4589]?|51?)|3[24]|43)|0\.49\.(?:193|205)|5\.147\.229|8\.71\.[89])|8(?:0\.(?:210\.(?:39|43)|194\.[01])|3\.16\.1(?:5[01]|49)|8\.135\.2)|2(?:5\.(?:23(?:4\.144|5\.192)|162\.243)|3\.2(?:8\.14[012]|7\.55)))|2(?:1(?:7\.(?:8\.2(?:3[68]|25)|118\.(?:82|90)|66\.146)|3\.87\.(?:8[01789]|7[46]|90)|2\.(?:23\.105|60\.73|95\.7)|8\.248\.64)|0(?:3\.(?:152\.2|82\.95)|2\.152\.243)|22\.25(?:4\.7[78]|2\.159)|7\.96\.159)|8(?:5\.26\.(?:1(?:6[45]|8[36])|2(?:3[2345]|41))|3\.149\.(?:3[267]?|4[345]|2[18])|9\.2(?:04\.1(?:37|53)|32\.105)|1\.192\.(?:2(?:1[15]|38)|199)|2\.1(?:28\.5[45]|78\.69)|0\.83\.239)|5(?:9\.9(?:9\.(?:1(?:5[234]|2[89])|5[678]|40)|7\.2(?:0[89]|16)|8\.1(?:44|52))|8\.18(?:6\.(?:220|14)|7\.8))|41\.(?:254\.[012]|95\.[248]|191\.27)|9(?:2\.39\.(?:7[079]|65)|1\.203\.67)|77\.232\.14[23]|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