Update to core rules 1.4.3.

Update version to prepare for 2.1.2 final release.
This commit is contained in:
brectanus
2007-07-25 19:30:48 +00:00
parent 08300020d3
commit e405631d78
15 changed files with 418 additions and 280 deletions

View File

@@ -10,17 +10,17 @@
#
# TODO in some cases a valid client (usually automated) generates requests that
# violates the HTTP protocol. Create exceptions for those clients, but try
# to limit the exception to a source IP or other additional properties of
# the request such as URL and not allow the violation generally.
# to limit the exception to a source IP or other additional properties of
# the request such as URL and not allow the violation generally.
#
# Use status code 400 response status code by default as protocol violations
# Use status code 400 response status code by default as protocol violations
# are in essence bad requests.
SecDefaultAction "log,pass,phase:2,status:400"
# Do not accept requests without common headers.
# Do not accept requests without common headers.
#
# Implies either an attacker or a legitimate automation client.
# Implies either an attacker or a legitimate automation client.
#
SecRule REQUEST_URI "^/$" "chain,skip:4"
SecRule REMOTE_ADDR "^127\.0\.0\.1$" "chain"
@@ -29,7 +29,7 @@ SecRule REQUEST_HEADERS:User-Agent "^Apache.*\(internal dummy connection\)$" "t:
SecRule &REQUEST_HEADERS:Host "@eq 0" \
"skip:1,log,auditlog,msg:'Request Missing a Host Header',,id:'960008',severity:'4'"
SecRule REQUEST_HEADERS:Host "^$" \
"log,auditlog,msg:'Request Missing a Host Header',,id:'960008',severity:'4'"
"log,auditlog,msg:'Request Missing a Host Header',,id:'960008',severity:'4'"
SecRule &REQUEST_HEADERS:Accept "@eq 0" \
@@ -50,6 +50,13 @@ SecRule &REQUEST_HEADERS:Content-Type "@eq 0" \
SecRule REQUEST_HEADERS:Content-Length "!^0$"
# Check that the host header is not an IP address
# Check that the host header is not an IP address
#
SecRule REQUEST_HEADERS:Host "^[\d\.]+$" "deny,log,auditlog,status:400,msg:'Host header is a numeric IP address', severity:'2',,id:'960017',"
# Log a security event when the request is rejected by apache
#
SecRule RESPONSE_STATUS ^400$ "t:none,phase:5,chain,log,auditlog,msg:'Invalid request',,id:'960913',severity:'2'"
SecRule WEBSERVER_ERROR_LOG !ModSecurity