Ein paar Punkte gegen Blogspam
Der Lawe fragt hier nach Spamabwehr und stellt die Frage in den Raum: Wer machts.
Ich hab Kaffee, von daher: Ich mach. ![]()
Zumindest verrat ich, wie ichs hier mache. ![]()
Zum einen haben wir den Kommentarspam: Da schützt der Trent.
Das ist an und für sich nur ein zusätzliches Eingabefeld, welches abgefragt wird. Bei Wordpress 1.2 hat man uns ja noch kalt erwischt, was den Spam anging, da gabs keine Plugins, wir hatten eine htaccess und Kreativität. Und manch einer hatte Ahnung. Und baute die ersten Captchaplugins. Ich hasse Captchas. Also ein Kommentarfeld, schick und schörkelos. :o)
Eine Anleitung für sowas tippsel ich nicht, da steht ne nette Anleitung dazu bei bueltge.de für eine Checkbox, die an und für sich genau das selbe tut. Die tut ihren Dienst auch drüben bei Fixmbr, und wenn selbst Chris das einbauen kann... *duck*
So, weiter, Trackbackspam:
Der prallt bereits an meiner htaccess ab, denn ich habe den direkten Aufruf der wp-trackback.php verboten. Normale Trackbacks funktionieren weiterhin.
Der Code dafür:
RewriteEngine On
RewriteBase /
RewriteRule ^wp-trackback\.php.*$ - [F,L]
Hier gibts das ganze auch nochmal als Plugin für den, der sich nicht traut, da selbst Hand anzulegen.
Zusätzlich kann man mit dem Plugin Moderate Pingback und Moderate Trackback Ping- und Trackbacks in die Moderation schieben.
Weiter zu den Bots.
Da gibts die robots.txt zum einen, mitunter um Sachen wie AboutUs.org vorzubeugen. Das ist alles gut und schön, solange sich die Bots auch daran halten. Tun die meisten aber leider nicht und für solche Bots läuft hier Spidertrap, welche mir gerade bewies, das es noch funktioniert, weil ich nämlich dämlicherweise den Link nach einem gesperrten Verzeichnis benamste. Wird solch ein Verzeichnis aufgerufen, bannt Spidertrap diese IP automatisch in der htaccess und beantwortet von nun an Anfragen dieser IP mit einer 403. Verboten. Ausgesperrt.
Für menschliche Fehlklicker besteht in solchem Fall die Möglichkeit sich selbst mittels eines Captchas (jaja...) freizuschalten. Wer mag, kanns einfach mal testen. Ausserdem gibts da noch ne Whitelist. Läuft ebenso auf mehreren Servern völlig problemlos bei mir.
Referrerspam hab ich seit Monaten nicht mehr, ich hab meine htaccess ausgemistet, die sah damals in etwa so aus:
SetEnvIfNoCase Referer PornStarlist.com bad_bot
SetEnvIfNoCase Referer camfun24.com bad_bot
SetEnvIfNoCase Referer latinonakedgirl.com bad_bot
SetEnvIfNoCase Referer jardimed.com bad_bot
Order Allow,Deny
allow from all
Deny from env=bad_bot
Header gehen auch:
SetEnvIfNoCase X-AAAAAAAAAAAA 1 bad_bot
SetEnvIfNoCase Via pinappleproxy bad_bot
Oder Useragenten:
SetEnvIfNoCase User-Agent "lwp-trivial/1.41" bad_bot
Bei SetEnvIfNoCase Referer also einfach rein, was geblockt werden soll. Ein Logfile lä�?t sich, sollte es dochmal überhand genommen haben, so wieder säubern.
Ein wenig flexibler kommt man da allerdings mit Regex weg:
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*adult(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*amateur(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*anal(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*uk18dvd\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*69-review\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*exotic-uk\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*lyopsrulezforever\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*adult-dvds\.tk.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*xxx(-|.).*$
RewriteRule .* - [F,L]
oder
RewriteCond %{REMOTE_ADDR} "^63\.148\.99\.2(2[4-9]|[3-4][0-9]|5[0-5])$" [OR] # Cyveillance
RewriteCond %{REMOTE_ADDR} ^12\.148\.196\.(12[8-9]|1[3-9][0-9]|2[0-4][0-9]|25[0-5])$ [OR] # spybot
RewriteCond %{REMOTE_ADDR} ^12\.148\.209\.(19[2-9]|2[0-4][0-9]|25[0-5])$ [OR] # spybot
RewriteCond %{REMOTE_ADDR} ^64\.140\.49\.6([6-9])$ [OR] # Turnitin
RewriteCond %{HTTP_USER_AGENT} ^[A-Z]+$ [OR]
RewriteCond %{HTTP_USER_AGENT} cherry.?picker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "compatible ; MSIE 6.0" [OR] (note extra space before semicolon)
RewriteCond %{HTTP_USER_AGENT} e?mail.?(collector|magnet|reaper|siphon|sweeper|harvest|collect|wolf) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Indy Library" [OR]
RewriteCond %{HTTP_USER_AGENT} "^Internet Explore" [OR]
RewriteCond %{HTTP_USER_AGENT} ^IE\ \d\.\d\ Compatible.*Browser$ [OR]
RewriteCond %{HTTP_USER_AGENT} "Microsoft URL Control" [OR]
RewriteCond %{HTTP_USER_AGENT} "^Mozilla/\?\?$" [OR]
RewriteCond %{HTTP_USER_AGENT} nicerspro [NC,OR]
RewriteCond %{HTTP_USER_AGENT} NPBot [OR]
RewriteCond %{HTTP_USER_AGENT} TurnitinBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
#RewriteCond %{HTTP_USER_AGENT} "Mozilla\/4\.0 \(compatible\; MSIE 5\.5\; Windows 98\; Win 9x 4\.90\)" [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon$
RewriteRule .* - [F,L]
Testen kann man den ganzen Kladdatsch dann zum Beispiel mit Wannabrowser.
Fragen zu den Regenechsen stellt man am besten hier, da springen durchaus kompetente Leute rum. ![]()
Ansonsten: Noch Fragen?
(Dieser Post entstand unter der Zuhilfenahme von Bauhaus und 2 Tassen Kaffee. )
Edit: Die Mailspielchen hab ich vergessen. :o) Man will ja erreichbar sein, ne?
Also zum einen hab ich da nen Formular, das ist das Plugin hier.
Zum anderen will ich auch verschlüsselt erreichbar sein, was ja über so ein Formular nicht wirklich das wahre ist, da brauchts ne Mailadresse. Ich hass das wie die Pest, wenn ich irgendwo nen Bild abtippseln soll. Genauso gräßlich ist das Javascriptgedöns.
Da muss was anderes her:
<A HREF="mailto:missi-<?php Echo Date("d.m.Y-H.i.s",Time()); ?>-<?php Echo GetEnv("REMOTE_ADDR"); ?>@entartete-kunst.com">Draufhauen zum Mailschreiben</A>
generiert ein Draufhauen zum Mailschreiben.
Eine personalisierte Mailadresse für jeden mit Datum/Uhrzeit und IP. Ein menschlicher User löscht das IP/etc einfach raus (es geht auch mit), ein Bot liefert mir Futter für meine Blacklist.
Das geht natürlich nur mit ner Catchalladresse.
Kaffee bitte!
____________________
Lawe is looking for a spam-defender. Question to all: who is willing to help.
I am a coffee maniac, therefore I'll do it
At least I give some hints, how to do it
At first, there is comment-spam: Trent defends the line.
It's just a common input box, that will be processed afterwards. Wordpress 1.2, without plugin support, wasn't easy to handle, htaccess and creativity was the only solution. Some people even got it and build the first captcha plugins. I hate captchas. So a common comment box is my choice, nice and simple. :o)
Here you will not find any tutorial, but you can find a tutorial for checkboxes at bueltge.de (german), it's almost the same. By the way this box is alive and kicking over there at F!XMBR. And guess what? Even Chris is able to do it... *don't hurt me*
Back on topic, trackback-spam:
This one runs into my "htaccess-wall", I've forbidden direct calling of wp-trackback.php. Regular trackbacks are not affected.
See the code:
RewriteEngine On
RewriteBase /
RewriteRule ^wp-trackback\.php.*$ - [F,L]
There you can get the whole enchilada as plugin, if you dare doing it yourself. Further it's possible moving ping- and trackbacks with moderate pingback and moderate trackback plugins into moderation.
Onward to the bots.
Firstly there is robots.txt, common use to prevent things like aboutus.org (german). Most of the time it's the way to go, if the bots are following the rules. But ignoring the rules is a very common behaviour, so spidertrap (german) handles these ignorants. The latter is alive and kicking proven by the fact, that I named the anchor according to a forbidden directory. Calling such a directory, while spidertrap is active, results in a banned IP within the htaccess file. In fact you will get an error 403 with exactely this IP. Locked out.
Human beings, playing falsely arround with urls, are able to prove their humanity by using captchas (yes, I know ...). If you like it, it's possible to simply test it. Furthermore there is a whitelist. No problem whatsoever on any of my servers.
There is no referer-spam since months, my htaccess is cleaned and this was the old one,
SetEnvIfNoCase Referer PornStarlist.com bad_bot
SetEnvIfNoCase Referer camfun24.com bad_bot
SetEnvIfNoCase Referer latinonakedgirl.com bad_bot
SetEnvIfNoCase Referer jardimed.com bad_bot
Order Allow,Deny
allow from all
Deny from env=bad_bot
Headers are possible:
SetEnvIfNoCase X-AAAAAAAAAAAA 1 bad_bot
SetEnvIfNoCase Via pinappleproxy bad_bot
or user-agents
SetEnvIfNoCase User-Agent "lwp-trivial/1.41" bad_bot
SetEnvIfNoCase Referer is the place to go if you want to block something. Logfiles can get very massive, cleaning them is no problem at all.
A much more flexible way is Regex:
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*adult(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*amateur(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*anal(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*uk18dvd\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*69-review\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*exotic-uk\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*lyopsrulezforever\.com.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*adult-dvds\.tk.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?.*xxx(-|.).*$
RewriteRule .* - [F,L]
or
RewriteCond %{REMOTE_ADDR} "^63\.148\.99\.2(2[4-9]|[3-4][0-9]|5[0-5])$" [OR] # Cyveillance
RewriteCond %{REMOTE_ADDR} ^12\.148\.196\.(12[8-9]|1[3-9][0-9]|2[0-4][0-9]|25[0-5])$ [OR] # spybot
RewriteCond %{REMOTE_ADDR} ^12\.148\.209\.(19[2-9]|2[0-4][0-9]|25[0-5])$ [OR] # spybot
RewriteCond %{REMOTE_ADDR} ^64\.140\.49\.6([6-9])$ [OR] # Turnitin
RewriteCond %{HTTP_USER_AGENT} ^[A-Z]+$ [OR]
RewriteCond %{HTTP_USER_AGENT} cherry.?picker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "compatible ; MSIE 6.0" [OR] (note extra space before semicolon)
RewriteCond %{HTTP_USER_AGENT} e?mail.?(collector|magnet|reaper|siphon|sweeper|harvest|collect|wolf) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Indy Library" [OR]
RewriteCond %{HTTP_USER_AGENT} "^Internet Explore" [OR]
RewriteCond %{HTTP_USER_AGENT} ^IE\ \d\.\d\ Compatible.*Browser$ [OR]
RewriteCond %{HTTP_USER_AGENT} "Microsoft URL Control" [OR]
RewriteCond %{HTTP_USER_AGENT} "^Mozilla/\?\?$" [OR]
RewriteCond %{HTTP_USER_AGENT} nicerspro [NC,OR]
RewriteCond %{HTTP_USER_AGENT} NPBot [OR]
RewriteCond %{HTTP_USER_AGENT} TurnitinBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
#RewriteCond %{HTTP_USER_AGENT} "Mozilla\/4\.0 \(compatible\; MSIE 5\.5\; Windows 98\; Win 9x 4\.90\)" [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon$
RewriteRule .* - [F,L]
Test it for example with Wannabrowser.
Questions concerning regex can be asked -> here, you'll find sone people to help you there.
Apart from that, any questions?
(This article was written under the influence of Bauhaus and two cups of coffee.)
Edit: I've almost forgotten email yada yada. :o) Reachability is your goal, isn't it?
So firstly I am using a mail blank, see this plugin. Secondly, crypted reachability is a must too, but via mail blank it's more like an agony. Ergo I'am in need of an email adress. I feel very miserable while translating a picture. But Javascript hell isn't even an option.
So I have to find a better solution:
<A HREF="mailto:missi-<?php Echo Date("d.m.Y-H.i.s",Time()); ?>-<?php Echo GetEnv("REMOTE_ADDR"); ?>@entartete-kunst.com">button for writing a mail</A>
Creates a button for writing a mail. It's a customized mail adress including date/time and ip. A human being is able to delete ip/etc in it (it's possible with it too), some bot delivers nice food for my blacklist.
Thats of course possible with a so-called catchall-adress only.
Coffee please!
English translation: Oli@Fixmbr
Gespeichert unter:
Anleitungen, plugins, SpamSchon gelesen?
No related posts.
Kamuflaro