Schlagwortarchiv für: Indy Library

Wer zyklisch die Accesslogs seiner WordPress Installation checkt, wird meist folgende Zeilen zu tausenden finden.
Automatisierte Versuche eines Login im Adminbereich.

<host>:80 <ip> - - [03/Jul/2013:03:15:04 +0200] "POST /wp-login.php HTTP/1.0" 301 630 "-" "Mozilla/3.0 (compatible; Indy Library)"
<host>:80 <ip> - - [03/Jul/2013:03:53:00 +0200] "POST /wp-login.php HTTP/1.0" 404 528 "-" "Mozilla/3.0 (compatible; Indy Library)"

Mit folgenden Zeilen lassen sich Kollegen mit der „Indy Library“ via .htaccess direkt auf eine eigene block-Seite weiterleiten.

# Block WordPress Login Bruteforce
# https://www.baebeca.de/blog/2013/07/03/wordpress-login-indy-library/
RewriteCond %{HTTP_USER_AGENT} "Indy Library"
RewriteCond %{REQUEST_URI} ^/wp-login\.php
RewriteCond %{REQUEST_URI} !^/block\.html
RewriteRule ^(.*)$ https://www.baebeca.de/block.html [R=301,L]

Die URL „/block.html“ kann natürlich beliebig ersetzt werden.


Im Anschluss sieht man den Redirect auch im Accesslog:

<host>:80 <ip> - - [03/Jul/2013:18:12:28 +0200] "POST /wp-login.php HTTP/1.0" 301 604 "-" "Mozilla/3.0 (compatible; Indy Library)"
<host>:80 <ip> - - [03/Jul/2013:18:12:28 +0200] "POST /block.html HTTP/1.0" 200 639 "-" "Mozilla/3.0 (compatible; Indy Library)"
<host>:80 <ip> - - [03/Jul/2013:18:26:32 +0200] "POST /wp-login.php HTTP/1.0" 301 604 "-" "Mozilla/3.0 (compatible; Indy Library)"
<host>:80 <ip> - - [03/Jul/2013:18:26:32 +0200] "POST /block.html HTTP/1.0" 200 639 "-" "Mozilla/3.0 (compatible; Indy Library)"