← WordPress

Wp-login brute-force attack

Lida 6997 vezes

Offline

sandvale 
Membro
Mensagens 11 Gostos 0
Feedback +2

Troféus totais: 15
Trófeus: (Ver todos)
Linux User Super Combination Combination Topic Starter Level 3 Level 2 Level 1 10 Posts First Post Karma

Boa noite.Nao sei se alguem de voçes esta atacado,mas eu tenho 10 000 hits no wp-login.php.Vem do IP´s diferentes .Resovei problema com este codigo no .htaccess 
Código: [Seleccione]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{HTTP_REFERER} !^http://(.*)?SEUSITE\.com[NC]
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>
.Problema e que se quer fazer login tem que editar o ficheiro .htaccess no cpanel.
Offline

asturmas 
Administrador
Mensagens 19734 Gostos 50
Feedback +2

Troféus totais: 39
Trófeus: (Ver todos)
Mobile User Windows User Super Combination Combination Topic Starter 100 Poll Votes 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Essa solução não é nem de perto nem de longe o ideal.
Toma uma solução bastante melhor: acesso APENAS a partir do teu IP.

No .htaccess colocas:

<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from 0.0.0.0
</Files>

Onde 0.0.0.0 é o teu IP
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

O pior é se o ip é dinâmico.
Offline

asturmas 
Administrador
Mensagens 19734 Gostos 50
Feedback +2

Troféus totais: 39
Trófeus: (Ver todos)
Mobile User Windows User Super Combination Combination Topic Starter 100 Poll Votes 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

O pior é se o ip é dinâmico.
Da menos trabalho do que o metodo dele. Mas sim, o ideal é proteger com password via .htaccess.
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Da menos trabalho do que o metodo dele. Mas sim, o ideal é proteger com password via .htaccess.

Se formos a ver vai dar ao mesmo o trabalho... lol

Sim, é uma melhor solução o .htacess caso tenha IP dinâmico.
Offline

Celso Azevedo 
Membro
Mensagens 3500 Gostos 38
Feedback +12

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Tenth year Anniversary Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Além da protecção com o htaccess, dá uma vista d'olhos neste plugin: http://wordpress.org/plugins/bruteprotect/

Citar
BruteProtect tracks failed login attempts across all installed users of the plugin.  If any single IP has too many failed attempts in a short period of time, they are blocked from logging in to any site with this plugin installed. Once you install the plugin, you will need to get a free BruteProtect API key, which you can do directly from your WordPress dashboard.