{"id":1256,"date":"2011-01-28T13:29:51","date_gmt":"2011-01-28T12:29:51","guid":{"rendered":"http:\/\/t-machine.org\/?p=1256"},"modified":"2011-01-28T13:29:51","modified_gmt":"2011-01-28T12:29:51","slug":"modsecurity-updated-anti-spam-marketer-rule","status":"publish","type":"post","link":"http:\/\/new.t-machine.org\/index.php\/2011\/01\/28\/modsecurity-updated-anti-spam-marketer-rule\/","title":{"rendered":"ModSecurity updated anti-spam marketer rule"},"content":{"rendered":"<p>After a little tweaking, my rule is growing, and proving extremely effective:<\/p>\n<blockquote>\n<p># bad websites: domains which regularly or overwhelmingly feature spam<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(yijiezi|yourhcg|lukejaten|squidoo|answerbag|jvlai|chaohuis|cledit|bait|lukejaten)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;<\/p>\n<p># porn and gambling: they make much cash out of random visitors<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(holdem|poker|casino|porn|girlz|pussy|penis|babe|exposed|sex)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;<\/p>\n<p># fake \/ illegal designer clothing and luxury goods<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(shop|store|cheap|gossip|handbag|money|deluxe|sunglass|chanel|replica|buy|sale|furniture)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;<\/p>\n<p># celebrity gossip and trying to make money out of children, I guess<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(miley|bieber|pokemon)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;<\/p>\n<p># side-effects of Republican America?<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(health|dental|pills|treatment|seller)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;<\/p>\n<p># side-effects of weakly-regulated investment markets?<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(forex|realty|invest|loans)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;<\/p>\n<p># the people that created this problem<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(seo)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;<\/p>\n<p># webhosting and bodybuilding: apparently, these industries are as commoditized as porn and gambling &#8211; LOL<br \/>\nSecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(download|hosting|videos|bodybuilding|bodybuild)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221;\n<\/p><\/blockquote>\n<p>Incidentally, I looked into using wordlists for this, but they don&#8217;t work. The most effective anti-spam is to look at the domain-names &#8211; these sites are trying to get good rankings for their domains, not for specific pages. Apart from the spam-friendly sites, where it&#8217;s a combination of both.<\/p>\n<p>So .. sadly &#8230; we need the regexp so that we can target the domain-name specifically. If ModSecurity were better (documented) I&#8217;m sure it could easily do that. I&#8217;m suspicious it *does* do that, but with their shotgun approach to documentation, it could take days or weeks to discover it if so :).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After a little tweaking, my rule is growing, and proving extremely effective: # bad websites: domains which regularly or overwhelmingly feature spam SecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(yijiezi|yourhcg|lukejaten|squidoo|answerbag|jvlai|chaohuis|cledit|bait|lukejaten)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221; # porn and gambling: they make much cash out of random visitors SecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(holdem|poker|casino|porn|girlz|pussy|penis|babe|exposed|sex)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221; # fake \/ illegal designer clothing and luxury goods SecRule REQUEST_HEADERS:REFERER &#8220;http:\/\/[^\/]*(shop|store|cheap|gossip|handbag|money|deluxe|sunglass|chanel|replica|buy|sale|furniture)&#8221; &#8220;t:lowercase,deny,nolog,status:500&#8221; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,45],"tags":[],"_links":{"self":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/1256"}],"collection":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/comments?post=1256"}],"version-history":[{"count":0,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/1256\/revisions"}],"wp:attachment":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/media?parent=1256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/categories?post=1256"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/tags?post=1256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}