## khop-sc-neighbors.cf v 20130412 ## 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 Apache License 2.0. ## The code that generated this output is GNU Affero General Public License v3. ## Source data (copyright Cisco) was taken from links below. ## ## 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|86)|9[35])(?:\.[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.3 0.1 0.3 0.1 # 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 # 10.3554/0.0112 0.999 20110227@510k solo=10.3717/0.0119@0.999, ->.3 .1 .3 .1 header __KHOP_SC_TOP_CIDR8 X-Spam-Relays-Untrusted =~ /^[^\]]* (?:by|ip)=(?-xism:\b(?:1(?:78|90)|37|2)(?:\.[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.2 0 0.2 0 # 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 # 10.6798/0.1269 0.993 20110227@510k solo=10.6996/0.5918@0.948 -> .2 0 .2 0 # 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.0 0.2 1.0 0.2 # 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 # crap, still empty 20110227 this is due to safety net exclusions -> 1 .2 1 .2 header KHOP_SC_TOP_CIDR16 Received =~ /(?-xism:\b(?:187\.111|222\.174)(?:\.[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.3 2.0 0.4 # 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 # 0.5034/0 1.000 20110227@510k 2 .3 2 .4 # http://spamcop.net/w3m?action=map;net=cmaxcnt;mask=65535;sort=spamcnt header KHOP_SC_CIDR24 Received =~ /(?-xism:\b(?:1(?:1(?:4\.141\.253|2\.90\.197)|78\.33\.170|03\.9\.156|20\.84\.13|95\.94\.11)|(?:61\.138\.10|89\.218\.22)4|218\.194\.91|58\.254\.168)\.[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 0.1 0 0.1 0 # 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 # 0.4157/0.5009 0.454 20110227 something is wrong here! -> .1 0 .1 0 header KHOP_SC_TOP_CIDR24 Received =~ /(?-xism:\b(?:1(?:2(?:0\.(?:128\.2|84\.13)|5\.60\.156)|(?:76\.53\.1|83\.221\.)12|03\.9\.156|12\.97\.24|44\.76\.31)|2(?:1(?:0\.(?:21\.225|51\.44)|7\.23\.2)|22\.174\.163)|8(?:0\.36\.130|9\.218\.68))\.[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.5 2.7 0.5 # 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 # 0.5722/0 1.000 20110227@510k 2.7 .5 2.7 .5 # http://www.spamcop.net/w3m?action=hoshame header KHOP_SC_TOP200 Received =~ /(?-xism:\b(?:1(?:1(?:4\.(?:1(?:13\.221\.66|41\.253\.14)|207\.113\.55)|9\.(?:1(?:80\.26\.110|93\.93\.25)|36\.138\.131)|6\.(?:112\.66\.102|255\.164\.18|90\.162\.116)|2\.(?:133\.201\.70|217\.161\.58)|5\.(?:88\.119\.132|22\.80\.197)|8\.2(?:44\.182\.94|6\.204\.182)|3\.108\.201\.189|1\.68\.104\.133)|2(?:1\.(?:1(?:81\.2(?:37\.251|51\.188)|45\.120\.75)|22\.(?:127\.17|34\.166)|66\.95\.156|49\.107\.2)|4\.(?:42\.124\.136|67\.69\.52)|0\.132\.132\.119|\.158\.188\.155|3\.30\.174\.61|5\.7\.221\.146)|9(?:5\.(?:1(?:(?:28\.253\.15|91\.184\.8)2|3(?:8\.195\.125|\.200\.218))|9(?:4\.11\.1[79]|8\.81\.3)|29\.81\.30)|(?:3\.200\.126\.1|4\.213\.122\.3)4|0\.(?:202\.116\.101|82\.89\.156)|9\.255\.11\.29)|7(?:8\.(?:3(?:2\.223\.8|3\.38\.17)8|207\.158\.230|49\.170\.57|91\.254\.66|151\.86\.1)|3\.2(?:00\.90\.19|45\.31\.13)6|6\.53\.112\.2(?:2[78]|3[12])|4\.137\.168\.212|7\.21\.1\.34)|8(?:0\.2(?:11\.1(?:91\.25|79\.3)0|25\.131\.176)|8\.(?:127\.230\.28|252\.0\.237)|5\.20\.52\.118|9\.75\.63\.114|7\.111\.3\.22)|0(?:9\.(?:195\.54\.231|236\.220\.98)|8\.178\.59\.34|1\.44\.3\.50)|4(?:4\.76\.31\.172|\.63\.74\.204))|2(?:1(?:7\.(?:2(?:1(?:9\.1(?:23\.59|32\.15)|8\.43\.130)|3\.(?:2\.1(?:3[37]|02|29|61)|8\.118))|12\.113\.67|97\.211\.20)|3\.(?:2(?:30\.128\.226|51\.186\.229|21\.9\.13)|1(?:71\.39\.154|86\.39\.43)|81\.164\.57|0\.89\.6)|0\.(?:1(?:17\.6\.152|3\.210\.84|68\.50\.16)|2(?:23\.111\.8|45\.89\.69)|32\.34\.115|51\.44\.199)|1\.(?:1(?:04\.184\.195|11\.174\.98|47\.211\.16)|33\.121\.196)|9\.(?:2(?:23\.252\.150|19\.114\.74)|143\.3\.210)|2\.(?:144\.254\.122|49\.70\.48)|8\.1(?:94\.91\.238|6\.210\.10)|6\.153\.136\.125)|0(?:0\.(?:2(?:47\.100\.178|06\.14\.26)|7(?:2\.11\.132|9\.27\.60)|142\.133\.21|68\.76\.69)|2\.(?:1(?:42\.203\.19|58\.39\.250)|29\.216\.236|71\.136\.200|44\.53\.64|91\.25\.41)|1\.(?:1(?:95\.239\.27|8\.93\.170)|65\.114\.212|45\.114\.3)|3\.(?:155\.102\.2|249\.75\.17)|9\.238\.180\.166|8\.115\.244\.54)|2(?:2\.(?:1(?:74\.(?:255\.238|54\.164|163\.2)|22\.79\.121)|255\.27\.140)|1\.(?:2(?:07\.220\.140|14\.208\.226)|1(?:43\.51\.201|39\.0\.67))|3\.4\.233\.16[45])|\.183\.155\.2)|6(?:1\.(?:1(?:3(?:3\.125\.162|8\.104\.30|6\.68\.76)|6(?:6\.55\.153|3\.37\.76)|75\.223\.1(?:34|42))|55\.156\.210|98\.131\.141)|6\.(?:84\.(?:50\.133|49\.9)|199\.227\.115|240\.232\.54)|0\.(?:173\.11\.121|2\.227\.123)|2\.146\.28\.212)|8(?:9\.218\.(?:68\.(?:146|74|90)|224\.(?:35|58)|94\.166)|1\.1(?:7\.16\.13[47]|5\.172\.145)|5\.(?:113\.141\.251|214\.157\.75)|3\.(?:111\.92\.120|3\.103\.227)|7\.(?:103\.197\.9|98\.226\.3)3|0\.36\.130\.135|8\.204\.187\.90)|9(?:5\.(?:51\.156\.218|159\.105\.2|48\.24\.10)|(?:1\.144\.153|0\.83\.184)\.211|4\.23\.(?:100\.24|2\.185)|3\.159\.160\.164)|4(?:2\.121\.(?:1(?:05\.138|18\.123)|81\.212)|6\.(?:99\.253\.158|48\.191\.71)|1\.1(?:85\.21\.186|37\.24\.4))|7(?:4\.(?:122\.227\.124|216\.223\.82|9\.203\.186)|7\.106\.232\.178|5\.127\.15\.143|9\.165\.252\.66)|5(?:9\.(?:11\.237\.151|34\.57\.88|60\.7\.146)|\.39\.49\.149)|3(?:1\.210\.47\.230|7\.59\.62\.186))\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 # 0.3655/0 1.000 20110227@510k # Spamhaus DROP, http://www.spamhaus.org/drop/ header KHOP_SPAMHAUS_DROP X-Spam-Relays-Untrusted =~ /___ FAILED TO POPULATE ___/ describe KHOP_SPAMHAUS_DROP Relay listed in Spamhaus Don't Route Or Peer List tflags KHOP_SPAMHAUS_DROP nopublish score KHOP_SPAMHAUS_DROP 1 0.2 1 0.2 # spam/ham s/o corpus # 0.0349/0.0029 0.924 20110227@510k header KHOP_SPAMHAUS_DROP_LE X-Spam-Relays-External =~ /^[^]]*___ FAILED TO POPULATE ___/ describe KHOP_SPAMHAUS_DROP_LE Relay listed in Spamhaus Don't Route Or Peer List tflags KHOP_SPAMHAUS_DROP_LE nopublish score KHOP_SPAMHAUS_DROP_LE 2 0 2 0 # adds to KHOP_SPAMHAUS_DROP # spam/ham s/o corpus # 0.0241/0 1.000 20110227@510k # 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 =~ / (?:by|ip)=(?-xism:\b(?:1(?:1(?:2\.215\.(?:6[34]|44)|0\.52\.[028]|5\.63\.1[02]|8\.186\.86)|78\.172\.(?:1(?:5[234]|8[36])|229)|2(?:2\.155\.42|5\.60\.156)|83\.221\.1[23]|30\.193\.165|09\.127\.81|97\.252\.0)|(?:79\.106\.10|217\.76\.6|5\.44\.3)9|4(?:1\.254\.[158]|6\.227\.191)|85\.(?:115\.248|26\.184)|37\.17\.11[2345])\.[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 2 0.6 2 0.6 # 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 # 0.6985/0.0014 0.998 20110227@510k 2 .6 2 .6 # 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 # 1.1332/0.5023 0.693 20110227@510k 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 # 0.5034/0 1.000 20110227@510k 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 # 21.0352/0.1381 0.993 20110227@510k 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 # 1.6366/0.5023 0.765 20110227@510k # 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.2) (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) (0.9) (0) (0.9) # SC(99) BRBL(96) MSPIKE(96) score KHOP_SC_TOP_CIDR24 (0) (2.5) (0) (2.5) # 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_SPAMHAUS_DROP (0) (3) (0) (3) # SBL(78) score KHOP_PSBL_CIDR24 (0) (1.5) (0) (1.5) # BRBL(98) XBL(95) endif