Skip to content

Commit 75a4e1d

Browse files
committed
add login failed logging rule
1 parent 405e610 commit 75a4e1d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

04-EVENTS.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,22 @@ SecRule RESPONSE_STATUS "@eq 302" "phase:3,id:22110013,nolog,chain,pass"
4040
tag:'logout',\
4141
msg:'WordPress: User logged out'"
4242

43+
SecRule &RESPONSE_HEADERS:Set-Cookie "@eq 1" "phase:3,id:22110014,nolog,chain,pass"
44+
SecRule &RESPONSE_HEADERS:Location "@eq 0" "id:22110014,nolog,chain"
45+
SecRule REQUEST_METHOD "^POST$" "id:22110014,t:uppercase,nolog,chain"
46+
SecRule &ARGS_POST_NAMES:log "@ge 1" "id:22110014,t:lowercase,nolog,chain"
47+
SecRule &ARGS_POST_NAMES:pwd "@ge 1" "id:22110014,t:lowercase,nolog,chain"
48+
SecRule REQUEST_FILENAME "^/wp\-login\.php" "id:22110014,t:lowercase,\
49+
log,\
50+
rev:'1',\
51+
severity:'6',\
52+
maturity:'9',\
53+
accuracy:'9',\
54+
ver:'%{tx.wprs_version}',\
55+
tag:'wordpress',\
56+
tag:'login',\
57+
tag:'failed',\
58+
logdata:'Login failed with username: %{ARGS_POST:log}',\
59+
msg:'WordPress: Login failed'"
60+
4361
SecMarker END_WPRS_LOG_AUTH

0 commit comments

Comments
 (0)