nginx snippets generation fix + others minor improvements.

This commit is contained in:
fabriziosalmi 2025-01-16 14:02:19 +01:00
parent 1da19ed802
commit e8da4c3d28
49 changed files with 2436 additions and 2284 deletions

View File

@ -24,10 +24,7 @@ OUTPUT_DIRS = {
BOT_LIST_SOURCES = [ BOT_LIST_SOURCES = [
"https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/_generator_lists/bad-user-agents.list", "https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/_generator_lists/bad-user-agents.list",
"https://raw.githubusercontent.com/JayBizzle/Crawler-Detect/master/raw/Crawlers.txt", "https://raw.githubusercontent.com/JayBizzle/Crawler-Detect/master/raw/Crawlers.txt",
"https://raw.githubusercontent.com/piwik/referrer-spam-blacklist/master/spammers.txt", "https://raw.githubusercontent.com/piwik/referrer-spam-blacklist/master/spammers.txt"]
"https://raw.githubusercontent.com/Stevie-Ray/referrer-spam-blocker/master/src/hosts.txt",
"https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/bad-user-agents.txt"
]
RATE_LIMIT_DELAY = 600 RATE_LIMIT_DELAY = 600
RETRY_DELAY = 5 RETRY_DELAY = 5

View File

@ -2,6 +2,7 @@ import os
import subprocess import subprocess
import logging import logging
from pathlib import Path from pathlib import Path
import shutil
# Configure logging # Configure logging
logging.basicConfig( logging.basicConfig(
@ -11,15 +12,18 @@ logging.basicConfig(
) )
# Constants (configurable via environment variables) # Constants (configurable via environment variables)
WAF_DIR = Path(os.getenv("WAF_DIR", "waf_patterns/apache")) # Source directory for WAF files WAF_DIR = Path(os.getenv("WAF_DIR", "waf_patterns/apache")).resolve() # Source directory for WAF files
APACHE_WAF_DIR = Path(os.getenv("APACHE_WAF_DIR", "/etc/modsecurity.d/")) # Target directory APACHE_WAF_DIR = Path(os.getenv("APACHE_WAF_DIR", "/etc/modsecurity.d/")).resolve() # Target directory
APACHE_CONF = Path(os.getenv("APACHE_CONF", "/etc/apache2/apache2.conf")) # Apache config file APACHE_CONF = Path(os.getenv("APACHE_CONF", "/etc/apache2/apache2.conf")).resolve() # Apache config file
INCLUDE_STATEMENT = "IncludeOptional /etc/modsecurity.d/*.conf" # Include directive INCLUDE_STATEMENT = "IncludeOptional /etc/modsecurity.d/*.conf" # Include directive
def copy_waf_files(): def copy_waf_files():
""" """
Copy Apache WAF configuration files to the target directory. Copy Apache WAF configuration files to the target directory.
Raises:
Exception: If there is an error copying files.
""" """
logging.info("Copying Apache WAF patterns...") logging.info("Copying Apache WAF patterns...")
@ -50,6 +54,9 @@ def copy_waf_files():
def update_apache_conf(): def update_apache_conf():
""" """
Ensure the WAF include statement is present in the Apache configuration file. Ensure the WAF include statement is present in the Apache configuration file.
Raises:
Exception: If there is an error updating the Apache configuration.
""" """
logging.info("Ensuring WAF patterns are included in apache2.conf...") logging.info("Ensuring WAF patterns are included in apache2.conf...")
@ -74,6 +81,9 @@ def update_apache_conf():
def reload_apache(): def reload_apache():
""" """
Reload Apache to apply the new WAF rules. Reload Apache to apply the new WAF rules.
Raises:
Exception: If there is an error reloading Apache.
""" """
logging.info("Reloading Apache to apply new WAF rules...") logging.info("Reloading Apache to apply new WAF rules...")

View File

@ -11,9 +11,9 @@ logging.basicConfig(
) )
# Constants (configurable via environment variables) # Constants (configurable via environment variables)
WAF_DIR = Path(os.getenv("WAF_DIR", "waf_patterns/haproxy")) # Source directory for WAF files WAF_DIR = Path(os.getenv("WAF_DIR", "waf_patterns/haproxy")).resolve() # Source directory for WAF files
HAPROXY_WAF_DIR = Path(os.getenv("HAPROXY_WAF_DIR", "/etc/haproxy/waf/")) # Target directory HAPROXY_WAF_DIR = Path(os.getenv("HAPROXY_WAF_DIR", "/etc/haproxy/waf/")).resolve() # Target directory
HAPROXY_CONF = Path(os.getenv("HAPROXY_CONF", "/etc/haproxy/haproxy.cfg")) # HAProxy config file HAPROXY_CONF = Path(os.getenv("HAPROXY_CONF", "/etc/haproxy/haproxy.cfg")).resolve() # HAProxy config file
# HAProxy WAF configuration snippet # HAProxy WAF configuration snippet
WAF_CONFIG_SNIPPET = """ WAF_CONFIG_SNIPPET = """
@ -31,6 +31,9 @@ frontend http-in
def copy_waf_files(): def copy_waf_files():
""" """
Copy HAProxy WAF ACL files to the target directory. Copy HAProxy WAF ACL files to the target directory.
Raises:
Exception: If there is an error copying files.
""" """
logging.info("Copying HAProxy WAF patterns...") logging.info("Copying HAProxy WAF patterns...")
@ -62,6 +65,9 @@ def copy_waf_files():
def update_haproxy_conf(): def update_haproxy_conf():
""" """
Ensure the WAF configuration snippet is included in haproxy.cfg. Ensure the WAF configuration snippet is included in haproxy.cfg.
Raises:
Exception: If there is an error updating the HAProxy configuration.
""" """
logging.info("Ensuring WAF patterns are included in haproxy.cfg...") logging.info("Ensuring WAF patterns are included in haproxy.cfg...")
@ -86,6 +92,9 @@ def update_haproxy_conf():
def reload_haproxy(): def reload_haproxy():
""" """
Reload HAProxy to apply the new WAF rules. Reload HAProxy to apply the new WAF rules.
Raises:
Exception: If there is an error reloading HAProxy.
""" """
logging.info("Testing HAProxy configuration...") logging.info("Testing HAProxy configuration...")

View File

@ -11,15 +11,18 @@ logging.basicConfig(
) )
# Constants (configurable via environment variables) # Constants (configurable via environment variables)
WAF_DIR = Path(os.getenv("WAF_DIR", "/tmp/waf_patterns/nginx")) # Source directory for WAF files WAF_DIR = Path(os.getenv("WAF_DIR", "/tmp/waf_patterns/nginx")).resolve() # Source directory for WAF files
NGINX_WAF_DIR = Path(os.getenv("NGINX_WAF_DIR", "/etc/nginx/waf/")) # Target directory NGINX_WAF_DIR = Path(os.getenv("NGINX_WAF_DIR", "/etc/nginx/waf/")).resolve() # Target directory
NGINX_CONF = Path(os.getenv("NGINX_CONF", "/etc/nginx/nginx.conf")) # Nginx config file NGINX_CONF = Path(os.getenv("NGINX_CONF", "/etc/nginx/nginx.conf")).resolve() # Nginx config file
INCLUDE_STATEMENT = "include /etc/nginx/waf/*.conf;" # Include directive INCLUDE_STATEMENT = "include /etc/nginx/waf/*.conf;" # Include directive
def copy_waf_files(): def copy_waf_files():
""" """
Copy Nginx WAF configuration files to the target directory. Copy Nginx WAF configuration files to the target directory.
Raises:
Exception: If there is an error copying files.
""" """
logging.info("Copying Nginx WAF patterns...") logging.info("Copying Nginx WAF patterns...")
@ -50,6 +53,9 @@ def copy_waf_files():
def update_nginx_conf(): def update_nginx_conf():
""" """
Ensure the WAF include statement is present in the Nginx configuration file. Ensure the WAF include statement is present in the Nginx configuration file.
Raises:
Exception: If there is an error updating the Nginx configuration.
""" """
logging.info("Ensuring WAF patterns are included in nginx.conf...") logging.info("Ensuring WAF patterns are included in nginx.conf...")
@ -74,6 +80,9 @@ def update_nginx_conf():
def reload_nginx(): def reload_nginx():
""" """
Reload Nginx to apply the new WAF rules. Reload Nginx to apply the new WAF rules.
Raises:
Exception: If there is an error reloading Nginx.
""" """
logging.info("Reloading Nginx to apply new WAF rules...") logging.info("Reloading Nginx to apply new WAF rules...")

View File

@ -1,8 +1,8 @@
import os import os
import subprocess import subprocess
import logging import logging
from pathlib import Path # Better path handling from pathlib import Path
import shutil # Safer file operations import shutil
# Configure logging # Configure logging
logging.basicConfig( logging.basicConfig(
@ -12,15 +12,10 @@ logging.basicConfig(
) )
# Constants (configurable via environment variables or command-line arguments) # Constants (configurable via environment variables or command-line arguments)
WAF_DIR = os.getenv("WAF_DIR", "waf_patterns/traefik") # Source directory for WAF files WAF_DIR = Path(os.getenv("WAF_DIR", "waf_patterns/traefik")).resolve() # Source directory for WAF files
TRAEFIK_WAF_DIR = os.getenv("TRAEFIK_WAF_DIR", "/etc/traefik/waf/") # Target directory TRAEFIK_WAF_DIR = Path(os.getenv("TRAEFIK_WAF_DIR", "/etc/traefik/waf/")).resolve() # Target directory
TRAEFIK_DYNAMIC_CONF = os.getenv("TRAEFIK_DYNAMIC_CONF", "/etc/traefik/dynamic_conf.toml") # Dynamic config file TRAEFIK_DYNAMIC_CONF = Path(os.getenv("TRAEFIK_DYNAMIC_CONF", "/etc/traefik/dynamic_conf.toml")).resolve() # Dynamic config file
INCLUDE_STATEMENT = '[[http.routers]]\n rule = "PathPrefix(`/`)' # Configuration to check/append INCLUDE_STATEMENT = 'middlewares = ["bad_bot_block"]' # Configuration to check/append
# Ensure paths are absolute and normalized
WAF_DIR = Path(WAF_DIR).resolve()
TRAEFIK_WAF_DIR = Path(TRAEFIK_WAF_DIR).resolve()
TRAEFIK_DYNAMIC_CONF = Path(TRAEFIK_DYNAMIC_CONF).resolve()
def copy_waf_files(): def copy_waf_files():
@ -72,10 +67,10 @@ def update_traefik_conf():
logging.info("Adding WAF middleware to dynamic_conf.toml...") logging.info("Adding WAF middleware to dynamic_conf.toml...")
with TRAEFIK_DYNAMIC_CONF.open("a") as f: with TRAEFIK_DYNAMIC_CONF.open("a") as f:
f.write( f.write(
f'\n[[http.routers]]\n' f'\n[http.routers.my_router]\n'
f' rule = "PathPrefix(`/`)"\n' f' rule = "PathPrefix(`/`)"\n'
f' service = "traefik"\n' f' service = "my_service"\n'
f' middlewares = ["bad_bot_block"]\n' f' {INCLUDE_STATEMENT}\n'
) )
logging.info("[+] WAF middleware added to dynamic_conf.toml.") logging.info("[+] WAF middleware added to dynamic_conf.toml.")
else: else:

View File

@ -4,6 +4,7 @@ import re
from collections import defaultdict from collections import defaultdict
import logging import logging
from pathlib import Path from pathlib import Path
from typing import List, Dict, Set, Tuple, Optional
# Configure logging # Configure logging
logging.basicConfig( logging.basicConfig(
@ -24,12 +25,24 @@ MODSEC_RULE_TEMPLATE = (
'SecRule REQUEST_URI "{pattern}" "id:{rule_id},phase:1,deny,status:403,log,msg:\'{category} attack detected\'"\n' 'SecRule REQUEST_URI "{pattern}" "id:{rule_id},phase:1,deny,status:403,log,msg:\'{category} attack detected\'"\n'
) )
# Unsupported patterns for ModSecurity
UNSUPPORTED_PATTERNS = ["@pmFromFile", "!@eq", "!@within", "@lt"] UNSUPPORTED_PATTERNS = ["@pmFromFile", "!@eq", "!@within", "@lt"]
def load_owasp_rules(file_path): def load_owasp_rules(file_path: Path) -> List[Dict]:
""" """
Load OWASP rules from a JSON file. Load OWASP rules from a JSON file.
Args:
file_path (Path): Path to the JSON file containing OWASP rules.
Returns:
List[Dict]: List of OWASP rules.
Raises:
FileNotFoundError: If the input file is not found.
json.JSONDecodeError: If the JSON file is invalid.
Exception: For any other errors during file loading.
""" """
try: try:
with open(file_path, "r") as f: with open(file_path, "r") as f:
@ -45,9 +58,15 @@ def load_owasp_rules(file_path):
raise raise
def validate_regex(pattern): def validate_regex(pattern: str) -> bool:
""" """
Validate regex pattern to ensure it is compatible with ModSecurity. Validate regex pattern to ensure it is compatible with ModSecurity.
Args:
pattern (str): Regex pattern to validate.
Returns:
bool: True if the regex is valid, False otherwise.
""" """
try: try:
re.compile(pattern) re.compile(pattern)
@ -57,10 +76,17 @@ def validate_regex(pattern):
return False return False
def sanitize_pattern(pattern): def sanitize_pattern(pattern: str) -> Optional[str]:
""" """
Sanitize unsupported patterns and directives for ModSecurity. Sanitize unsupported patterns and directives for ModSecurity.
Args:
pattern (str): The pattern to sanitize.
Returns:
Optional[str]: The sanitized pattern, or None if the pattern is unsupported.
""" """
# Skip unsupported patterns
if any(directive in pattern for directive in UNSUPPORTED_PATTERNS): if any(directive in pattern for directive in UNSUPPORTED_PATTERNS):
logging.warning(f"[!] Skipping unsupported pattern: {pattern}") logging.warning(f"[!] Skipping unsupported pattern: {pattern}")
return None return None
@ -72,11 +98,17 @@ def sanitize_pattern(pattern):
return pattern return pattern
def generate_apache_waf(rules): def generate_apache_waf(rules: List[Dict]) -> None:
""" """
Generate Apache ModSecurity configuration files from OWASP rules. Generate Apache ModSecurity configuration files from OWASP rules.
Args:
rules (List[Dict]): List of OWASP rules.
Raises:
IOError: If there is an error writing to the output files.
""" """
categorized_rules = defaultdict(set) categorized_rules: Dict[str, Set[Tuple[str, int]]] = defaultdict(set)
rule_id_counter = 1000 # Starting rule ID rule_id_counter = 1000 # Starting rule ID
# Group rules by category and ensure deduplication # Group rules by category and ensure deduplication
@ -117,7 +149,7 @@ def generate_apache_waf(rules):
raise raise
def main(): def main() -> None:
""" """
Main function to execute the script. Main function to execute the script.
""" """

View File

@ -3,6 +3,7 @@ import json
import re import re
import logging import logging
from pathlib import Path from pathlib import Path
from typing import List, Dict, Optional
# Configure logging # Configure logging
logging.basicConfig( logging.basicConfig(
@ -17,9 +18,20 @@ INPUT_FILE = Path(os.getenv("INPUT_FILE", "owasp_rules.json")) # Input JSON fil
UNSUPPORTED_PATTERNS = ["@pmFromFile", "!@eq", "!@within", "@lt", "@ge", "@gt", "@eq"] UNSUPPORTED_PATTERNS = ["@pmFromFile", "!@eq", "!@within", "@lt", "@ge", "@gt", "@eq"]
def load_owasp_rules(file_path): def load_owasp_rules(file_path: Path) -> List[Dict]:
""" """
Load OWASP rules from a JSON file. Load OWASP rules from a JSON file.
Args:
file_path (Path): Path to the JSON file containing OWASP rules.
Returns:
List[Dict]: List of OWASP rules.
Raises:
FileNotFoundError: If the input file is not found.
json.JSONDecodeError: If the JSON file is invalid.
Exception: For any other errors during file loading.
""" """
try: try:
with open(file_path, "r") as f: with open(file_path, "r") as f:
@ -34,10 +46,15 @@ def load_owasp_rules(file_path):
logging.error(f"[!] Error loading OWASP rules: {e}") logging.error(f"[!] Error loading OWASP rules: {e}")
raise raise
def validate_regex(pattern: str) -> bool:
def validate_regex(pattern):
""" """
Validate regex pattern for HAProxy. Validate regex pattern for HAProxy.
Args:
pattern (str): Regex pattern to validate.
Returns:
bool: True if the regex is valid, False otherwise.
""" """
try: try:
re.compile(pattern) re.compile(pattern)
@ -46,10 +63,15 @@ def validate_regex(pattern):
logging.warning(f"[!] Invalid regex: {pattern} - {e}") logging.warning(f"[!] Invalid regex: {pattern} - {e}")
return False return False
def sanitize_pattern(pattern: str) -> Optional[str]:
def sanitize_pattern(pattern):
""" """
Sanitize unsupported patterns and directives for HAProxy ACLs. Sanitize unsupported patterns and directives for HAProxy ACLs.
Args:
pattern (str): The pattern to sanitize.
Returns:
Optional[str]: The sanitized pattern, or None if the pattern is unsupported.
""" """
# Skip unsupported patterns # Skip unsupported patterns
if any(directive in pattern for directive in UNSUPPORTED_PATTERNS): if any(directive in pattern for directive in UNSUPPORTED_PATTERNS):
@ -78,11 +100,15 @@ def sanitize_pattern(pattern):
return pattern return pattern
def generate_haproxy_conf(rules: List[Dict]) -> None:
def generate_haproxy_conf(rules):
""" """
Generate HAProxy ACL rules from OWASP rules. Generate HAProxy ACL rules from OWASP rules.
Args:
rules (List[Dict]): List of OWASP rules.
Raises:
Exception: If there is an error generating the HAProxy configuration.
""" """
try: try:
# Ensure the output directory exists # Ensure the output directory exists
@ -118,8 +144,7 @@ def generate_haproxy_conf(rules):
logging.error(f"[!] Error generating HAProxy configuration: {e}") logging.error(f"[!] Error generating HAProxy configuration: {e}")
raise raise
def main() -> None:
def main():
""" """
Main function to execute the script. Main function to execute the script.
""" """
@ -135,6 +160,5 @@ def main():
logging.critical(f"[!] Script failed: {e}") logging.critical(f"[!] Script failed: {e}")
exit(1) exit(1)
if __name__ == "__main__": if __name__ == "__main__":
main() main()

114
json2traefik.py Normal file
View File

@ -0,0 +1,114 @@
import os
import json
from pathlib import Path
from typing import List, Dict, Set
import logging
# Configure logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
handlers=[logging.StreamHandler()],
)
# Constants
OUTPUT_DIR = Path("waf_patterns/traefik/") # Output directory for Traefik configs
def load_owasp_rules(file_path: Path) -> List[Dict]:
"""
Load OWASP rules from a JSON file.
Args:
file_path (Path): Path to the JSON file containing OWASP rules.
Returns:
List[Dict]: List of OWASP rules.
Raises:
SystemExit: If the file is not found or contains invalid JSON.
"""
try:
with open(file_path, "r") as f:
return json.load(f)
except FileNotFoundError:
logging.error(f"[-] Error: File '{file_path}' not found.")
exit(1)
except json.JSONDecodeError:
logging.error(f"[-] Error: Invalid JSON in '{file_path}'.")
exit(1)
except Exception as e:
logging.error(f"[-] Unexpected error loading OWASP rules: {e}")
exit(1)
def generate_traefik_conf(rules: List[Dict]) -> None:
"""
Generate Traefik middleware configuration from OWASP rules.
Args:
rules (List[Dict]): List of OWASP rules.
Raises:
SystemExit: If there is an error writing to the output file.
"""
try:
# Ensure the output directory exists
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
config_file = OUTPUT_DIR / "middleware.toml"
with open(config_file, "w") as f:
f.write("[http.middlewares]\n\n")
# Group rules by category
grouped_rules: Dict[str, List[Dict]] = {}
for rule in rules:
category = rule.get("category", "default")
if category not in grouped_rules:
grouped_rules[category] = []
grouped_rules[category].append(rule)
# Write grouped rules to the TOML file
for category, rules_in_category in grouped_rules.items():
f.write(f"[http.middlewares.bad_bot_block_{category}]\n")
f.write(f" [http.middlewares.bad_bot_block_{category}.plugin.badbot]\n")
f.write(" userAgent = [\n")
# Use a set to deduplicate rules
unique_rules: Set[str] = set()
for rule in rules_in_category:
# Escape special characters in the pattern
pattern = rule["pattern"].replace('"', '\\"').replace("\\", "\\\\")
unique_rules.add(f' "{pattern}"')
f.write(",\n".join(unique_rules) + "\n")
f.write(" ]\n\n")
logging.info(f"[+] Traefik WAF rules generated at {config_file}")
except IOError as e:
logging.error(f"[-] Error writing to file: {e}")
exit(1)
except Exception as e:
logging.error(f"[-] Unexpected error generating Traefik config: {e}")
exit(1)
def main() -> None:
"""
Main function to execute the script.
"""
try:
logging.info("[*] Loading OWASP rules...")
owasp_rules = load_owasp_rules(Path("owasp_rules.json"))
logging.info(f"[*] Generating Traefik WAF configs from {len(owasp_rules)} rules...")
generate_traefik_conf(owasp_rules)
logging.info("[✔] Traefik WAF configurations generated successfully.")
except Exception as e:
logging.critical(f"[!] Script failed: {e}")
exit(1)
if __name__ == "__main__":
main()

View File

@ -156,6 +156,37 @@ def verify_blob_sha(file_sha: str, blob_content_b64: str) -> bool:
return True return True
def extract_sec_rules(raw_text: str) -> List[str]:
"""
Extracts SecRule patterns from the raw text.
"""
return re.findall(r'SecRule\s+.*?"((?:[^"\\]|\\.)+?)"', raw_text, re.DOTALL)
def process_rule_file(file: Dict[str, str], session: requests.Session) -> List[Dict[str, str]]:
"""
Processes a single rule file, fetching its content and extracting SecRule patterns.
"""
rules = []
blob_b64 = fetch_github_blob(session, file["sha"])
if not blob_b64:
logger.warning(f"Skipping file {file['name']} due to empty blob content.")
return rules
# Verify SHA (non-blocking)
verify_blob_sha(file["sha"], blob_b64)
raw_text = base64.b64decode(blob_b64).decode("utf-8")
sec_rules = extract_sec_rules(raw_text)
category = file["name"].split("-")[-1].replace(".conf", "")
for rule in sec_rules:
pattern = rule.strip().replace("\\", "")
if pattern:
rules.append({"category": category, "pattern": pattern})
return rules
def fetch_owasp_rules(session: requests.Session, rule_files: List[Dict[str, str]]) -> List[Dict[str, str]]: def fetch_owasp_rules(session: requests.Session, rule_files: List[Dict[str, str]]) -> List[Dict[str, str]]:
""" """
Fetches the OWASP rule content for each rule file, extracts SecRule patterns, Fetches the OWASP rule content for each rule file, extracts SecRule patterns,
@ -164,28 +195,13 @@ def fetch_owasp_rules(session: requests.Session, rule_files: List[Dict[str, str]
rules = [] rules = []
with ThreadPoolExecutor(max_workers=CONNECTION_POOL_SIZE) as executor: with ThreadPoolExecutor(max_workers=CONNECTION_POOL_SIZE) as executor:
futures = { futures = {
executor.submit(fetch_github_blob, session, file["sha"]): file for file in rule_files executor.submit(process_rule_file, file, session): file for file in rule_files
} }
for future in tqdm(as_completed(futures), total=len(rule_files), desc="Fetching rule files"): for future in tqdm(as_completed(futures), total=len(rule_files), desc="Fetching rule files"):
file = futures[future]
try: try:
blob_b64 = future.result() rules.extend(future.result())
if not blob_b64:
logger.warning(f"Skipping file {file['name']} due to empty blob content.")
continue
# Verify SHA (non-blocking)
verify_blob_sha(file["sha"], blob_b64)
raw_text = base64.b64decode(blob_b64).decode("utf-8")
sec_rules = re.findall(r'SecRule\s+.*?"((?:[^"\\]|\\.)+?)"', raw_text, re.DOTALL)
category = file["name"].split("-")[-1].replace(".conf", "")
for rule in sec_rules:
pattern = rule.strip().replace("\\", "")
if pattern:
rules.append({"category": category, "pattern": pattern})
except Exception as e: except Exception as e:
logger.error(f"Failed to process file {file['name']}. Reason: {e}") logger.error(f"Failed to process file. Reason: {e}")
logger.info(f"Fetched {len(rules)} rules.") logger.info(f"Fetched {len(rules)} rules.")
return rules return rules

View File

@ -1,54 +0,0 @@
import os
import json
OUTPUT_DIR = "waf_patterns/traefik/"
def load_owasp_rules(file_path):
try:
with open(file_path, "r") as f:
return json.load(f)
except FileNotFoundError:
print(f"[-] Error: File '{file_path}' not found.")
exit(1)
except json.JSONDecodeError:
print(f"[-] Error: Invalid JSON in '{file_path}'.")
exit(1)
def generate_traefik_conf(rules):
os.makedirs(OUTPUT_DIR, exist_ok=True)
config_file = os.path.join(OUTPUT_DIR, "middleware.toml")
try:
with open(config_file, "w") as f:
f.write("[http.middlewares]\n\n")
rule_counter = 1 # Unique identifier for each middleware
# Group rules by category
grouped_rules = {}
for rule in rules:
category = rule.get("category", "default")
if category not in grouped_rules:
grouped_rules[category] = []
grouped_rules[category].append(rule)
# Write grouped rules to the TOML file
for category, rules_in_category in grouped_rules.items():
f.write(f"[http.middlewares.bad_bot_block_{category}]\n")
f.write(f" [http.middlewares.bad_bot_block_{category}.plugin.badbot]\n")
f.write(" userAgent = [\n")
unique_rules = set() # Use a set to deduplicate rules
for rule in rules_in_category:
# Escape special characters in the pattern
pattern = rule['pattern'].replace('"', '\\"').replace("\\", "\\\\")
unique_rules.add(f' "{pattern}"')
f.write(",\n".join(unique_rules) + "\n")
f.write(" ]\n\n")
print(f"[+] Traefik WAF rules generated at {config_file}")
except IOError as e:
print(f"[-] Error writing to file: {e}")
exit(1)
if __name__ == "__main__":
owasp_rules = load_owasp_rules("owasp_rules.json")
generate_traefik_conf(owasp_rules)

File diff suppressed because one or more lines are too long

View File

@ -1,20 +1,19 @@
# Apache ModSecurity rules for ATTACK # Apache ModSecurity rules for ATTACK
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\^\[\^sv,;\]\+\[sv,;\]\.\*\?\(\?:application/\(\?:\.\+\+\)\?json\|\(\?:application/\(\?:soap\+\)\?\|text/\)xml\)" "id:1037,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\[nr\]\+\(\?:s\|location\|refresh\|\(\?:set\-\)\?cookie\|\(\?:x\-\)\?\(\?:forwarded\-\(\?:for\|host\|server\)\|host\|via\|remote\-ip\|remote\-addr\|originating\-IP\)\)s\*:" "id:1151,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\[nr\]\+\(\?:s\|location\|refresh\|\(\?:set\-\)\?cookie\|\(\?:x\-\)\?\(\?:forwarded\-\(\?:for\|host\|server\)\|host\|via\|remote\-ip\|remote\-addr\|originating\-IP\)\)s\*:" "id:1035,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\(\?:bhttp/d\|<\(\?:html\|meta\)b\)" "id:1148,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\[nr\]" "id:1033,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "@gt\ 1" "id:1158,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "@gt\ 1" "id:1043,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\[nr\]" "id:1154,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\[nr\]" "id:1036,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "content\-transfer\-encoding:\(\.\*\)" "id:1034,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "unix:\[\^\|\]\*\|" "id:1038,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\[nr\]" "id:1150,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\." "id:1042,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\^\[\^sv,;\]\+\[sv,;\]\.\*\?b\(\?:\(\(\?:tex\|multipar\)t\|application\)\|\(\(\?:audi\|vide\)o\|image\|cs\[sv\]\|\(\?:vn\|relate\)d\|p\(\?:df\|lain\)\|json\|\(\?:soa\|cs\)p\|x\(\?:ml\|\-www\-form\-urlencoded\)\|form\-data\|x\-amf\|\(\?:octe\|repor\)t\|stream\)\|\(\[\+/\]\)\)b" "id:1155,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\[nr\]" "id:1039,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\[rn\]W\*\?\(\?:content\-\(\?:type\|length\)\|set\-cookie\|location\):s\*w" "id:1147,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\[rn\]W\*\?\(\?:content\-\(\?:type\|length\)\|set\-cookie\|location\):s\*w" "id:1031,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "@gt\ 0" "id:1156,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "TX:paramcounter_\(\.\*\)" "id:1044,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\." "id:1157,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\(\?:get\|post\|head\|options\|connect\|put\|delete\|trace\|track\|patch\|propfind\|propatch\|mkcol\|copy\|move\|lock\|unlock\)s\+\[\^s\]\+s\+http/d" "id:1030,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\[nr\]" "id:1152,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\(\?:bhttp/d\|<\(\?:html\|meta\)b\)" "id:1032,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\[nr\]" "id:1149,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "content\-transfer\-encoding:\(\.\*\)" "id:1029,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\(\?:get\|post\|head\|options\|connect\|put\|delete\|trace\|track\|patch\|propfind\|propatch\|mkcol\|copy\|move\|lock\|unlock\)s\+\[\^s\]\+s\+http/d" "id:1146,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "@gt\ 0" "id:1041,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "\^content\-types\*:s\*\(\.\*\)\$" "id:1033,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\[nr\]" "id:1034,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "unix:\[\^\|\]\*\|" "id:1153,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\^\[\^sv,;\]\+\[sv,;\]\.\*\?b\(\?:\(\(\?:tex\|multipar\)t\|application\)\|\(\(\?:audi\|vide\)o\|image\|cs\[sv\]\|\(\?:vn\|relate\)d\|p\(\?:df\|lain\)\|json\|\(\?:soa\|cs\)p\|x\(\?:ml\|\-www\-form\-urlencoded\)\|form\-data\|x\-amf\|\(\?:octe\|repor\)t\|stream\)\|\(\[\+/\]\)\)b" "id:1040,phase:1,deny,status:403,log,msg:'attack attack detected'" SecRule REQUEST_URI "TX:paramcounter_\(\.\*\)" "id:1159,phase:1,deny,status:403,log,msg:'attack attack detected'"
SecRule REQUEST_URI "\^content\-types\*:s\*\(\.\*\)\$" "id:1028,phase:1,deny,status:403,log,msg:'attack attack detected'"

View File

@ -1,11 +1,11 @@
# Apache ModSecurity rules for CORRELATION # Apache ModSecurity rules for CORRELATION
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "@gt\ 0" "id:1327,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@ge\ 5" "id:1343,phase:1,deny,status:403,log,msg:'correlation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1324,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1347,phase:1,deny,status:403,log,msg:'correlation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1325,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1344,phase:1,deny,status:403,log,msg:'correlation attack detected'"
SecRule REQUEST_URI "@ge\ 5" "id:1321,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@gt\ 0" "id:1349,phase:1,deny,status:403,log,msg:'correlation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1326,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1346,phase:1,deny,status:403,log,msg:'correlation attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1320,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1345,phase:1,deny,status:403,log,msg:'correlation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1323,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1348,phase:1,deny,status:403,log,msg:'correlation attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1322,phase:1,deny,status:403,log,msg:'correlation attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1342,phase:1,deny,status:403,log,msg:'correlation attack detected'"

View File

@ -1,82 +1,86 @@
# Apache ModSecurity rules for ENFORCEMENT # Apache ModSecurity rules for ENFORCEMENT
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "@validateByteRange\ 32\-36,38\-126" "id:1153,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\[\^;s\]\+" "id:1080,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1115,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "%\[0\-9a\-fA\-F\]\{2\}" "id:1097,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^0\?\$" "id:1088,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ 1" "id:1092,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "%u\[fF\]\{2\}\[0\-9a\-fA\-F\]\{2\}" "id:1101,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \(\?i\)\^\(\?:\&\(\?:\(\?:\[acegiln\-or\-suz\]acut\|\[aeiou\]grav\|\[ain\-o\]tild\)e\|\[c\-elnr\-tz\]caron\|\(\?:\[cgk\-lnr\-t\]cedi\|\[aeiouy\]um\)l\|\[aceg\-josuwy\]circ\|\[au\]ring\|a\(\?:mp\|pos\)\|nbsp\|oslash\);\|\[\^"';=\]\)\*\$" "id:1035,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1105,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{6\}" "id:1114,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1099,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^\(\?:OPTIONS\|CONNECT\)\$" "id:1107,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1117,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^OPTIONS\$" "id:1057,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(\?:\^\(\[d\.\]\+\|\[\[da\-f:\]\+\]\|\[da\-f:\]\+\)\(:\[d\]\+\)\?\$\)" "id:1114,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ %\{tx\.max_num_args\}" "id:1067,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\['";=\]" "id:1148,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^\[w/\.\+\*\-\]\+\(\?:s\?;s\?\(\?:action\|boundary\|charset\|component\|start\(\?:\-info\)\?\|type\|version\)s\?=s\?\['"w\.\(\)\+,/:=\?<>@\#\*\-\]\+\)\*\$" "id:1079,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 1\-255" "id:1102,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1042,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "x25" "id:1095,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1106,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1119,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\(\?:GET\|HEAD\)\$" "id:1037,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^\(\?:OPTIONS\|CONNECT\)\$" "id:1155,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "b\(\?:keep\-alive\|close\),s\?\(\?:keep\-alive\|close\)b" "id:1044,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@endsWith\ \.pdf" "id:1142,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@within\ %\{tx\.restricted_headers_basic\}" "id:1087,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(d\+\)\-\(d\+\)" "id:1093,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "%u\[fF\]\{2\}\[0\-9a\-fA\-F\]\{2\}" "id:1052,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1150,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ 0" "id:1111,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1157,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@validateUrlEncoding" "id:1049,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "x25" "id:1097,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1099,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1113,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@validateByteRange\ 32,34,38,42\-59,61,65\-90,95,97\-122" "id:1116,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@within\ %\{tx\.restricted_extensions\}" "id:1132,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\(\?:GET\|HEAD\)\$" "id:1039,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1121,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\(\?:\^\(\[d\.\]\+\|\[\[da\-f:\]\+\]\|\[da\-f:\]\+\)\(:\[d\]\+\)\?\$\)" "id:1065,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^0\$" "id:1112,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1066,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^\[w/\.\+\*\-\]\+\(\?:s\?;s\?\(\?:action\|boundary\|charset\|component\|start\(\?:\-info\)\?\|type\|version\)s\?=s\?\['"w\.\(\)\+,/:=\?<>@\#\*\-\]\+\)\*\$" "id:1127,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "x25" "id:1048,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1123,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\(\?i\)application/x\-www\-form\-urlencoded" "id:1047,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.arg_name_length\}" "id:1118,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@validateByteRange\ 38,44\-46,48\-58,61,65\-90,95,97\-122" "id:1115,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\.\*\$" "id:1134,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1050,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@within\ %\{tx\.restricted_headers_basic\}" "id:1135,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{6\}" "id:1093,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1154,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1064,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(\?:\^\|\[\^x5c\]\)x5c\[cdeghijklmpqwxyz123456789\]" "id:1164,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@within\ %\{tx\.restricted_extensions\}" "id:1084,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@streq\ POST" "id:1090,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1068,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.max_num_args\}" "id:1116,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\.\*\$" "id:1103,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^OPTIONS\$" "id:1106,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1077,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@pm\ AppleWebKit\ Android\ Business\ Enterprise\ Entreprise" "id:1107,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^0\$" "id:1101,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 9,10,13,32\-126,128\-255" "id:1146,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@endsWith\ \.pdf" "id:1095,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1147,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\['";=\]" "id:1100,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1092,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\(d\+\)\-\(d\+\)" "id:1043,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "b\(\?:keep\-alive\|close\),s\?\(\?:keep\-alive\|close\)b" "id:1094,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\.\[\^\.\~\]\+\~\(\?:/\.\*\|\)\$" "id:1085,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.max_file_size\}" "id:1124,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1070,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateUrlEncoding" "id:1096,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^d\+\$" "id:1036,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1110,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@validateUrlEncoding" "id:1046,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\.\[\^\.\~\]\+\~\(\?:/\.\*\|\)\$" "id:1133,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "charsets\*=s\*\["'\]\?\(\[\^;"'s\]\+\)" "id:1081,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{63\}" "id:1144,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1041,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\(\?:GET\|HEAD\)\$" "id:1087,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@pm\ AppleWebKit\ Android" "id:1108,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 32,34,38,42\-59,61,65\-90,95,97\-122" "id:1163,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@contains\ \#" "id:1091,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ 0" "id:1158,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\$" "id:1056,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@endsWith\ \.pdf" "id:1160,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1072,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateUrlEncoding" "id:1098,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ %\{tx\.total_arg_length\}" "id:1073,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1103,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\(\?:\^\|\[\^x5c\]\)x5c\[cdeghijklmpqwxyz123456789\]" "id:1117,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.combined_file_sizes\}" "id:1126,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ %\{tx\.combined_file_sizes\}" "id:1078,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1111,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ %\{tx\.max_file_size\}" "id:1076,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "%\[0\-9a\-fA\-F\]\{2\}" "id:1145,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\(\?i\)up" "id:1110,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\[\^;s\]\+" "id:1128,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@endsWith\ \.pdf" "id:1113,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{6\}" "id:1141,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ %\{tx\.arg_length\}" "id:1071,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\(\?:GET\|HEAD\)\$" "id:1089,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@validateByteRange\ 32\-36,38\-126" "id:1105,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "charset\.\*\?charset" "id:1130,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@streq\ POST" "id:1040,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@pm\ AppleWebKit\ Android" "id:1156,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@validateByteRange\ 1\-255" "id:1053,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1104,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1102,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.arg_length\}" "id:1120,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\.\(\[\^\.\]\+\)\$" "id:1083,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(\?i\)x5cu\[0\-9a\-f\]\{4\}" "id:1138,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\.\*\$" "id:1086,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1125,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\$" "id:1062,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.total_arg_length\}" "id:1122,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "x25" "id:1045,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 38,44\-46,48\-58,61,65\-90,95,97\-122" "id:1162,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ %\{tx\.arg_name_length\}" "id:1069,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateUtf8Encoding" "id:1100,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\(\?i\)multipart/form\-data" "id:1075,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@contains\ \#" "id:1139,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^0\?\$" "id:1038,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1091,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\^\$" "id:1055,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@within\ %\{tx\.restricted_headers_extended\}" "id:1152,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1061,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1108,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "\(\?i\)x5cu\[0\-9a\-f\]\{4\}" "id:1090,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^\(\?:\(\?:max\-age=\[0\-9\]\+\|min\-fresh=\[0\-9\]\+\|no\-cache\|no\-store\|no\-transform\|only\-if\-cached\|max\-stale\(\?:=\[0\-9\]\+\)\?\)\(\?:s\*,s\*\|\$\)\)\{1,7\}\$" "id:1159,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@validateUtf8Encoding" "id:1051,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^d\+\$" "id:1086,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "charset\.\*\?charset" "id:1082,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\.\(\[\^\.\]\+\)\$" "id:1131,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1074,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^OPTIONS\$" "id:1109,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^OPTIONS\$" "id:1060,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@endsWith\ \.pdf" "id:1143,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^\(\?:\(\?:max\-age=\[0\-9\]\+\|min\-fresh=\[0\-9\]\+\|no\-cache\|no\-store\|no\-transform\|only\-if\-cached\|max\-stale\(\?:=\[0\-9\]\+\)\?\)\(\?:s\*,s\*\|\$\)\)\{1,7\}\$" "id:1112,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ 50" "id:1136,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1054,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{6\}" "id:1161,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@gt\ 50" "id:1088,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "charsets\*=s\*\["'\]\?\(\[\^;"'s\]\+\)" "id:1129,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@within\ %\{tx\.restricted_headers_extended\}" "id:1104,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@streq\ JSON" "id:1137,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@pm\ AppleWebKit\ Android\ Business\ Enterprise\ Entreprise" "id:1058,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\.\*\$" "id:1151,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@rx\ \^0\$" "id:1063,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^0\$" "id:1149,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1109,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ 1" "id:1140,phase:1,deny,status:403,log,msg:'enforcement attack detected'" SecRule REQUEST_URI "!@endsWith\ \.pdf" "id:1094,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1059,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@streq\ JSON" "id:1089,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 9,10,13,32\-126,128\-255" "id:1098,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{63\}" "id:1096,phase:1,deny,status:403,log,msg:'enforcement attack detected'"

View File

@ -1,41 +1,41 @@
# Apache ModSecurity rules for EVALUATION # Apache ModSecurity rules for EVALUATION
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "@ge\ 1" "id:1056,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1341,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1066,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1195,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1071,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1329,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1334,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1338,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1332,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1190,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1343,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1326,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1341,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1193,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1072,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1327,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1062,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1324,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1331,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1202,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1336,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1336,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1344,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1191,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1060,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1200,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1055,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1188,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1065,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1337,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1064,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1189,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1342,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1186,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1073,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1325,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1330,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1198,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1340,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1334,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1329,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1335,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1061,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1323,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1339,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1201,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1059,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1332,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1070,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1199,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1346,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.outbound_anomaly_score_threshold\}" "id:1339,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1068,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1187,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1058,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1330,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1345,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 4" "id:1192,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1335,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1196,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1333,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1185,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1063,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1197,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 4" "id:1069,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1194,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1328,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 2" "id:1333,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1338,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 3" "id:1328,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1337,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ 1" "id:1331,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 3" "id:1067,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@eq\ 1" "id:1340,phase:1,deny,status:403,log,msg:'evaluation attack detected'"
SecRule REQUEST_URI "@ge\ 2" "id:1057,phase:1,deny,status:403,log,msg:'evaluation attack detected'" SecRule REQUEST_URI "@ge\ %\{tx\.inbound_anomaly_score_threshold\}" "id:1203,phase:1,deny,status:403,log,msg:'evaluation attack detected'"

View File

@ -1,8 +1,8 @@
# Apache ModSecurity rules for EXCEPTIONS # Apache ModSecurity rules for EXCEPTIONS
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "@ipMatch\ 127\.0\.0\.1,::1" "id:1250,phase:1,deny,status:403,log,msg:'exceptions attack detected'" SecRule REQUEST_URI "\^\(\?:GET\ /\|OPTIONS\ \*\)\ HTTP/\[12\]\.\[01\]\$" "id:1004,phase:1,deny,status:403,log,msg:'exceptions attack detected'"
SecRule REQUEST_URI "\^\(\?:GET\ /\|OPTIONS\ \*\)\ HTTP/\[12\]\.\[01\]\$" "id:1252,phase:1,deny,status:403,log,msg:'exceptions attack detected'" SecRule REQUEST_URI "@streq\ GET\ /" "id:1000,phase:1,deny,status:403,log,msg:'exceptions attack detected'"
SecRule REQUEST_URI "@streq\ GET\ /" "id:1248,phase:1,deny,status:403,log,msg:'exceptions attack detected'" SecRule REQUEST_URI "@ipMatch\ 127\.0\.0\.1,::1" "id:1002,phase:1,deny,status:403,log,msg:'exceptions attack detected'"
SecRule REQUEST_URI "@ipMatch\ 127\.0\.0\.1,::1" "id:1249,phase:1,deny,status:403,log,msg:'exceptions attack detected'" SecRule REQUEST_URI "@ipMatch\ 127\.0\.0\.1,::1" "id:1001,phase:1,deny,status:403,log,msg:'exceptions attack detected'"
SecRule REQUEST_URI "@endsWith\ \(internal\ dummy\ connection\)" "id:1251,phase:1,deny,status:403,log,msg:'exceptions attack detected'" SecRule REQUEST_URI "@endsWith\ \(internal\ dummy\ connection\)" "id:1003,phase:1,deny,status:403,log,msg:'exceptions attack detected'"

View File

@ -1,9 +1,9 @@
# Apache ModSecurity rules for FIXATION # Apache ModSecurity rules for FIXATION
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\^\(\?:jsessionid\|aspsessionid\|asp\.net_sessionid\|phpsession\|phpsessid\|weblogicsession\|session_id\|session\-id\|cfid\|cftoken\|cfsid\|jservsession\|jwsession\)\$" "id:1053,phase:1,deny,status:403,log,msg:'fixation attack detected'" SecRule REQUEST_URI "\^\(\?:jsessionid\|aspsessionid\|asp\.net_sessionid\|phpsession\|phpsessid\|weblogicsession\|session_id\|session\-id\|cfid\|cftoken\|cfsid\|jservsession\|jwsession\)\$" "id:1144,phase:1,deny,status:403,log,msg:'fixation attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1054,phase:1,deny,status:403,log,msg:'fixation attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1145,phase:1,deny,status:403,log,msg:'fixation attack detected'"
SecRule REQUEST_URI "!@endsWith\ %\{request_headers\.host\}" "id:1052,phase:1,deny,status:403,log,msg:'fixation attack detected'" SecRule REQUEST_URI "\(\?i:\.cookieb\.\*\?;W\*\?\(\?:expires\|domain\)W\*\?=\|bhttp\-equivW\+set\-cookieb\)" "id:1140,phase:1,deny,status:403,log,msg:'fixation attack detected'"
SecRule REQUEST_URI "\(\?i:\.cookieb\.\*\?;W\*\?\(\?:expires\|domain\)W\*\?=\|bhttp\-equivW\+set\-cookieb\)" "id:1049,phase:1,deny,status:403,log,msg:'fixation attack detected'" SecRule REQUEST_URI "\^\(\?:ht\|f\)tps\?://\(\.\*\?\)/" "id:1142,phase:1,deny,status:403,log,msg:'fixation attack detected'"
SecRule REQUEST_URI "\^\(\?:ht\|f\)tps\?://\(\.\*\?\)/" "id:1051,phase:1,deny,status:403,log,msg:'fixation attack detected'" SecRule REQUEST_URI "!@endsWith\ %\{request_headers\.host\}" "id:1143,phase:1,deny,status:403,log,msg:'fixation attack detected'"
SecRule REQUEST_URI "\^\(\?:jsessionid\|aspsessionid\|asp\.net_sessionid\|phpsession\|phpsessid\|weblogicsession\|session_id\|session\-id\|cfid\|cftoken\|cfsid\|jservsession\|jwsession\)\$" "id:1050,phase:1,deny,status:403,log,msg:'fixation attack detected'" SecRule REQUEST_URI "\^\(\?:jsessionid\|aspsessionid\|asp\.net_sessionid\|phpsession\|phpsessid\|weblogicsession\|session_id\|session\-id\|cfid\|cftoken\|cfsid\|jservsession\|jwsession\)\$" "id:1141,phase:1,deny,status:403,log,msg:'fixation attack detected'"

View File

@ -1,6 +1,6 @@
# Apache ModSecurity rules for GENERIC # Apache ModSecurity rules for GENERIC
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "@\{\.\*\}" "id:1048,phase:1,deny,status:403,log,msg:'generic attack detected'" SecRule REQUEST_URI "while\[sv\]\*\(\[sv\(\]\*\(\?:!\+\(\?:false\|null\|undefined\|NaN\|\[\+\-\]\?0\|"\{2\}\|'\{2\}\|`\{2\}\)\|\(\?:!!\)\*\(\?:\(\?:t\(\?:rue\|his\)\|\[\+\-\]\?\(\?:Infinity\|\[1\-9\]\[0\-9\]\*\)\|new\ \[A\-Za\-z\]\[0\-9A\-Z_a\-z\]\*\|window\|String\|\(\?:Boolea\|Functio\)n\|Object\|Array\)b\|\{\.\*\}\|\[\.\*\]\|"\[\^"\]\+"\|'\[\^'\]\+'\|`\[\^`\]\+`\)\)\.\*\)" "id:1119,phase:1,deny,status:403,log,msg:'generic attack detected'"
SecRule REQUEST_URI "while\[sv\]\*\(\[sv\(\]\*\(\?:!\+\(\?:false\|null\|undefined\|NaN\|\[\+\-\]\?0\|"\{2\}\|'\{2\}\|`\{2\}\)\|\(\?:!!\)\*\(\?:\(\?:t\(\?:rue\|his\)\|\[\+\-\]\?\(\?:Infinity\|\[1\-9\]\[0\-9\]\*\)\|new\ \[A\-Za\-z\]\[0\-9A\-Z_a\-z\]\*\|window\|String\|\(\?:Boolea\|Functio\)n\|Object\|Array\)b\|\{\.\*\}\|\[\.\*\]\|"\[\^"\]\+"\|'\[\^'\]\+'\|`\[\^`\]\+`\)\)\.\*\)" "id:1046,phase:1,deny,status:403,log,msg:'generic attack detected'" SecRule REQUEST_URI "\[s\*constructors\*\]" "id:1120,phase:1,deny,status:403,log,msg:'generic attack detected'"
SecRule REQUEST_URI "\[s\*constructors\*\]" "id:1047,phase:1,deny,status:403,log,msg:'generic attack detected'" SecRule REQUEST_URI "@\{\.\*\}" "id:1121,phase:1,deny,status:403,log,msg:'generic attack detected'"

View File

@ -1,7 +1,7 @@
# Apache ModSecurity rules for IIS # Apache ModSecurity rules for IIS
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "bServer\ Error\ in\.\{0,50\}\?bApplicationb" "id:1294,phase:1,deny,status:403,log,msg:'iis attack detected'" SecRule REQUEST_URI "bServer\ Error\ in\.\{0,50\}\?bApplicationb" "id:1297,phase:1,deny,status:403,log,msg:'iis attack detected'"
SecRule REQUEST_URI "\[a\-z\]:x5cinetpubb" "id:1291,phase:1,deny,status:403,log,msg:'iis attack detected'" SecRule REQUEST_URI "!@rx\ \^404\$" "id:1296,phase:1,deny,status:403,log,msg:'iis attack detected'"
SecRule REQUEST_URI "!@rx\ \^404\$" "id:1293,phase:1,deny,status:403,log,msg:'iis attack detected'" SecRule REQUEST_URI "\[a\-z\]:x5cinetpubb" "id:1294,phase:1,deny,status:403,log,msg:'iis attack detected'"
SecRule REQUEST_URI "\(\?:Microsoft\ OLE\ DB\ Provider\ for\ SQL\ Server\(\?:</font>\.\{1,20\}\?error\ '800\(\?:04005\|40e31\)'\.\{1,40\}\?Timeout\ expired\|\ \(0x80040e31\)<br>Timeout\ expired<br>\)\|<h1>internal\ server\ error</h1>\.\*\?<h2>part\ of\ the\ server\ has\ crashed\ or\ it\ has\ a\ configuration\ error\.</h2>\|cannot\ connect\ to\ the\ server:\ timed\ out\)" "id:1292,phase:1,deny,status:403,log,msg:'iis attack detected'" SecRule REQUEST_URI "\(\?:Microsoft\ OLE\ DB\ Provider\ for\ SQL\ Server\(\?:</font>\.\{1,20\}\?error\ '800\(\?:04005\|40e31\)'\.\{1,40\}\?Timeout\ expired\|\ \(0x80040e31\)<br>Timeout\ expired<br>\)\|<h1>internal\ server\ error</h1>\.\*\?<h2>part\ of\ the\ server\ has\ crashed\ or\ it\ has\ a\ configuration\ error\.</h2>\|cannot\ connect\ to\ the\ server:\ timed\ out\)" "id:1295,phase:1,deny,status:403,log,msg:'iis attack detected'"

View File

@ -1,31 +1,31 @@
# Apache ModSecurity rules for INITIALIZATION # Apache ModSecurity rules for INITIALIZATION
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "@eq\ 0" "id:1000,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "\^\.\*\$" "id:1027,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1006,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1006,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1003,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1009,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1012,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1012,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1018,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1009,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "!@rx\ \(\?:URLENCODED\|MULTIPART\|XML\|JSON\)" "id:1023,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1015,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1015,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "\^\.\*\$" "id:1022,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1018,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1002,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1024,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1008,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "!@rx\ \(\?:URLENCODED\|MULTIPART\|XML\|JSON\)" "id:1030,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1021,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1005,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1005,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1008,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1011,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1011,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1017,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1014,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1014,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1020,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1020,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "!@rx\ \(\?:URLENCODED\|MULTIPART\|XML\|JSON\)" "id:1025,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1023,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 100" "id:1026,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1010,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1017,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "\^\[a\-f\]\*\(\[0\-9\]\)\[a\-f\]\*\(\[0\-9\]\)" "id:1027,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1001,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1004,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1007,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1007,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1013,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1013,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1010,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1016,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1019,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1019,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1021,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "\^\[a\-f\]\*\(\[0\-9\]\)\[a\-f\]\*\(\[0\-9\]\)" "id:1032,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1024,phase:1,deny,status:403,log,msg:'initialization attack detected'" SecRule REQUEST_URI "@eq\ 0" "id:1016,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1022,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "!@rx\ \(\?:URLENCODED\|MULTIPART\|XML\|JSON\)" "id:1028,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 100" "id:1031,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1025,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1026,phase:1,deny,status:403,log,msg:'initialization attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1029,phase:1,deny,status:403,log,msg:'initialization attack detected'"

View File

@ -1,18 +1,18 @@
# Apache ModSecurity rules for JAVA # Apache ModSecurity rules for JAVA
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\(\?i\)\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\(\?:\[\^\}\]\*\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\|jndi\|ctx\)" "id:1172,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?i\)\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\(\?:\[\^\}\]\{0,15\}\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\|jndi\|ctx\)" "id:1131,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:clonetransformer\|forclosure\|instantiatefactory\|instantiatetransformer\|invokertransformer\|prototypeclonefactory\|prototypeserializationfactory\|whileclosure\|getproperty\|filewriter\|xmldecoder\)" "id:1175,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:runtime\|processbuilder\)" "id:1126,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:unmarshaller\|base64data\|java\.\)" "id:1167,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "java\.lang\.\(\?:runtime\|processbuilder\)" "id:1125,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\.\*\.\(\?:jsp\|jspx\)\.\*\$" "id:1170,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:runtime\|processbuilder\)" "id:1129,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:class\.module\.classLoader\.resources\.context\.parent\.pipeline\|springframework\.context\.support\.FileSystemXmlApplicationContext\)" "id:1177,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?i\)\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\(\?:\[\^\}\]\*\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\|jndi\|ctx\)" "id:1132,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:clonetransformer\|forclosure\|instantiatefactory\|instantiatetransformer\|invokertransformer\|prototypeclonefactory\|prototypeserializationfactory\|whileclosure\|getproperty\|filewriter\|xmldecoder\)" "id:1168,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "javab\.\+\(\?:runtime\|processbuilder\)" "id:1136,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "java\.lang\.\(\?:runtime\|processbuilder\)" "id:1165,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "xacxedx00x05" "id:1133,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:rO0ABQ\|KztAAU\|Cs7QAF\)" "id:1174,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:rO0ABQ\|KztAAU\|Cs7QAF\)" "id:1134,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "xacxedx00x05" "id:1173,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\.\*\.\(\?:jsp\|jspx\)\.\*\$" "id:1130,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?i\)\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\(\?:\[\^\}\]\{0,15\}\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)\|jndi\|ctx\)" "id:1171,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:clonetransformer\|forclosure\|instantiatefactory\|instantiatetransformer\|invokertransformer\|prototypeclonefactory\|prototypeserializationfactory\|whileclosure\|getproperty\|filewriter\|xmldecoder\)" "id:1135,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "javab\.\+\(\?:runtime\|processbuilder\)" "id:1176,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:cnVudGltZQ\|HJ1bnRpbWU\|BydW50aW1l\|cHJvY2Vzc2J1aWxkZXI\|HByb2Nlc3NidWlsZGVy\|Bwcm9jZXNzYnVpbGRlcg\|Y2xvbmV0cmFuc2Zvcm1lcg\|GNsb25ldHJhbnNmb3JtZXI\|BjbG9uZXRyYW5zZm9ybWVy\|Zm9yY2xvc3VyZQ\|GZvcmNsb3N1cmU\|Bmb3JjbG9zdXJl\|aW5zdGFudGlhdGVmYWN0b3J5\|Gluc3RhbnRpYXRlZmFjdG9yeQ\|BpbnN0YW50aWF0ZWZhY3Rvcnk\|aW5zdGFudGlhdGV0cmFuc2Zvcm1lcg\|Gluc3RhbnRpYXRldHJhbnNmb3JtZXI\|BpbnN0YW50aWF0ZXRyYW5zZm9ybWVy\|aW52b2tlcnRyYW5zZm9ybWVy\|Gludm9rZXJ0cmFuc2Zvcm1lcg\|BpbnZva2VydHJhbnNmb3JtZXI\|cHJvdG90eXBlY2xvbmVmYWN0b3J5\|HByb3RvdHlwZWNsb25lZmFjdG9yeQ\|Bwcm90b3R5cGVjbG9uZWZhY3Rvcnk\|cHJvdG90eXBlc2VyaWFsaXphdGlvbmZhY3Rvcnk\|HByb3RvdHlwZXNlcmlhbGl6YXRpb25mYWN0b3J5\|Bwcm90b3R5cGVzZXJpYWxpemF0aW9uZmFjdG9yeQ\|d2hpbGVjbG9zdXJl\|HdoaWxlY2xvc3VyZQ\|B3aGlsZWNsb3N1cmU\)" "id:1138,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?i\)\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)" "id:1179,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:unmarshaller\|base64data\|java\.\)" "id:1127,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:runtime\|processbuilder\)" "id:1166,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:clonetransformer\|forclosure\|instantiatefactory\|instantiatetransformer\|invokertransformer\|prototypeclonefactory\|prototypeserializationfactory\|whileclosure\|getproperty\|filewriter\|xmldecoder\)" "id:1128,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:cnVudGltZQ\|HJ1bnRpbWU\|BydW50aW1l\|cHJvY2Vzc2J1aWxkZXI\|HByb2Nlc3NidWlsZGVy\|Bwcm9jZXNzYnVpbGRlcg\|Y2xvbmV0cmFuc2Zvcm1lcg\|GNsb25ldHJhbnNmb3JtZXI\|BjbG9uZXRyYW5zZm9ybWVy\|Zm9yY2xvc3VyZQ\|GZvcmNsb3N1cmU\|Bmb3JjbG9zdXJl\|aW5zdGFudGlhdGVmYWN0b3J5\|Gluc3RhbnRpYXRlZmFjdG9yeQ\|BpbnN0YW50aWF0ZWZhY3Rvcnk\|aW5zdGFudGlhdGV0cmFuc2Zvcm1lcg\|Gluc3RhbnRpYXRldHJhbnNmb3JtZXI\|BpbnN0YW50aWF0ZXRyYW5zZm9ybWVy\|aW52b2tlcnRyYW5zZm9ybWVy\|Gludm9rZXJ0cmFuc2Zvcm1lcg\|BpbnZva2VydHJhbnNmb3JtZXI\|cHJvdG90eXBlY2xvbmVmYWN0b3J5\|HByb3RvdHlwZWNsb25lZmFjdG9yeQ\|Bwcm90b3R5cGVjbG9uZWZhY3Rvcnk\|cHJvdG90eXBlc2VyaWFsaXphdGlvbmZhY3Rvcnk\|HByb3RvdHlwZXNlcmlhbGl6YXRpb25mYWN0b3J5\|Bwcm90b3R5cGVzZXJpYWxpemF0aW9uZmFjdG9yeQ\|d2hpbGVjbG9zdXJl\|HdoaWxlY2xvc3VyZQ\|B3aGlsZWNsb3N1cmU\)" "id:1178,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?:class\.module\.classLoader\.resources\.context\.parent\.pipeline\|springframework\.context\.support\.FileSystemXmlApplicationContext\)" "id:1137,phase:1,deny,status:403,log,msg:'java attack detected'"
SecRule REQUEST_URI "\(\?:runtime\|processbuilder\)" "id:1169,phase:1,deny,status:403,log,msg:'java attack detected'" SecRule REQUEST_URI "\(\?i\)\(\?:\$\|\&dollar;\?\)\(\?:\{\|\&l\(\?:brace\|cub\);\?\)" "id:1139,phase:1,deny,status:403,log,msg:'java attack detected'"

View File

@ -1,6 +1,6 @@
# Apache ModSecurity rules for LEAKAGES # Apache ModSecurity rules for LEAKAGES
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\^5d\{2\}\$" "id:1208,phase:1,deny,status:403,log,msg:'leakages attack detected'" SecRule REQUEST_URI "\(\?:<\(\?:TITLE>Index\ of\.\*\?<H\|title>Index\ of\.\*\?<h\)1>Index\ of\|>\[To\ Parent\ Directory\]</\[Aa\]><br>\)" "id:1182,phase:1,deny,status:403,log,msg:'leakages attack detected'"
SecRule REQUEST_URI "\(\?:<\(\?:TITLE>Index\ of\.\*\?<H\|title>Index\ of\.\*\?<h\)1>Index\ of\|>\[To\ Parent\ Directory\]</\[Aa\]><br>\)" "id:1206,phase:1,deny,status:403,log,msg:'leakages attack detected'" SecRule REQUEST_URI "\^5d\{2\}\$" "id:1184,phase:1,deny,status:403,log,msg:'leakages attack detected'"
SecRule REQUEST_URI "\^\#!s\?/" "id:1207,phase:1,deny,status:403,log,msg:'leakages attack detected'" SecRule REQUEST_URI "\^\#!s\?/" "id:1183,phase:1,deny,status:403,log,msg:'leakages attack detected'"

View File

@ -1,4 +1,4 @@
# Apache ModSecurity rules for LFI # Apache ModSecurity rules for LFI
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\(\?:\(\?:\^\|\[x5c/;\]\)\.\{2,3\}\[x5c/;\]\|\[x5c/;\]\.\{2,3\}\(\?:\[x5c/;\]\|\$\)\)" "id:1045,phase:1,deny,status:403,log,msg:'lfi attack detected'" SecRule REQUEST_URI "\(\?:\(\?:\^\|\[x5c/;\]\)\.\{2,3\}\[x5c/;\]\|\[x5c/;\]\.\{2,3\}\(\?:\[x5c/;\]\|\$\)\)" "id:1118,phase:1,deny,status:403,log,msg:'lfi attack detected'"

View File

@ -1,14 +1,14 @@
# Apache ModSecurity rules for PHP # Apache ModSecurity rules for PHP
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\(\?:b\(\?:f\(\?:tp_\(\?:nb_\)\?f\?\(\?:ge\|pu\)t\|get\(\?:s\?s\|c\)\|scanf\|write\|open\|read\)\|gz\(\?:\(\?:encod\|writ\)e\|compress\|open\|read\)\|s\(\?:ession_start\|candir\)\|read\(\?:\(\?:gz\)\?file\|dir\)\|move_uploaded_file\|\(\?:proc_\|bz\)open\|call_user_func\)\|\$_\(\?:\(\?:pos\|ge\)t\|session\)\)b" "id:1289,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\(\?:b\(\?:f\(\?:tp_\(\?:nb_\)\?f\?\(\?:ge\|pu\)t\|get\(\?:s\?s\|c\)\|scanf\|write\|open\|read\)\|gz\(\?:\(\?:encod\|writ\)e\|compress\|open\|read\)\|s\(\?:ession_start\|candir\)\|read\(\?:\(\?:gz\)\?file\|dir\)\|move_uploaded_file\|\(\?:proc_\|bz\)open\|call_user_func\)\|\$_\(\?:\(\?:pos\|ge\)t\|session\)\)b" "id:1292,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "AUTH_TYPE\|HTTP_\(\?:ACCEPT\(\?:_\(\?:CHARSET\|ENCODING\|LANGUAGE\)\)\?\|CONNECTION\|\(\?:HOS\|USER_AGEN\)T\|KEEP_ALIVE\|\(\?:REFERE\|X_FORWARDED_FO\)R\)\|ORIG_PATH_INFO\|PATH_\(\?:INFO\|TRANSLATED\)\|QUERY_STRING\|REQUEST_URI" "id:1083,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\(\?:bzip2\|expect\|glob\|ogg\|\(\?:ph\|r\)ar\|ssh2\(\?:\.\(\?:s\(\?:hell\|\(\?:ft\|c\)p\)\|exec\|tunnel\)\)\?\|z\(\?:ip\|lib\)\)://" "id:1177,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "\.\*\.\(\?:phpd\*\|phtml\)\.\.\*\$" "id:1084,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "@pm\ =" "id:1175,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "@pm\ =" "id:1079,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\(\?i\)php://\(\?:std\(\?:in\|out\|err\)\|\(\?:in\|out\)put\|fd\|memory\|temp\|filter\)" "id:1176,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "\(\?:bzip2\|expect\|glob\|ogg\|\(\?:ph\|r\)ar\|ssh2\(\?:\.\(\?:s\(\?:hell\|\(\?:ft\|c\)p\)\|exec\|tunnel\)\)\?\|z\(\?:ip\|lib\)\)://" "id:1081,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "AUTH_TYPE\|HTTP_\(\?:ACCEPT\(\?:_\(\?:CHARSET\|ENCODING\|LANGUAGE\)\)\?\|CONNECTION\|\(\?:HOS\|USER_AGEN\)T\|KEEP_ALIVE\|\(\?:REFERE\|X_FORWARDED_FO\)R\)\|ORIG_PATH_INFO\|PATH_\(\?:INFO\|TRANSLATED\)\|QUERY_STRING\|REQUEST_URI" "id:1179,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "\(\?i\)php://\(\?:std\(\?:in\|out\|err\)\|\(\?:in\|out\)put\|fd\|memory\|temp\|filter\)" "id:1080,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\.\*\.\(\?:phpd\*\|phtml\)\.\.\*\$" "id:1180,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "\(\?i\)<\?\(\?:=\|php\)\?s\+" "id:1290,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\.\*\.ph\(\?:pd\*\|tml\|ar\|ps\|t\|pt\)\.\*\$" "id:1174,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "\.\*\.ph\(\?:pd\*\|tml\|ar\|ps\|t\|pt\)\.\*\$" "id:1078,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\(\?:<\?\(\?:\[\^x\]\|x\[\^m\]\|xm\[\^l\]\|xml\[\^s\]\|xml\$\|\$\)\|<\?php\|\[\(\?:/\|x5c\)\?php\]\)" "id:1173,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "\(\?:<\?\(\?:\[\^x\]\|x\[\^m\]\|xm\[\^l\]\|xml\[\^s\]\|xml\$\|\$\)\|<\?php\|\[\(\?:/\|x5c\)\?php\]\)" "id:1077,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\[oOcC\]:d\+:"\.\+\?":d\+:\{\.\*\}" "id:1178,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "\[oOcC\]:d\+:"\.\+\?":d\+:\{\.\*\}" "id:1082,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "@pm\ \?>" "id:1181,phase:1,deny,status:403,log,msg:'php attack detected'"
SecRule REQUEST_URI "@pm\ \?>" "id:1085,phase:1,deny,status:403,log,msg:'php attack detected'" SecRule REQUEST_URI "\(\?i\)<\?\(\?:=\|php\)\?s\+" "id:1293,phase:1,deny,status:403,log,msg:'php attack detected'"

View File

@ -1,29 +1,29 @@
# Apache ModSecurity rules for RCE # Apache ModSecurity rules for RCE
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\^\(s\*\)s\+\{" "id:1227,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\(\?:\$\(\?:\(\(\?:\(\.\*\)\|\.\*\)\)\|\{\.\*\}\)\|\[<>\]\(\.\*\)\|\[!\?\.\+\]\)" "id:1273,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "/\(\?:\[\?\*\]\+\[a\-z/\]\+\|\[a\-z/\]\+\[\?\*\]\+\)" "id:1243,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\^\(s\*\)s\+\{" "id:1271,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "!\(\?:d\|!\)" "id:1247,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "/" "id:1275,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "!\-d" "id:1225,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "/" "id:1281,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "!@rx\ \[0\-9\]s\*'s\*\[0\-9\]" "id:1224,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "/" "id:1278,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "!@rx\ \[0\-9\]s\*'s\*\[0\-9\]" "id:1239,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "rn\(\?s:\.\)\*\?b\(\?:DATA\|QUIT\|HELP\(\?:\ \.\{1,255\}\)\?\)" "id:1288,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\^\(s\*\)s\+\{" "id:1226,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\(\?is\)rn\.\*\?b\(\?:\(\?:LIST\|TOP\ \[0\-9\]\+\)\(\?:\ \[0\-9\]\+\)\?\|U\(\?:SER\ \.\+\?\|IDL\(\?:\ \[0\-9\]\+\)\?\)\|PASS\ \.\+\?\|\(\?:RETR\|DELE\)\ \[0\-9\]\+\?\|A\(\?:POP\ \[0\-9A\-Z_a\-z\]\+\ \[0\-9a\-f\]\{32\}\|UTH\ \[\-0\-9A\-Z_\]\{1,20\}\ \(\?:\(\?:\[\+/\-9A\-Z_a\-z\]\{4\}\)\*\(\?:\[\+/\-9A\-Z_a\-z\]\{2\}=\|\[\+/\-9A\-Z_a\-z\]\{3\}\)\)\?=\)\)" "id:1286,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "rn\(\?s:\.\)\*\?b\(\?:\(\?i:E\)\(\?:HLO\ \[\-\-\.A\-Za\-zx17fx212a\]\{1,255\}\|XPN\ \.\{1,64\}\)\|HELO\ \[\-\-\.A\-Za\-zx17fx212a\]\{1,255\}\|MAIL\ FROM:<\.\{1,64\}\(\?i:@\)\.\{1,255\}\(\?i:>\)\|\(\?i:R\)\(\?:CPT\ TO:\(\?:\(\?i:<\)\.\{1,64\}\(\?i:@\)\.\{1,255\}\(\?i:>\)\|\(\?i:\ \)\)\?\(\?i:<\)\.\{1,64\}\(\?i:>\)\|SETb\)\|VRFY\ \.\{1,64\}\(\?:\ <\.\{1,64\}\(\?i:@\)\.\{1,255\}\(\?i:>\)\|\(\?i:@\)\.\{1,255\}\)\|AUTH\ \[\-0\-9A\-Z_a\-zx17fx212a\]\{1,20\}\(\?i:\ \)\(\?:\(\?:\[\+/\-9A\-Z_a\-zx17fx212a\]\{4\}\)\*\(\?:\[\+/\-9A\-Z_a\-zx17fx212a\]\{2\}\(\?i:=\)\|\[\+/\-9A\-Z_a\-zx17fx212a\]\{3\}\)\)\?\(\?i:=\)\|STARTTLSb\|NOOPb\(\?:\(\?i:\ \)\.\{1,255\}\)\?\)" "id:1241,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\['\*\?x5c`\]\[\^n/\]\+/\|/\[\^/\]\+\?\['\*\?x5c`\]\|\$\[!\#\-\$\(\*\-0\-9\?\-\[_a\-\{\]" "id:1274,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\['\*\?x5c`\]\[\^n/\]\+/\|/\[\^/\]\+\?\['\*\?x5c`\]\|\$\[!\#\-\$\(\*\-0\-9\?\-\[_a\-\{\]" "id:1230,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "rn\(\?s:\.\)\*\?b\(\?:\(\?:QUI\|STA\|RSE\)\(\?i:T\)\|NOOP\|CAPA\)" "id:1290,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\(\?is\)rn\.\*\?b\(\?:\(\?:LIST\|TOP\ \[0\-9\]\+\)\(\?:\ \[0\-9\]\+\)\?\|U\(\?:SER\ \.\+\?\|IDL\(\?:\ \[0\-9\]\+\)\?\)\|PASS\ \.\+\?\|\(\?:RETR\|DELE\)\ \[0\-9\]\+\?\|A\(\?:POP\ \[0\-9A\-Z_a\-z\]\+\ \[0\-9a\-f\]\{32\}\|UTH\ \[\-0\-9A\-Z_\]\{1,20\}\ \(\?:\(\?:\[\+/\-9A\-Z_a\-z\]\{4\}\)\*\(\?:\[\+/\-9A\-Z_a\-z\]\{2\}=\|\[\+/\-9A\-Z_a\-z\]\{3\}\)\)\?=\)\)" "id:1242,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "rn\(\?s:\.\)\*\?b\(\?:\(\?i:E\)\(\?:HLO\ \[\-\-\.A\-Za\-zx17fx212a\]\{1,255\}\|XPN\ \.\{1,64\}\)\|HELO\ \[\-\-\.A\-Za\-zx17fx212a\]\{1,255\}\|MAIL\ FROM:<\.\{1,64\}\(\?i:@\)\.\{1,255\}\(\?i:>\)\|\(\?i:R\)\(\?:CPT\ TO:\(\?:\(\?i:<\)\.\{1,64\}\(\?i:@\)\.\{1,255\}\(\?i:>\)\|\(\?i:\ \)\)\?\(\?i:<\)\.\{1,64\}\(\?i:>\)\|SETb\)\|VRFY\ \.\{1,64\}\(\?:\ <\.\{1,64\}\(\?i:@\)\.\{1,255\}\(\?i:>\)\|\(\?i:@\)\.\{1,255\}\)\|AUTH\ \[\-0\-9A\-Z_a\-zx17fx212a\]\{1,20\}\(\?i:\ \)\(\?:\(\?:\[\+/\-9A\-Z_a\-zx17fx212a\]\{4\}\)\*\(\?:\[\+/\-9A\-Z_a\-zx17fx212a\]\{2\}\(\?i:=\)\|\[\+/\-9A\-Z_a\-zx17fx212a\]\{3\}\)\)\?\(\?i:=\)\|STARTTLSb\|NOOPb\(\?:\(\?i:\ \)\.\{1,255\}\)\?\)" "id:1285,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "rn\(\?s:\.\)\*\?b\(\?:DATA\|QUIT\|HELP\(\?:\ \.\{1,255\}\)\?\)" "id:1244,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\^\[\^\.\]\+\.\[\^;\?\]\+\[;\?\]\(\.\*\(\['\*\?x5c`\]\[\^n/\]\+/\|/\[\^/\]\+\?\['\*\?x5c`\]\|\$\[!\#\-\$\(\*\-0\-9\?\-\[_a\-\{\]\)\)" "id:1277,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "rn\(\?s:\.\)\*\?b\(\?:\(\?:QUI\|STA\|RSE\)\(\?i:T\)\|NOOP\|CAPA\)" "id:1246,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\(\?is\)rn\[0\-9A\-Z_a\-z\]\{1,50\}b\ \(\?:C\(\?:\(\?:REATE\|OPY\ \[\*,0\-:\]\+\)\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|APABILITY\|HECK\|LOSE\)\|DELETE\ \["\-\#%\-\&\*\-\-\.0\-9A\-Zx5c_a\-z\]\+\|EX\(\?:AMINE\ \["\-\#%\-\&\*\-\-\.0\-9A\-Zx5c_a\-z\]\+\|PUNGE\)\|FETCH\ \[\*,0\-:\]\+\|L\(\?:IST\ \["\-\#\*\-\-9A\-Zx5c_a\-z\~\]\+\?\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|OG\(\?:IN\ \[\-\-\.0\-9@_a\-z\]\{1,40\}\ \.\*\?\|OUT\)\)\|RENAME\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\?\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|S\(\?:E\(\?:LECT\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|ARCH\(\?:\ CHARSET\ \[\-\-\.0\-9A\-Z_a\-z\]\{1,40\}\)\?\ \(\?:\(KEYWORD\ x5c\)\?\(\?:A\(\?:LL\|NSWERED\)\|BCC\|D\(\?:ELETED\|RAFT\)\|\(\?:FLAGGE\|OL\)D\|RECENT\|SEEN\|UN\(\?:\(\?:ANSWER\|FLAGG\)ED\|D\(\?:ELETED\|RAFT\)\|SEEN\)\|NEW\)\|\(\?:BODY\|CC\|FROM\|HEADER\ \.\{1,100\}\|NOT\|OR\ \.\{1,255\}\|T\(\?:EXT\|O\)\)\ \.\{1,255\}\|LARGER\ \[0\-9\]\{1,20\}\|\[\*,0\-:\]\+\|\(\?:BEFORE\|ON\|S\(\?:ENT\(\?:\(\?:BEFOR\|SINC\)E\|ON\)\|INCE\)\)\ "\?\[0\-9\]\{1,2\}\-\[0\-9A\-Z_a\-z\]\{3\}\-\[0\-9\]\{4\}"\?\|S\(\?:MALLER\ \[0\-9\]\{1,20\}\|UBJECT\ \.\{1,255\}\)\|U\(\?:ID\ \[\*,0\-:\]\+\?\|NKEYWORD\ x5c\(Seen\|\(\?:Answer\|Flagg\)ed\|D\(\?:eleted\|raft\)\|Recent\)\)\)\)\|T\(\?:ORE\ \[\*,0\-:\]\+\?\ \[\+\-\]\?FLAGS\(\?:\.SILENT\)\?\ \(\?:\(x5c\[a\-z\]\{1,20\}\)\)\?\|ARTTLS\)\|UBSCRIBE\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\)\|UN\(\?:SUBSCRIBE\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|AUTHENTICATE\)\|NOOP\)" "id:1289,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\^\[\^\.\]\+\.\[\^;\?\]\+\[;\?\]\(\.\*\(\['\*\?x5c`\]\[\^n/\]\+/\|/\[\^/\]\+\?\['\*\?x5c`\]\|\$\[!\#\-\$\(\*\-0\-9\?\-\[_a\-\{\]\)\)" "id:1233,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "!@rx\ \[0\-9\]s\*'s\*\[0\-9\]" "id:1268,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "/" "id:1231,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\^\(s\*\)s\+\{" "id:1270,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\$\(\?:\(\(\?:\.\*\|\(\.\*\)\)\)\|\{\.\*\}\)\|\[<>\]\(\.\*\)\|/\[0\-9A\-Z_a\-z\]\*\[!\?\.\+\]" "id:1222,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "!@rx\ \[0\-9\]s\*'s\*\[0\-9\]" "id:1283,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "/" "id:1234,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\$\(\?:\(\(\?:\.\*\|\(\.\*\)\)\)\|\{\.\*\}\)\|\[<>\]\(\.\*\)\|/\[0\-9A\-Z_a\-z\]\*\[!\?\.\+\]" "id:1266,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI ";\[sv\]\*\.\[sv\]\*\["'\]\?\(\?:a\(\?:rchive\|uth\)\|b\(\?:a\(\?:ckup\|il\)\|inary\)\|c\(\?:d\|h\(\?:anges\|eck\)\|lone\|onnection\)\|d\(\?:atabases\|b\(\?:config\|info\)\|ump\)\|e\(\?:cho\|qp\|x\(\?:cel\|it\|p\(\?:ert\|lain\)\)\)\|f\(\?:ilectrl\|ullschema\)\|he\(\?:aders\|lp\)\|i\(\?:mpo\(\?:rt\|ster\)\|ndexes\|otrace\)\|l\(\?:i\(\?:mi\|n\)t\|o\(\?:ad\|g\)\)\|\(\?:mod\|n\(\?:onc\|ullvalu\)\|unmodul\)e\|o\(\?:nce\|pen\|utput\)\|p\(\?:arameter\|r\(\?:int\|o\(\?:gress\|mpt\)\)\)\|quit\|re\(\?:ad\|cover\|store\)\|s\(\?:ave\|c\(\?:anstats\|hema\)\|e\(\?:lftest\|parator\|ssion\)\|h\(\?:a3sum\|ell\|ow\)\?\|tats\|ystem\)\|t\(\?:ables\|estc\(\?:ase\|trl\)\|ime\(\?:out\|r\)\|race\)\|vfs\(\?:info\|list\|name\)\|width\)" "id:1240,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI ";\[sv\]\*\.\[sv\]\*\["'\]\?\(\?:a\(\?:rchive\|uth\)\|b\(\?:a\(\?:ckup\|il\)\|inary\)\|c\(\?:d\|h\(\?:anges\|eck\)\|lone\|onnection\)\|d\(\?:atabases\|b\(\?:config\|info\)\|ump\)\|e\(\?:cho\|qp\|x\(\?:cel\|it\|p\(\?:ert\|lain\)\)\)\|f\(\?:ilectrl\|ullschema\)\|he\(\?:aders\|lp\)\|i\(\?:mpo\(\?:rt\|ster\)\|ndexes\|otrace\)\|l\(\?:i\(\?:mi\|n\)t\|o\(\?:ad\|g\)\)\|\(\?:mod\|n\(\?:onc\|ullvalu\)\|unmodul\)e\|o\(\?:nce\|pen\|utput\)\|p\(\?:arameter\|r\(\?:int\|o\(\?:gress\|mpt\)\)\)\|quit\|re\(\?:ad\|cover\|store\)\|s\(\?:ave\|c\(\?:anstats\|hema\)\|e\(\?:lftest\|parator\|ssion\)\|h\(\?:a3sum\|ell\|ow\)\?\|tats\|ystem\)\|t\(\?:ables\|estc\(\?:ase\|trl\)\|ime\(\?:out\|r\)\|race\)\|vfs\(\?:info\|list\|name\)\|width\)" "id:1284,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "/" "id:1237,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "/\(\?:\[\?\*\]\+\[a\-z/\]\+\|\[a\-z/\]\+\[\?\*\]\+\)" "id:1287,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "s" "id:1232,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "b\(\?:for\(\?:/\[dflr\]\.\*\)\?\ %\+\[\^\ \]\+\ in\(\.\*\)\[sv\]\?do\|if\(\?:/i\)\?\(\?:\ not\)\?\(\?:\ \(\?:e\(\?:xist\|rrorlevel\)\|defined\|cmdextversion\)b\|\[\ \(\]\.\*\(\?:b\(\?:g\(\?:eq\|tr\)\|equ\|neq\|l\(\?:eq\|ss\)\)b\|==\)\)\)" "id:1267,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "s" "id:1235,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "\^\[\^\.\]\*\?\(\?:\['\*\?x5c`\]\[\^n/\]\+/\|/\[\^/\]\+\?\['\*\?x5c`\]\|\$\[!\#\-\$\(\*\-0\-9\?\-\[_a\-\{\]\)" "id:1280,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "s" "id:1238,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "s" "id:1276,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\^\[\^\.\]\*\?\(\?:\['\*\?x5c`\]\[\^n/\]\+/\|/\[\^/\]\+\?\['\*\?x5c`\]\|\$\[!\#\-\$\(\*\-0\-9\?\-\[_a\-\{\]\)" "id:1236,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "s" "id:1279,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "b\(\?:for\(\?:/\[dflr\]\.\*\)\?\ %\+\[\^\ \]\+\ in\(\.\*\)\[sv\]\?do\|if\(\?:/i\)\?\(\?:\ not\)\?\(\?:\ \(\?:e\(\?:xist\|rrorlevel\)\|defined\|cmdextversion\)b\|\[\ \(\]\.\*\(\?:b\(\?:g\(\?:eq\|tr\)\|equ\|neq\|l\(\?:eq\|ss\)\)b\|==\)\)\)" "id:1223,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "ba\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?l\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?i\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?a\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?sb\[sv\]\+\[!\-"%',0\-9@\-Z_a\-z\]\+=\[\^sv\]" "id:1272,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\(\?:\$\(\?:\(\(\?:\(\.\*\)\|\.\*\)\)\|\{\.\*\}\)\|\[<>\]\(\.\*\)\|\[!\?\.\+\]\)" "id:1229,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "s" "id:1282,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "ba\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?l\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?i\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?a\["'\)\[\-x5c\]\*\(\?:\(\?:\(\?:\|\|\|\&\&\)\[sv\]\*\)\?\$\[!\#\(\*\-0\-9\?\-@_a\-\{\]\*\)\?x5c\?sb\[sv\]\+\[!\-"%',0\-9@\-Z_a\-z\]\+=\[\^sv\]" "id:1228,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "!\(\?:d\|!\)" "id:1291,phase:1,deny,status:403,log,msg:'rce attack detected'"
SecRule REQUEST_URI "\(\?is\)rn\[0\-9A\-Z_a\-z\]\{1,50\}b\ \(\?:C\(\?:\(\?:REATE\|OPY\ \[\*,0\-:\]\+\)\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|APABILITY\|HECK\|LOSE\)\|DELETE\ \["\-\#%\-\&\*\-\-\.0\-9A\-Zx5c_a\-z\]\+\|EX\(\?:AMINE\ \["\-\#%\-\&\*\-\-\.0\-9A\-Zx5c_a\-z\]\+\|PUNGE\)\|FETCH\ \[\*,0\-:\]\+\|L\(\?:IST\ \["\-\#\*\-\-9A\-Zx5c_a\-z\~\]\+\?\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|OG\(\?:IN\ \[\-\-\.0\-9@_a\-z\]\{1,40\}\ \.\*\?\|OUT\)\)\|RENAME\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\?\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|S\(\?:E\(\?:LECT\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|ARCH\(\?:\ CHARSET\ \[\-\-\.0\-9A\-Z_a\-z\]\{1,40\}\)\?\ \(\?:\(KEYWORD\ x5c\)\?\(\?:A\(\?:LL\|NSWERED\)\|BCC\|D\(\?:ELETED\|RAFT\)\|\(\?:FLAGGE\|OL\)D\|RECENT\|SEEN\|UN\(\?:\(\?:ANSWER\|FLAGG\)ED\|D\(\?:ELETED\|RAFT\)\|SEEN\)\|NEW\)\|\(\?:BODY\|CC\|FROM\|HEADER\ \.\{1,100\}\|NOT\|OR\ \.\{1,255\}\|T\(\?:EXT\|O\)\)\ \.\{1,255\}\|LARGER\ \[0\-9\]\{1,20\}\|\[\*,0\-:\]\+\|\(\?:BEFORE\|ON\|S\(\?:ENT\(\?:\(\?:BEFOR\|SINC\)E\|ON\)\|INCE\)\)\ "\?\[0\-9\]\{1,2\}\-\[0\-9A\-Z_a\-z\]\{3\}\-\[0\-9\]\{4\}"\?\|S\(\?:MALLER\ \[0\-9\]\{1,20\}\|UBJECT\ \.\{1,255\}\)\|U\(\?:ID\ \[\*,0\-:\]\+\?\|NKEYWORD\ x5c\(Seen\|\(\?:Answer\|Flagg\)ed\|D\(\?:eleted\|raft\)\|Recent\)\)\)\)\|T\(\?:ORE\ \[\*,0\-:\]\+\?\ \[\+\-\]\?FLAGS\(\?:\.SILENT\)\?\ \(\?:\(x5c\[a\-z\]\{1,20\}\)\)\?\|ARTTLS\)\|UBSCRIBE\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\)\|UN\(\?:SUBSCRIBE\ \["\-\#%\-\&\*\-\-9A\-Zx5c_a\-z\]\+\|AUTHENTICATE\)\|NOOP\)" "id:1245,phase:1,deny,status:403,log,msg:'rce attack detected'" SecRule REQUEST_URI "!\-d" "id:1269,phase:1,deny,status:403,log,msg:'rce attack detected'"

View File

@ -1,6 +1,6 @@
# Apache ModSecurity rules for RFI # Apache ModSecurity rules for RFI
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "!@endsWith\ \.%\{request_headers\.host\}" "id:1076,phase:1,deny,status:403,log,msg:'rfi attack detected'" SecRule REQUEST_URI "!@endsWith\ \.%\{request_headers\.host\}" "id:1123,phase:1,deny,status:403,log,msg:'rfi attack detected'"
SecRule REQUEST_URI "!@endsWith\ \.%\{request_headers\.host\}" "id:1075,phase:1,deny,status:403,log,msg:'rfi attack detected'" SecRule REQUEST_URI "!@endsWith\ \.%\{request_headers\.host\}" "id:1124,phase:1,deny,status:403,log,msg:'rfi attack detected'"
SecRule REQUEST_URI "\^\(\?i:file\|ftps\?\|https\?\)://\(\?:d\{1,3\}\.d\{1,3\}\.d\{1,3\}\.d\{1,3\}\)" "id:1074,phase:1,deny,status:403,log,msg:'rfi attack detected'" SecRule REQUEST_URI "\^\(\?i:file\|ftps\?\|https\?\)://\(\?:d\{1,3\}\.d\{1,3\}\.d\{1,3\}\.d\{1,3\}\)" "id:1122,phase:1,deny,status:403,log,msg:'rfi attack detected'"

View File

@ -1,28 +1,28 @@
# Apache ModSecurity rules for SHELLS # Apache ModSecurity rules for SHELLS
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\^\ \*<html>n\[\ \]\+<head>n\[\ \]\+<title>lostDC\ \-" "id:1307,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "@contains\ <h1\ style="margin\-bottom:\ 0">webadmin\.php</h1>" "id:1322,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "@contains\ <title>punkholicshell</title>" "id:1314,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI ">SmEvK_PaThAn\ Shell\ v\[0\-9\]\+\ coded\ by\ <a\ href=" "id:1319,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI ">SmEvK_PaThAn\ Shell\ v\[0\-9\]\+\ coded\ by\ <a\ href=" "id:1316,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<title>PHP\ Web\ Shell</title>rn<html>rn<body>rn\ \ \ \ <!\-\-\ Replaces\ command\ with\ Base64\-encoded\ Data\ \-\->" "id:1311,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<html><head><meta\ http\-equiv='Content\-Type'\ content='text/html;\ charset=Windows\-1251'><title>\.\*\?\ \-\ WSO\ \[0\-9\.\]\+</title>" "id:1296,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<title>\.::\ \.\*\ \~\ Ashiyane\ V\ \[0\-9\.\]\+\ ::\.</title>" "id:1302,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<title>SimAttacker\ \-\ \(\?:Version\|Vrsion\)\ :\ \[0\-9\.\]\+\ \-" "id:1304,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^\ <html>nn<head>nn<title>g00nshell\ v\[0\-9\.\]\+" "id:1316,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<html>n<title>\.\*\?\ \~\ Shell\ I</title>n<head>n<style>" "id:1317,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<html>n<head>n<title>Ru24PostWebShell\ \-" "id:1313,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<title>Symlink_Sa\ \[0\-9\.\]\+</title>" "id:1300,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<html>n<title>\.\*\?\ \~\ Shell\ I</title>n<head>n<style>" "id:1320,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<title>s72\ Shell\ v\[0\-9\.\]\+\ Codinf\ by\ Cr@zy_King</title>" "id:1311,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<!DOCTYPE\ html>n<html>n<!\-\-\ By\ Artyum\ \.\*<title>Web\ Shell</title>" "id:1308,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<html>n<head>n<title>Ru24PostWebShell\ \-" "id:1310,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<title>CasuS\ \[0\-9\.\]\+\ by\ MafiABoY</title>" "id:1304,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<html>n<head>n<div\ align="left"><font\ size="1">Input\ command\ :</font></div>n<form\ name="cmd"\ method="POST"\ enctype="multipart/form\-data">" "id:1309,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<title>SimAttacker\ \-\ \(\?:Version\|Vrsion\)\ :\ \[0\-9\.\]\+\ \-" "id:1307,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "B4TM4N\ SH3LL</title>\.\*<meta\ name='author'\ content='k4mpr3t'/>" "id:1297,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<title>Mini\ Shell</title>\.\*Developed\ By\ LameHacker" "id:1301,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<title>Mini\ Shell</title>\.\*Developed\ By\ LameHacker" "id:1298,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<small>NGHshell\ \[0\-9\.\]\+\ by\ Cr4sh</body></html>n\$" "id:1306,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<title>PHP\ Web\ Shell</title>rn<html>rn<body>rn\ \ \ \ <!\-\-\ Replaces\ command\ with\ Base64\-encoded\ Data\ \-\->" "id:1308,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<html>rn<head>rn<title>GRP\ WebShell\ \[0\-9\.\]\+" "id:1305,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<!DOCTYPE\ html>n<html>n<!\-\-\ By\ Artyum\ \.\*<title>Web\ Shell</title>" "id:1305,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<html><head><meta\ http\-equiv='Content\-Type'\ content='text/html;\ charset=Windows\-1251'><title>\.\*\?\ \-\ WSO\ \[0\-9\.\]\+</title>" "id:1299,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\(<title>r57\ Shell\ Version\ \[0\-9\.\]\+</title>\|<title>r57\ shell</title>\)" "id:1295,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<title>lama's'hell\ v\.\ \[0\-9\.\]\+</title>" "id:1309,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<html>n\ \ \ \ \ \ <head>n\ \ \ \ \ \ \ \ \ \ \ \ \ <title>azrail\ \[0\-9\.\]\+\ by\ C\-W\-M</title>" "id:1315,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<title>s72\ Shell\ v\[0\-9\.\]\+\ Codinf\ by\ Cr@zy_King</title>" "id:1314,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<title>lama's'hell\ v\.\ \[0\-9\.\]\+</title>" "id:1306,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "<title>Symlink_Sa\ \[0\-9\.\]\+</title>" "id:1303,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "@contains\ <h1\ style="margin\-bottom:\ 0">webadmin\.php</h1>" "id:1319,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "B4TM4N\ SH3LL</title>\.\*<meta\ name='author'\ content='k4mpr3t'/>" "id:1300,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<title>\.::\ \.\*\ \~\ Ashiyane\ V\ \[0\-9\.\]\+\ ::\.</title>" "id:1299,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<html>n<head>n<div\ align="left"><font\ size="1">Input\ command\ :</font></div>n<form\ name="cmd"\ method="POST"\ enctype="multipart/form\-data">" "id:1312,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<html>rn<head>rn<title>GRP\ WebShell\ \[0\-9\.\]\+" "id:1302,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<html>n\ \ \ \ \ \ <head>n\ \ \ \ \ \ \ \ \ \ \ \ \ <title>azrail\ \[0\-9\.\]\+\ by\ C\-W\-M</title>" "id:1318,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^<html>rn<head>rn<meta\ http\-equiv="Content\-Type"\ content="text/html;\ charset=gb2312">rn<title>PhpSpy\ Ver\ \[0\-9\]\+</title>" "id:1312,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^\ \*<html>n\[\ \]\+<head>n\[\ \]\+<title>lostDC\ \-" "id:1310,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<title>CasuS\ \[0\-9\.\]\+\ by\ MafiABoY</title>" "id:1301,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "@contains\ <title>punkholicshell</title>" "id:1317,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^\ <html><head><title>::\ b374k\ m1n1\ \[0\-9\.\]\+\ ::</title>" "id:1318,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^<html>rn<head>rn<meta\ http\-equiv="Content\-Type"\ content="text/html;\ charset=gb2312">rn<title>PhpSpy\ Ver\ \[0\-9\]\+</title>" "id:1315,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "<small>NGHshell\ \[0\-9\.\]\+\ by\ Cr4sh</body></html>n\$" "id:1303,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\^\ <html><head><title>::\ b374k\ m1n1\ \[0\-9\.\]\+\ ::</title>" "id:1321,phase:1,deny,status:403,log,msg:'shells attack detected'"
SecRule REQUEST_URI "\^\ <html>nn<head>nn<title>g00nshell\ v\[0\-9\.\]\+" "id:1313,phase:1,deny,status:403,log,msg:'shells attack detected'" SecRule REQUEST_URI "\(<title>r57\ Shell\ Version\ \[0\-9\.\]\+</title>\|<title>r57\ shell</title>\)" "id:1298,phase:1,deny,status:403,log,msg:'shells attack detected'"

View File

@ -1,16 +1,16 @@
# Apache ModSecurity rules for SQL # Apache ModSecurity rules for SQL
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\(\?i\)org\.hsqldb\.jdbc" "id:1214,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i:ORA\-\[0\-9\]\[0\-9\]\[0\-9\]\[0\-9\]\|java\.sql\.SQLException\|Oracle\ error\|Oracle\.\*Driver\|Warning\.\*oci_\.\*\|Warning\.\*ora_\.\*\)" "id:1161,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i\)\(\?:Sybase\ message:\|Warning\.\{2,20\}sybase\|Sybase\.\*Server\ message\.\*\)" "id:1221,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i\)\(\?:System\.Data\.OleDb\.OleDbException\|\[Microsoft\]\[ODBC\ SQL\ Server\ Driver\]\|\[Macromedia\]\[SQLServer\ JDBC\ Driver\]\|\[SqlException\|System\.Data\.SqlClient\.SqlException\|Unclosed\ quotation\ mark\ after\ the\ character\ string\|'80040e14'\|mssql_query\(\)\|Microsoft\ OLE\ DB\ Provider\ for\ ODBC\ Drivers\|Microsoft\ OLE\ DB\ Provider\ for\ SQL\ Server\|Incorrect\ syntax\ near\|Sintaxis\ incorrecta\ cerca\ de\|Syntax\ error\ in\ string\ in\ query\ expression\|Procedure\ or\ function\ \.\*\ expects\ parameter\|Unclosed\ quotation\ mark\ before\ the\ character\ string\|Syntax\ error\ \.\*\ in\ query\ expression\|Data\ type\ mismatch\ in\ criteria\ expression\.\|ADODB\.Field\ \(0x800A0BCD\)\|the\ used\ select\ statements\ have\ different\ number\ of\ columns\|OLE\ DB\.\*SQL\ Server\|Warning\.\*mssql_\.\*\|Driver\.\*SQL\[\ _\-\]\*Server\|SQL\ Server\.\*Driver\|SQL\ Server\.\*\[0\-9a\-fA\-F\]\{8\}\|Exception\.\*WSystem\.Data\.SqlClient\.\|Conversion\ failed\ when\ converting\ the\ varchar\ value\ \.\*\?\ to\ data\ type\ int\.\)" "id:1170,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i:ORA\-\[0\-9\]\[0\-9\]\[0\-9\]\[0\-9\]\|java\.sql\.SQLException\|Oracle\ error\|Oracle\.\*Driver\|Warning\.\*oci_\.\*\|Warning\.\*ora_\.\*\)" "id:1210,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i\)Exception\ \(\?:condition\ \)\?d\+\.\ Transaction\ rollback\." "id:1164,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i:SQL\ error\.\*POS\[0\-9\]\+\.\*\|Warning\.\*maxdb\.\*\)" "id:1218,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i\)org\.hsqldb\.jdbc" "id:1165,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i\)\(\?:Warning\.\*sqlite_\.\*\|Warning\.\*SQLite3::\|SQLite/JDBCDriver\|SQLite\.Exception\|System\.Data\.SQLite\.SQLiteException\)" "id:1220,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i:Warning\.\*ingres_\|Ingres\ SQLSTATE\|IngresW\.\*Driver\)" "id:1167,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i\)Dynamic\ SQL\ Error" "id:1212,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i\)\(\?:Sybase\ message:\|Warning\.\{2,20\}sybase\|Sybase\.\*Server\ message\.\*\)" "id:1172,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i:\[DM_QUERY_E_SYNTAX\]\|has\ occurred\ in\ the\ vicinity\ of:\)" "id:1211,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i:SQL\ error\.\*POS\[0\-9\]\+\.\*\|Warning\.\*maxdb\.\*\)" "id:1169,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i:An\ illegal\ character\ has\ been\ found\ in\ the\ statement\|com\.informix\.jdbc\|Exception\.\*Informix\)" "id:1215,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i\)\(\?:Warning\.\*sqlite_\.\*\|Warning\.\*SQLite3::\|SQLite/JDBCDriver\|SQLite\.Exception\|System\.Data\.SQLite\.SQLiteException\)" "id:1171,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i:JET\ Database\ Engine\|Access\ Database\ Engine\|\[Microsoft\]\[ODBC\ Microsoft\ Access\ Driver\]\)" "id:1209,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i:<b>Warning</b>:\ ibase_\|Unexpected\ end\ of\ command\ in\ statement\)" "id:1168,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i:<b>Warning</b>:\ ibase_\|Unexpected\ end\ of\ command\ in\ statement\)" "id:1217,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i\)Dynamic\ SQL\ Error" "id:1163,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i\)\(\?:System\.Data\.OleDb\.OleDbException\|\[Microsoft\]\[ODBC\ SQL\ Server\ Driver\]\|\[Macromedia\]\[SQLServer\ JDBC\ Driver\]\|\[SqlException\|System\.Data\.SqlClient\.SqlException\|Unclosed\ quotation\ mark\ after\ the\ character\ string\|'80040e14'\|mssql_query\(\)\|Microsoft\ OLE\ DB\ Provider\ for\ ODBC\ Drivers\|Microsoft\ OLE\ DB\ Provider\ for\ SQL\ Server\|Incorrect\ syntax\ near\|Sintaxis\ incorrecta\ cerca\ de\|Syntax\ error\ in\ string\ in\ query\ expression\|Procedure\ or\ function\ \.\*\ expects\ parameter\|Unclosed\ quotation\ mark\ before\ the\ character\ string\|Syntax\ error\ \.\*\ in\ query\ expression\|Data\ type\ mismatch\ in\ criteria\ expression\.\|ADODB\.Field\ \(0x800A0BCD\)\|the\ used\ select\ statements\ have\ different\ number\ of\ columns\|OLE\ DB\.\*SQL\ Server\|Warning\.\*mssql_\.\*\|Driver\.\*SQL\[\ _\-\]\*Server\|SQL\ Server\.\*Driver\|SQL\ Server\.\*\[0\-9a\-fA\-F\]\{8\}\|Exception\.\*WSystem\.Data\.SqlClient\.\|Conversion\ failed\ when\ converting\ the\ varchar\ value\ \.\*\?\ to\ data\ type\ int\.\)" "id:1219,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i:JET\ Database\ Engine\|Access\ Database\ Engine\|\[Microsoft\]\[ODBC\ Microsoft\ Access\ Driver\]\)" "id:1160,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i:Warning\.\*ingres_\|Ingres\ SQLSTATE\|IngresW\.\*Driver\)" "id:1216,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i:\[DM_QUERY_E_SYNTAX\]\|has\ occurred\ in\ the\ vicinity\ of:\)" "id:1162,phase:1,deny,status:403,log,msg:'sql attack detected'"
SecRule REQUEST_URI "\(\?i\)Exception\ \(\?:condition\ \)\?d\+\.\ Transaction\ rollback\." "id:1213,phase:1,deny,status:403,log,msg:'sql attack detected'" SecRule REQUEST_URI "\(\?i:An\ illegal\ character\ has\ been\ found\ in\ the\ statement\|com\.informix\.jdbc\|Exception\.\*Informix\)" "id:1166,phase:1,deny,status:403,log,msg:'sql attack detected'"

View File

@ -1,39 +1,39 @@
# Apache ModSecurity rules for SQLI # Apache ModSecurity rules for SQLI
SecRuleEngine On SecRuleEngine On
SecRule REQUEST_URI "\(\?i\)W\+d\*\?s\*\?bhavingbs\*\?\[\^s\-\]" "id:1281,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i:\^\[Wd\]\+s\*\?\(\?:alter\|union\)b\)" "id:1246,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "W\{4\}" "id:1285,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\^\(\?i:\-0000023456\|4294967295\|4294967296\|2147483648\|2147483647\|0000012345\|\-2147483648\|\-2147483649\|0000023456\|2\.2250738585072007e\-308\|2\.2250738585072011e\-308\|1e309\)\$" "id:1232,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?:\^s\*\["'`;\]\+\|\["'`\]\+s\*\$\)" "id:1262,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\^\.\*\?x5c\['"`\]\(\?:\.\*\?\['"`\]\)\?s\*\(\?:and\|or\)b" "id:1256,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i:b0x\[a\-fd\]\{3,\}\)" "id:1275,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "@detectSQLi" "id:1257,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\^\(\?i:\-0000023456\|4294967295\|4294967296\|2147483648\|2147483647\|0000012345\|\-2147483648\|\-2147483649\|0000023456\|2\.2250738585072007e\-308\|2\.2250738585072011e\-308\|1e309\)\$" "id:1255,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{12\}\)" "id:1250,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b\[sv"'\-\)`\]\*\?\(\?:=\|<=>\|\(\?:sounds\[sv\]\+\)\?like\|glob\|r\(\?:like\|egexp\)\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b" "id:1263,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\["'`\]\[sd\]\*\?\[\^ws\]W\*\?dW\*\?\.\*\?\["'`d\]" "id:1259,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{3\}\)" "id:1287,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b\[sv"'\-\)`\]\*\?\(\?:!\[<\->\]\|<\[=\->\]\?\|>=\?\|\^\|is\[sv\]\+not\|not\[sv\]\+\(\?:like\|r\(\?:like\|egexp\)\)\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b" "id:1242,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)1\.e\[\(\-\),\]" "id:1261,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "';" "id:1263,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{12\}\)" "id:1273,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "@streq\ %\{TX\.2\}" "id:1241,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)bandb\(\?:\[sv\]\+\(\?:\[0\-9\]\{1,10\}\[sv\]\*\?\[<\->\]\|'\[\^=\]\{1,10\}'\)\|\ \?\(\?:\[0\-9\]\{1,10\}\|\["'\]\[\^=\]\{1,10\}\["'\]\)\ \?\[<\->\]\+\)" "id:1271,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\^\(\?:\[\^'\]\*'\|\[\^"\]\*"\|\[\^`\]\*`\)\[sv\]\*;" "id:1237,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)create\[sv\]\+function\[sv\]\.\+\[sv\]returns\|;\[sv\]\*\?\(\?:alter\|\(\?:\(\?:cre\|trunc\|upd\)at\|renam\)e\|d\(\?:e\(\?:lete\|sc\)\|rop\)\|\(\?:inser\|selec\)t\|load\)b\[sv\]\*\?\[\(\[\]\?\[0\-9A\-Z_a\-z\]\{2,\}" "id:1259,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)W\+d\*\?s\*\?bhavingbs\*\?\[\^s\-\]" "id:1258,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "!@streq\ %\{TX\.2\}" "id:1266,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "W\{4\}" "id:1262,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "@streq\ %\{TX\.2\}" "id:1264,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)select\[sv\]\*\?pg_sleep\|waitfor\[sv\]\*\?delay\[sv\]\?\["'`\]\+\[sv\]\?\[0\-9\]\|;\[sv\]\*\?shutdown\[sv\]\*\?\(\?:\[\#;\{\]\|/\*\|\-\-\)" "id:1235,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i:sleep\(s\*\?d\*\?s\*\?\)\|benchmark\(\.\*\?,\.\*\?\)\)" "id:1254,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)\["'`\]\[sv\]\*\?\(\?:\(\?:and\|n\(\?:and\|ot\)\|\(\?:xx\?\)\?or\|div\|like\|between\|\|\|\|\&\&\)\[sv\]\+\[sv0\-9A\-Z_a\-z\]\+=\[sv\]\*\?\[0\-9A\-Z_a\-z\]\+\[sv\]\*\?having\[sv\]\+\|like\[\^0\-9A\-Z_a\-z\]\*\?\["'0\-9`\]\)\|\[0\-9A\-Z_a\-z\]\[sv\]\+like\[sv\]\+\["'`\]\|like\[sv\]\*\?\["'`\]%\|select\[sv\]\+\?\[sv"'\-\),\-\.0\-9A\-\[\]_\-z\]\+from\[sv\]\+" "id:1244,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{8\}\)" "id:1283,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)b\(\?:orb\(\?:\[sv\]\?\(\?:\[0\-9\]\{1,10\}\|\["'\]\[\^=\]\{1,10\}\["'\]\)\[sv\]\?\[<\->\]\+\|\[sv\]\+\(\?:\[0\-9\]\{1,10\}\|'\[\^=\]\{1,10\}'\)\(\?:\[sv\]\*\?\[<\->\]\)\?\)\|xorb\[sv\]\+\(\?:\[0\-9\]\{1,10\}\|'\[\^=\]\{1,10\}'\)\(\?:\[sv\]\*\?\[<\->\]\)\?\)\|'\[sv\]\+x\?or\[sv\]\+\.\{1,20\}\[!\+\-<\->\]" "id:1247,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)b\(\?:orb\(\?:\[sv\]\?\(\?:\[0\-9\]\{1,10\}\|\["'\]\[\^=\]\{1,10\}\["'\]\)\[sv\]\?\[<\->\]\+\|\[sv\]\+\(\?:\[0\-9\]\{1,10\}\|'\[\^=\]\{1,10\}'\)\(\?:\[sv\]\*\?\[<\->\]\)\?\)\|xorb\[sv\]\+\(\?:\[0\-9\]\{1,10\}\|'\[\^=\]\{1,10\}'\)\(\?:\[sv\]\*\?\[<\->\]\)\?\)\|'\[sv\]\+x\?or\[sv\]\+\.\{1,20\}\[!\+\-<\->\]" "id:1270,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)\["'`\]\[sv\]\*\?\(\?:\(\?:is\[sv\]\+not\|not\[sv\]\+\(\?:like\|glob\|\(\?:betwee\|i\)n\|null\|regexp\|match\)\|mod\|div\|sounds\[sv\]\+like\)b\|\[%\-\&\*\-\+\-/<\->\^\|\]\)" "id:1253,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "!@rx\ \^ey\[\-0\-9A\-Z_a\-z\]\+\.ey\[\-0\-9A\-Z_a\-z\]\+\.\[\-0\-9A\-Z_a\-z\]\+\$" "id:1274,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)\^\(\?:\[\^'\]\*\?\(\?:'\[\^'\]\*\?'\[\^'\]\*\?\)\*\?'\|\[\^"\]\*\?\(\?:"\[\^"\]\*\?"\[\^"\]\*\?\)\*\?"\|\[\^`\]\*\?\(\?:`\[\^`\]\*\?`\[\^`\]\*\?\)\*\?`\)\[sv\]\*\(\[0\-9A\-Z_a\-z\]\+\)b" "id:1254,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)alter\[sv\]\*\?\[0\-9A\-Z_a\-z\]\+\.\*\?char\(\?:acter\)\?\[sv\]\+set\[sv\]\+\[0\-9A\-Z_a\-z\]\+\|\["'`\]\(\?:;\*\?\[sv\]\*\?waitfor\[sv\]\+\(\?:time\|delay\)\[sv\]\+\["'`\]\|;\.\*\?:\[sv\]\*\?goto\)" "id:1256,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{2\}\)" "id:1265,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\^\(\?:\[\^'\]\*'\|\[\^"\]\*"\|\[\^`\]\*`\)\[sv\]\*;" "id:1260,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)create\[sv\]\+function\[sv\]\.\+\[sv\]returns\|;\[sv\]\*\?\(\?:alter\|\(\?:\(\?:cre\|trunc\|upd\)at\|renam\)e\|d\(\?:e\(\?:lete\|sc\)\|rop\)\|\(\?:inser\|selec\)t\|load\)b\[sv\]\*\?\[\(\[\]\?\[0\-9A\-Z_a\-z\]\{2,\}" "id:1236,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)select\[sv\]\*\?pg_sleep\|waitfor\[sv\]\*\?delay\[sv\]\?\["'`\]\+\[sv\]\?\[0\-9\]\|;\[sv\]\*\?shutdown\[sv\]\*\?\(\?:\[\#;\{\]\|/\*\|\-\-\)" "id:1258,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "!@rx\ \^ey\[\-0\-9A\-Z_a\-z\]\+\.ey\[\-0\-9A\-Z_a\-z\]\+\.\[\-0\-9A\-Z_a\-z\]\+\$" "id:1251,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)autonomous_transaction\|\(\?:current_use\|n\?varcha\|tbcreato\)r\|db\(\?:a_users\|ms_java\)\|open\(\?:owa_util\|query\|rowset\)\|s\(\?:p_\(\?:\(\?:addextendedpro\|sqlexe\)c\|execute\(\?:sql\)\?\|help\|is_srvrolemember\|makewebtask\|oacreate\|p\(\?:assword\|repare\)\|replwritetovarbin\)\|ql_\(\?:longvarchar\|variant\)\)\|utl_\(\?:file\|http\)\|xp_\(\?:availablemedia\|\(\?:cmdshel\|servicecontro\)l\|dirtree\|e\(\?:numdsn\|xecresultset\)\|filelist\|loginconfig\|makecab\|ntsec\(\?:_enumdomains\)\?\|reg\(\?:addmultistring\|delete\(\?:key\|value\)\|enum\(\?:key\|value\)s\|re\(\?:ad\|movemultistring\)\|write\)\|terminate\(\?:_process\)\?\)" "id:1272,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "!@streq\ %\{TX\.2\}" "id:1243,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\["'`\]\[sd\]\*\?\[\^ws\]W\*\?dW\*\?\.\*\?\["'`d\]" "id:1282,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)1\.e\[\(\-\),\]" "id:1238,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)\^\(\?:\[\^'\]\*\?\(\?:'\[\^'\]\*\?'\[\^'\]\*\?\)\*\?'\|\[\^"\]\*\?\(\?:"\[\^"\]\*\?"\[\^"\]\*\?\)\*\?"\|\[\^`\]\*\?\(\?:`\[\^`\]\*\?`\[\^`\]\*\?\)\*\?`\)\[sv\]\*\(\[0\-9A\-Z_a\-z\]\+\)b" "id:1277,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\^\(\?:and\|or\)\$" "id:1255,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i:\^\[Wd\]\+s\*\?\(\?:alter\|union\)b\)" "id:1269,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i:sleep\(s\*\?d\*\?s\*\?\)\|benchmark\(\.\*\?,\.\*\?\)\)" "id:1231,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "@detectSQLi" "id:1253,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{6\}\)" "id:1261,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)union\.\*\?select\.\*\?from" "id:1257,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i:b0x\[a\-fd\]\{3,\}\)" "id:1252,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\^\(\?:and\|or\)\$" "id:1278,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)union\.\*\?select\.\*\?from" "id:1234,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\^\.\*\?x5c\['"`\]\(\?:\.\*\?\['"`\]\)\?s\*\(\?:and\|or\)b" "id:1279,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{3\}\)" "id:1264,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{6\}\)" "id:1284,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)alter\[sv\]\*\?\[0\-9A\-Z_a\-z\]\+\.\*\?char\(\?:acter\)\?\[sv\]\+set\[sv\]\+\[0\-9A\-Z_a\-z\]\+\|\["'`\]\(\?:;\*\?\[sv\]\*\?waitfor\[sv\]\+\(\?:time\|delay\)\[sv\]\+\["'`\]\|;\.\*\?:\[sv\]\*\?goto\)" "id:1233,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b\[sv"'\-\)`\]\*\?\(\?:!\[<\->\]\|<\[=\->\]\?\|>=\?\|\^\|is\[sv\]\+not\|not\[sv\]\+\(\?:like\|r\(\?:like\|egexp\)\)\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b" "id:1265,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)bandb\(\?:\[sv\]\+\(\?:\[0\-9\]\{1,10\}\[sv\]\*\?\[<\->\]\|'\[\^=\]\{1,10\}'\)\|\ \?\(\?:\[0\-9\]\{1,10\}\|\["'\]\[\^=\]\{1,10\}\["'\]\)\ \?\[<\->\]\+\)" "id:1248,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "@detectSQLi" "id:1280,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)autonomous_transaction\|\(\?:current_use\|n\?varcha\|tbcreato\)r\|db\(\?:a_users\|ms_java\)\|open\(\?:owa_util\|query\|rowset\)\|s\(\?:p_\(\?:\(\?:addextendedpro\|sqlexe\)c\|execute\(\?:sql\)\?\|help\|is_srvrolemember\|makewebtask\|oacreate\|p\(\?:assword\|repare\)\|replwritetovarbin\)\|ql_\(\?:longvarchar\|variant\)\)\|utl_\(\?:file\|http\)\|xp_\(\?:availablemedia\|\(\?:cmdshel\|servicecontro\)l\|dirtree\|e\(\?:numdsn\|xecresultset\)\|filelist\|loginconfig\|makecab\|ntsec\(\?:_enumdomains\)\?\|reg\(\?:addmultistring\|delete\(\?:key\|value\)\|enum\(\?:key\|value\)s\|re\(\?:ad\|movemultistring\)\|write\)\|terminate\(\?:_process\)\?\)" "id:1249,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)\["'`\]\[sv\]\*\?b\(\?:x\?or\|div\|like\|between\|and\)b\[sv\]\*\?\["'`\]\?\[0\-9\]\|x5cx\(\?:2\[37\]\|3d\)\|\^\(\?:\.\?\["'`\]\$\|\["'x5c`\]\*\?\(\?:\["'0\-9`\]\+\|\[\^"'`\]\+\["'`\]\)\[sv\]\*\?b\(\?:and\|n\(\?:and\|ot\)\|\(\?:xx\?\)\?or\|div\|like\|between\|\|\|\|\&\&\)b\[sv\]\*\?\["'0\-9A\-Z_\-z\]\[!\&\(\-\)\+\-\.@\]\)\|\[\^sv0\-9A\-Z_a\-z\]\[0\-9A\-Z_a\-z\]\+\[sv\]\*\?\[\-\|\]\[sv\]\*\?\["'`\]\[sv\]\*\?\[0\-9A\-Z_a\-z\]\|@\(\?:\[0\-9A\-Z_a\-z\]\+\[sv\]\+\(\?:and\|x\?or\|div\|like\|between\)b\[sv\]\*\?\["'0\-9`\]\+\|\[\-0\-9A\-Z_a\-z\]\+\[sv\]\(\?:and\|x\?or\|div\|like\|between\)b\[sv\]\*\?\[\^sv0\-9A\-Z_a\-z\]\)\|\[\^sv0\-:A\-Z_a\-z\]\[sv\]\*\?\[0\-9\]\[\^0\-9A\-Z_a\-z\]\+\[\^sv0\-9A\-Z_a\-z\]\[sv\]\*\?\["'`\]\.\|\[\^0\-9A\-Z_a\-z\]information_schema\|table_name\[\^0\-9A\-Z_a\-z\]" "id:1268,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "@detectSQLi" "id:1230,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "';" "id:1286,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b\[sv"'\-\)`\]\*\?\(\?:=\|<=>\|\(\?:sounds\[sv\]\+\)\?like\|glob\|r\(\?:like\|egexp\)\)\[sv"'\-\)`\]\*\?b\(\[0\-9A\-Z_a\-z\]\+\)b" "id:1240,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)\["'`\]\[sv\]\*\?\(\?:\(\?:and\|n\(\?:and\|ot\)\|\(\?:xx\?\)\?or\|div\|like\|between\|\|\|\|\&\&\)\[sv\]\+\[sv0\-9A\-Z_a\-z\]\+=\[sv\]\*\?\[0\-9A\-Z_a\-z\]\+\[sv\]\*\?having\[sv\]\+\|like\[\^0\-9A\-Z_a\-z\]\*\?\["'0\-9`\]\)\|\[0\-9A\-Z_a\-z\]\[sv\]\+like\[sv\]\+\["'`\]\|like\[sv\]\*\?\["'`\]%\|select\[sv\]\+\?\[sv"'\-\),\-\.0\-9A\-\[\]_\-z\]\+from\[sv\]\+" "id:1267,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?i\)\["'`\]\[sv\]\*\?b\(\?:x\?or\|div\|like\|between\|and\)b\[sv\]\*\?\["'`\]\?\[0\-9\]\|x5cx\(\?:2\[37\]\|3d\)\|\^\(\?:\.\?\["'`\]\$\|\["'x5c`\]\*\?\(\?:\["'0\-9`\]\+\|\[\^"'`\]\+\["'`\]\)\[sv\]\*\?b\(\?:and\|n\(\?:and\|ot\)\|\(\?:xx\?\)\?or\|div\|like\|between\|\|\|\|\&\&\)b\[sv\]\*\?\["'0\-9A\-Z_\-z\]\[!\&\(\-\)\+\-\.@\]\)\|\[\^sv0\-9A\-Z_a\-z\]\[0\-9A\-Z_a\-z\]\+\[sv\]\*\?\[\-\|\]\[sv\]\*\?\["'`\]\[sv\]\*\?\[0\-9A\-Z_a\-z\]\|@\(\?:\[0\-9A\-Z_a\-z\]\+\[sv\]\+\(\?:and\|x\?or\|div\|like\|between\)b\[sv\]\*\?\["'0\-9`\]\+\|\[\-0\-9A\-Z_a\-z\]\+\[sv\]\(\?:and\|x\?or\|div\|like\|between\)b\[sv\]\*\?\[\^sv0\-9A\-Z_a\-z\]\)\|\[\^sv0\-:A\-Z_a\-z\]\[sv\]\*\?\[0\-9\]\[\^0\-9A\-Z_a\-z\]\+\[\^sv0\-9A\-Z_a\-z\]\[sv\]\*\?\["'`\]\.\|\[\^0\-9A\-Z_a\-z\]information_schema\|table_name\[\^0\-9A\-Z_a\-z\]" "id:1245,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{2\}\)" "id:1288,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\?:\^s\*\["'`;\]\+\|\["'`\]\+s\*\$\)" "id:1239,phase:1,deny,status:403,log,msg:'sqli attack detected'"
SecRule REQUEST_URI "\(\?i\)\["'`\]\[sv\]\*\?\(\?:\(\?:is\[sv\]\+not\|not\[sv\]\+\(\?:like\|glob\|\(\?:betwee\|i\)n\|null\|regexp\|match\)\|mod\|div\|sounds\[sv\]\+like\)b\|\[%\-\&\*\-\+\-/<\->\^\|\]\)" "id:1276,phase:1,deny,status:403,log,msg:'sqli attack detected'" SecRule REQUEST_URI "\(\(\?:\[\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\[\^\~!@\#\$%\^\&\*\(\)\-\+=\{\}\[\]\|:;"'´`<>\]\*\?\)\{8\}\)" "id:1260,phase:1,deny,status:403,log,msg:'sqli attack detected'"

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,17 @@
# HAProxy WAF ACL rules # HAProxy WAF ACL rules
acl block_exceptions hdr_sub(User-Agent) -i @streq GET /
http-request deny if block_exceptions
acl block_exceptions hdr_sub(User-Agent) -i @ipMatch 127.0.0.1,::1
http-request deny if block_exceptions
acl block_exceptions hdr_sub(User-Agent) -i @endsWith (internal dummy connection)
http-request deny if block_exceptions
acl block_exceptions hdr_sub(User-Agent) -i ^(GET /|OPTIONS *) HTTP/[12]\.[01]$
http-request deny if block_exceptions
acl block_initialization hdr_sub(User-Agent) -i ^\.*$ acl block_initialization hdr_sub(User-Agent) -i ^\.*$
http-request deny if block_initialization http-request deny if block_initialization
@ -15,93 +27,6 @@ http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i content-transfer-encoding:(\.*) acl block_attack hdr_sub(User-Agent) -i content-transfer-encoding:(\.*)
http-request deny if block_attack http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i (get|post|head|options|connect|put|delete|trace|track|patch|propfind|propatch|mkcol|copy|move|lock|unlock)s+[^s]+s+http/d
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i [rn]W*?(content-(type|length)|set-cookie|location):s*w
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i (bhttp/d|<(html|meta)b)
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i [nr]
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i [nr]+(s|location|refresh|(set-)?cookie|(x-)?(forwarded-(for|host|server)|host|via|remote-ip|remote-addr|originating-IP))s*:
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i ^[^sv,;]+[sv,;]\.*?(application/(\.++)?json|(application/(soap+)?|text/)xml)
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i unix:[^|]*|
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i ^[^sv,;]+[sv,;]\.*?b(((tex|multipar)t|application)|((audi|vide)o|image|cs[sv]|(vn|relate)d|p(df|lain)|json|(soa|cs)p|x(ml|-www-form-urlencoded)|form-data|x-amf|(octe|repor)t|stream)|([+/]))b
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i \.
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i TX:paramcounter_(\.*)
http-request deny if block_attack
acl block_lfi hdr_sub(User-Agent) -i ((^|[x5c/;])\.{2,3}[x5c/;]|[x5c/;]\.{2,3}([x5c/;]|$))
http-request deny if block_lfi
acl block_generic hdr_sub(User-Agent) -i while[sv]*([sv(]*(!+(false|null|undefined|NaN|[+-]?0|"{2}|'{2}|`{2})|(!!)*((t(rue|his)|[+-]?(Infinity|[1-9][0-9]*)|new [A-Za-z][0-9A-Z_a-z]*|window|String|(Boolea|Functio)n|Object|Array)b|{\.*}|[\.*]|"[^"]+"|'[^']+'|`[^`]+`))\.*)
http-request deny if block_generic
acl block_generic hdr_sub(User-Agent) -i [s*constructors*]
http-request deny if block_generic
acl block_generic hdr_sub(User-Agent) -i @{\.*}
http-request deny if block_generic
acl block_fixation hdr_sub(User-Agent) -i (?i:.cookieb\.*?;W*?(expires|domain)W*?=|bhttp-equivW+set-cookieb)
http-request deny if block_fixation
acl block_fixation hdr_sub(User-Agent) -i ^(jsessionid|aspsessionid|asp.net_sessionid|phpsession|phpsessid|weblogicsession|session_id|session-id|cfid|cftoken|cfsid|jservsession|jwsession)$
http-request deny if block_fixation
acl block_fixation hdr_sub(User-Agent) -i ^(ht|f)tps?://(\.*?)/
http-request deny if block_fixation
acl block_fixation hdr_sub(User-Agent) -i !@endsWith %{request_headers.host}
http-request deny if block_fixation
acl block_rfi hdr_sub(User-Agent) -i ^(?i:file|ftps?|https?)://(d{1,3}.d{1,3}.d{1,3}.d{1,3})
http-request deny if block_rfi
acl block_rfi hdr_sub(User-Agent) -i !@endsWith \.%{request_headers.host}
http-request deny if block_rfi
acl block_php hdr_sub(User-Agent) -i (<?([^x]|x[^m]|xm[^l]|xml[^s]|xml$|$)|<?php|[(/|x5c)?php])
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i \.*.ph(pd*|tml|ar|ps|t|pt)\.*$
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i @pm =
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i php://(std(in|out|err)|(in|out)put|fd|memory|temp|filter)
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i (bzip2|expect|glob|ogg|(ph|r)ar|ssh2(\.(s(hell|(ft|c)p)|exec|tunnel))?|z(ip|lib))://
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i [oOcC]:d+:"\.+?":d+:{\.*}
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i AUTH_TYPE|HTTP_(ACCEPT(_(CHARSET|ENCODING|LANGUAGE))?|CONNECTION|(HOS|USER_AGEN)T|KEEP_ALIVE|(REFERE|X_FORWARDED_FO)R)|ORIG_PATH_INFO|PATH_(INFO|TRANSLATED)|QUERY_STRING|REQUEST_URI
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i \.*\.(phpd*|phtml)\.\.*$
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i @pm ?>
http-request deny if block_php
acl block_enforcement hdr_sub(User-Agent) -i !^(&(([acegiln-or-suz]acut|[aeiou]grav|[ain-o]tild)e|[c-elnr-tz]caron|([cgk-lnr-t]cedi|[aeiouy]um)l|[aceg-josuwy]circ|[au]ring|a(mp|pos)|nbsp|oslash);|[^"';=])*$ acl block_enforcement hdr_sub(User-Agent) -i !^(&(([acegiln-or-suz]acut|[aeiou]grav|[ain-o]tild)e|[c-elnr-tz]caron|([cgk-lnr-t]cedi|[aeiouy]um)l|[aceg-josuwy]circ|[au]ring|a(mp|pos)|nbsp|oslash);|[^"';=])*$
http-request deny if block_enforcement http-request deny if block_enforcement
@ -243,6 +168,24 @@ http-request deny if block_enforcement
acl block_enforcement hdr_sub(User-Agent) -i (^|[^x5c])x5c[cdeghijklmpqwxyz123456789] acl block_enforcement hdr_sub(User-Agent) -i (^|[^x5c])x5c[cdeghijklmpqwxyz123456789]
http-request deny if block_enforcement http-request deny if block_enforcement
acl block_lfi hdr_sub(User-Agent) -i ((^|[x5c/;])\.{2,3}[x5c/;]|[x5c/;]\.{2,3}([x5c/;]|$))
http-request deny if block_lfi
acl block_generic hdr_sub(User-Agent) -i while[sv]*([sv(]*(!+(false|null|undefined|NaN|[+-]?0|"{2}|'{2}|`{2})|(!!)*((t(rue|his)|[+-]?(Infinity|[1-9][0-9]*)|new [A-Za-z][0-9A-Z_a-z]*|window|String|(Boolea|Functio)n|Object|Array)b|{\.*}|[\.*]|"[^"]+"|'[^']+'|`[^`]+`))\.*)
http-request deny if block_generic
acl block_generic hdr_sub(User-Agent) -i [s*constructors*]
http-request deny if block_generic
acl block_generic hdr_sub(User-Agent) -i @{\.*}
http-request deny if block_generic
acl block_rfi hdr_sub(User-Agent) -i ^(?i:file|ftps?|https?)://(d{1,3}.d{1,3}.d{1,3}.d{1,3})
http-request deny if block_rfi
acl block_rfi hdr_sub(User-Agent) -i !@endsWith \.%{request_headers.host}
http-request deny if block_rfi
acl block_java hdr_sub(User-Agent) -i java.lang\.(runtime|processbuilder) acl block_java hdr_sub(User-Agent) -i java.lang\.(runtime|processbuilder)
http-request deny if block_java http-request deny if block_java
@ -282,6 +225,120 @@ http-request deny if block_java
acl block_java hdr_sub(User-Agent) -i ($|\$?)({|&l(brace|cub);?) acl block_java hdr_sub(User-Agent) -i ($|\$?)({|&l(brace|cub);?)
http-request deny if block_java http-request deny if block_java
acl block_fixation hdr_sub(User-Agent) -i (?i:.cookieb\.*?;W*?(expires|domain)W*?=|bhttp-equivW+set-cookieb)
http-request deny if block_fixation
acl block_fixation hdr_sub(User-Agent) -i ^(jsessionid|aspsessionid|asp.net_sessionid|phpsession|phpsessid|weblogicsession|session_id|session-id|cfid|cftoken|cfsid|jservsession|jwsession)$
http-request deny if block_fixation
acl block_fixation hdr_sub(User-Agent) -i ^(ht|f)tps?://(\.*?)/
http-request deny if block_fixation
acl block_fixation hdr_sub(User-Agent) -i !@endsWith %{request_headers.host}
http-request deny if block_fixation
acl block_attack hdr_sub(User-Agent) -i (get|post|head|options|connect|put|delete|trace|track|patch|propfind|propatch|mkcol|copy|move|lock|unlock)s+[^s]+s+http/d
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i [rn]W*?(content-(type|length)|set-cookie|location):s*w
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i (bhttp/d|<(html|meta)b)
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i [nr]
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i [nr]+(s|location|refresh|(set-)?cookie|(x-)?(forwarded-(for|host|server)|host|via|remote-ip|remote-addr|originating-IP))s*:
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i unix:[^|]*|
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i ^[^sv,;]+[sv,;]\.*?b(((tex|multipar)t|application)|((audi|vide)o|image|cs[sv]|(vn|relate)d|p(df|lain)|json|(soa|cs)p|x(ml|-www-form-urlencoded)|form-data|x-amf|(octe|repor)t|stream)|([+/]))b
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i \.
http-request deny if block_attack
acl block_attack hdr_sub(User-Agent) -i TX:paramcounter_(\.*)
http-request deny if block_attack
acl block_sql hdr_sub(User-Agent) -i (?i:JET Database Engine|Access Database Engine|[Microsoft][ODBC Microsoft Access Driver])
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:ORA-[0-9][0-9][0-9][0-9]|java.sql.SQLException|Oracle error|Oracle\.*Driver|Warning\.*oci_\.*|Warning\.*ora_\.*)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:[DM_QUERY_E_SYNTAX]|has occurred in the vicinity of:)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i Dynamic SQL Error
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i Exception (condition )?d+\. Transaction rollback\.
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i org.hsqldb.jdbc
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:An illegal character has been found in the statement|com.informix.jdbc|Exception\.*Informix)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:Warning\.*ingres_|Ingres SQLSTATE|IngresW\.*Driver)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:<b>Warning</b>: ibase_|Unexpected end of command in statement)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:SQL error\.*POS[0-9]+\.*|Warning\.*maxdb\.*)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (System.Data.OleDb.OleDbException|[Microsoft][ODBC SQL Server Driver]|[Macromedia][SQLServer JDBC Driver]|[SqlException|System.Data.SqlClient.SqlException|Unclosed quotation mark after the character string|'80040e14'|mssql_query()|Microsoft OLE DB Provider for ODBC Drivers|Microsoft OLE DB Provider for SQL Server|Incorrect syntax near|Sintaxis incorrecta cerca de|Syntax error in string in query expression|Procedure or function \.* expects parameter|Unclosed quotation mark before the character string|Syntax error \.* in query expression|Data type mismatch in criteria expression\.|ADODB.Field (0x800A0BCD)|the used select statements have different number of columns|OLE DB\.*SQL Server|Warning\.*mssql_\.*|Driver\.*SQL[ _-]*Server|SQL Server\.*Driver|SQL Server\.*[0-9a-fA-F]{8}|Exception\.*WSystem.Data.SqlClient\.|Conversion failed when converting the varchar value \.*? to data type int\.)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (Warning\.*sqlite_\.*|Warning\.*SQLite3::|SQLite/JDBCDriver|SQLite.Exception|System.Data.SQLite.SQLiteException)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (Sybase message:|Warning\.{2,20}sybase|Sybase\.*Server message\.*)
http-request deny if block_sql
acl block_php hdr_sub(User-Agent) -i (<?([^x]|x[^m]|xm[^l]|xml[^s]|xml$|$)|<?php|[(/|x5c)?php])
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i \.*.ph(pd*|tml|ar|ps|t|pt)\.*$
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i @pm =
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i php://(std(in|out|err)|(in|out)put|fd|memory|temp|filter)
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i (bzip2|expect|glob|ogg|(ph|r)ar|ssh2(\.(s(hell|(ft|c)p)|exec|tunnel))?|z(ip|lib))://
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i [oOcC]:d+:"\.+?":d+:{\.*}
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i AUTH_TYPE|HTTP_(ACCEPT(_(CHARSET|ENCODING|LANGUAGE))?|CONNECTION|(HOS|USER_AGEN)T|KEEP_ALIVE|(REFERE|X_FORWARDED_FO)R)|ORIG_PATH_INFO|PATH_(INFO|TRANSLATED)|QUERY_STRING|REQUEST_URI
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i \.*\.(phpd*|phtml)\.\.*$
http-request deny if block_php
acl block_php hdr_sub(User-Agent) -i @pm ?>
http-request deny if block_php
acl block_leakages hdr_sub(User-Agent) -i (<(TITLE>Index of\.*?<H|title>Index of\.*?<h)1>Index of|>[To Parent Directory]</[Aa]><br>)
http-request deny if block_leakages
acl block_leakages hdr_sub(User-Agent) -i ^#!s?/
http-request deny if block_leakages
acl block_leakages hdr_sub(User-Agent) -i ^5d{2}$
http-request deny if block_leakages
acl block_xss hdr_sub(User-Agent) -i !@validateByteRange 20, 45-47, 48-57, 65-90, 95, 97-122 acl block_xss hdr_sub(User-Agent) -i !@validateByteRange 20, 45-47, 48-57, 65-90, 95, 97-122
http-request deny if block_xss http-request deny if block_xss
@ -357,126 +414,6 @@ http-request deny if block_xss
acl block_xss hdr_sub(User-Agent) -i {{\.*?}} acl block_xss hdr_sub(User-Agent) -i {{\.*?}}
http-request deny if block_xss http-request deny if block_xss
acl block_leakages hdr_sub(User-Agent) -i (<(TITLE>Index of\.*?<H|title>Index of\.*?<h)1>Index of|>[To Parent Directory]</[Aa]><br>)
http-request deny if block_leakages
acl block_leakages hdr_sub(User-Agent) -i ^#!s?/
http-request deny if block_leakages
acl block_leakages hdr_sub(User-Agent) -i ^5d{2}$
http-request deny if block_leakages
acl block_sql hdr_sub(User-Agent) -i (?i:JET Database Engine|Access Database Engine|[Microsoft][ODBC Microsoft Access Driver])
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:ORA-[0-9][0-9][0-9][0-9]|java.sql.SQLException|Oracle error|Oracle\.*Driver|Warning\.*oci_\.*|Warning\.*ora_\.*)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:[DM_QUERY_E_SYNTAX]|has occurred in the vicinity of:)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i Dynamic SQL Error
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i Exception (condition )?d+\. Transaction rollback\.
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i org.hsqldb.jdbc
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:An illegal character has been found in the statement|com.informix.jdbc|Exception\.*Informix)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:Warning\.*ingres_|Ingres SQLSTATE|IngresW\.*Driver)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:<b>Warning</b>: ibase_|Unexpected end of command in statement)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (?i:SQL error\.*POS[0-9]+\.*|Warning\.*maxdb\.*)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (System.Data.OleDb.OleDbException|[Microsoft][ODBC SQL Server Driver]|[Macromedia][SQLServer JDBC Driver]|[SqlException|System.Data.SqlClient.SqlException|Unclosed quotation mark after the character string|'80040e14'|mssql_query()|Microsoft OLE DB Provider for ODBC Drivers|Microsoft OLE DB Provider for SQL Server|Incorrect syntax near|Sintaxis incorrecta cerca de|Syntax error in string in query expression|Procedure or function \.* expects parameter|Unclosed quotation mark before the character string|Syntax error \.* in query expression|Data type mismatch in criteria expression\.|ADODB.Field (0x800A0BCD)|the used select statements have different number of columns|OLE DB\.*SQL Server|Warning\.*mssql_\.*|Driver\.*SQL[ _-]*Server|SQL Server\.*Driver|SQL Server\.*[0-9a-fA-F]{8}|Exception\.*WSystem.Data.SqlClient\.|Conversion failed when converting the varchar value \.*? to data type int\.)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (Warning\.*sqlite_\.*|Warning\.*SQLite3::|SQLite/JDBCDriver|SQLite.Exception|System.Data.SQLite.SQLiteException)
http-request deny if block_sql
acl block_sql hdr_sub(User-Agent) -i (Sybase message:|Warning\.{2,20}sybase|Sybase\.*Server message\.*)
http-request deny if block_sql
acl block_rce hdr_sub(User-Agent) -i $(((\.*|(\.*)))|{\.*})|[<>](\.*)|/[0-9A-Z_a-z]*[!?\.+]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i b(for(/[dflr]\.*)? %+[^ ]+ in(\.*)[sv]?do|if(/i)?( not)?( (e(xist|rrorlevel)|defined|cmdextversion)b|[ (]\.*(b(g(eq|tr)|equ|neq|l(eq|ss))b|==)))
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ![0-9]s*'s*[0-9]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i !-d
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ^(s*)s+{
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ba["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?l["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?i["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?a["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?sb[sv]+[!-"%',0-9@-Z_a-z]+=[^sv]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ($((((\.*)|\.*))|{\.*})|[<>](\.*)|[!?\.+])
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i /
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i s
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ^[^\.]+\.[^;?]+[;?](\.*(['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]))
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ^[^\.]*?(['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{])
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ;[sv]*\.[sv]*["']?(a(rchive|uth)|b(a(ckup|il)|inary)|c(d|h(anges|eck)|lone|onnection)|d(atabases|b(config|info)|ump)|e(cho|qp|x(cel|it|p(ert|lain)))|f(ilectrl|ullschema)|he(aders|lp)|i(mpo(rt|ster)|ndexes|otrace)|l(i(mi|n)t|o(ad|g))|(mod|n(onc|ullvalu)|unmodul)e|o(nce|pen|utput)|p(arameter|r(int|o(gress|mpt)))|quit|re(ad|cover|store)|s(ave|c(anstats|hema)|e(lftest|parator|ssion)|h(a3sum|ell|ow)?|tats|ystem)|t(ables|estc(ase|trl)|ime(out|r)|race)|vfs(info|list|name)|width)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i rn(?s:\.)*?b((?i:E)(HLO [--.A-Za-zx17fx212a]{1,255}|XPN \.{1,64})|HELO [--.A-Za-zx17fx212a]{1,255}|MAIL FROM:<\.{1,64}(?i:@)\.{1,255}(?i:>)|(?i:R)(CPT TO:((?i:<)\.{1,64}(?i:@)\.{1,255}(?i:>)|(?i: ))?(?i:<)\.{1,64}(?i:>)|SETb)|VRFY \.{1,64}( <\.{1,64}(?i:@)\.{1,255}(?i:>)|(?i:@)\.{1,255})|AUTH [-0-9A-Z_a-zx17fx212a]{1,20}(?i: )(([+/-9A-Z_a-zx17fx212a]{4})*([+/-9A-Z_a-zx17fx212a]{2}(?i:=)|[+/-9A-Z_a-zx17fx212a]{3}))?(?i:=)|STARTTLSb|NOOPb((?i: )\.{1,255})?)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i (?is)rn\.*?b((LIST|TOP [0-9]+)( [0-9]+)?|U(SER \.+?|IDL( [0-9]+)?)|PASS \.+?|(RETR|DELE) [0-9]+?|A(POP [0-9A-Z_a-z]+ [0-9a-f]{32}|UTH [-0-9A-Z_]{1,20} (([+/-9A-Z_a-z]{4})*([+/-9A-Z_a-z]{2}=|[+/-9A-Z_a-z]{3}))?=))
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i /([?*]+[a-z/]+|[a-z/]+[?*]+)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i rn(?s:\.)*?b(DATA|QUIT|HELP( \.{1,255})?)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i (?is)rn[0-9A-Z_a-z]{1,50}b (C((REATE|OPY [*,0-:]+) ["-#%-&*--9A-Zx5c_a-z]+|APABILITY|HECK|LOSE)|DELETE ["-#%-&*--.0-9A-Zx5c_a-z]+|EX(AMINE ["-#%-&*--.0-9A-Zx5c_a-z]+|PUNGE)|FETCH [*,0-:]+|L(IST ["-#*--9A-Zx5c_a-z~]+? ["-#%-&*--9A-Zx5c_a-z]+|OG(IN [--.0-9@_a-z]{1,40} \.*?|OUT))|RENAME ["-#%-&*--9A-Zx5c_a-z]+? ["-#%-&*--9A-Zx5c_a-z]+|S(E(LECT ["-#%-&*--9A-Zx5c_a-z]+|ARCH( CHARSET [--.0-9A-Z_a-z]{1,40})? ((KEYWORD x5c)?(A(LL|NSWERED)|BCC|D(ELETED|RAFT)|(FLAGGE|OL)D|RECENT|SEEN|UN((ANSWER|FLAGG)ED|D(ELETED|RAFT)|SEEN)|NEW)|(BODY|CC|FROM|HEADER \.{1,100}|NOT|OR \.{1,255}|T(EXT|O)) \.{1,255}|LARGER [0-9]{1,20}|[*,0-:]+|(BEFORE|ON|S(ENT((BEFOR|SINC)E|ON)|INCE)) "?[0-9]{1,2}-[0-9A-Z_a-z]{3}-[0-9]{4}"?|S(MALLER [0-9]{1,20}|UBJECT \.{1,255})|U(ID [*,0-:]+?|NKEYWORD x5c(Seen|(Answer|Flagg)ed|D(eleted|raft)|Recent))))|T(ORE [*,0-:]+? [+-]?FLAGS(.SILENT)? ((x5c[a-z]{1,20}))?|ARTTLS)|UBSCRIBE ["-#%-&*--9A-Zx5c_a-z]+)|UN(SUBSCRIBE ["-#%-&*--9A-Zx5c_a-z]+|AUTHENTICATE)|NOOP)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i rn(?s:\.)*?b((QUI|STA|RSE)(?i:T)|NOOP|CAPA)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i !(d|!)
http-request deny if block_rce
acl block_exceptions hdr_sub(User-Agent) -i @streq GET /
http-request deny if block_exceptions
acl block_exceptions hdr_sub(User-Agent) -i @ipMatch 127.0.0.1,::1
http-request deny if block_exceptions
acl block_exceptions hdr_sub(User-Agent) -i @endsWith (internal dummy connection)
http-request deny if block_exceptions
acl block_exceptions hdr_sub(User-Agent) -i ^(GET /|OPTIONS *) HTTP/[12]\.[01]$
http-request deny if block_exceptions
acl block_sqli hdr_sub(User-Agent) -i @detectSQLi acl block_sqli hdr_sub(User-Agent) -i @detectSQLi
http-request deny if block_sqli http-request deny if block_sqli
@ -582,6 +519,66 @@ http-request deny if block_sqli
acl block_sqli hdr_sub(User-Agent) -i (([~!@#$%^&*()-+={}[]|:;"'´`<>][^~!@#$%^&*()-+={}[]|:;"'´`<>]*?){2}) acl block_sqli hdr_sub(User-Agent) -i (([~!@#$%^&*()-+={}[]|:;"'´`<>][^~!@#$%^&*()-+={}[]|:;"'´`<>]*?){2})
http-request deny if block_sqli http-request deny if block_sqli
acl block_rce hdr_sub(User-Agent) -i $(((\.*|(\.*)))|{\.*})|[<>](\.*)|/[0-9A-Z_a-z]*[!?\.+]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i b(for(/[dflr]\.*)? %+[^ ]+ in(\.*)[sv]?do|if(/i)?( not)?( (e(xist|rrorlevel)|defined|cmdextversion)b|[ (]\.*(b(g(eq|tr)|equ|neq|l(eq|ss))b|==)))
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ![0-9]s*'s*[0-9]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i !-d
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ^(s*)s+{
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ba["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?l["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?i["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?a["')[-x5c]*(((|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?sb[sv]+[!-"%',0-9@-Z_a-z]+=[^sv]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ($((((\.*)|\.*))|{\.*})|[<>](\.*)|[!?\.+])
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i /
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i s
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ^[^\.]+\.[^;?]+[;?](\.*(['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]))
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ^[^\.]*?(['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{])
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i ;[sv]*\.[sv]*["']?(a(rchive|uth)|b(a(ckup|il)|inary)|c(d|h(anges|eck)|lone|onnection)|d(atabases|b(config|info)|ump)|e(cho|qp|x(cel|it|p(ert|lain)))|f(ilectrl|ullschema)|he(aders|lp)|i(mpo(rt|ster)|ndexes|otrace)|l(i(mi|n)t|o(ad|g))|(mod|n(onc|ullvalu)|unmodul)e|o(nce|pen|utput)|p(arameter|r(int|o(gress|mpt)))|quit|re(ad|cover|store)|s(ave|c(anstats|hema)|e(lftest|parator|ssion)|h(a3sum|ell|ow)?|tats|ystem)|t(ables|estc(ase|trl)|ime(out|r)|race)|vfs(info|list|name)|width)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i rn(?s:\.)*?b((?i:E)(HLO [--.A-Za-zx17fx212a]{1,255}|XPN \.{1,64})|HELO [--.A-Za-zx17fx212a]{1,255}|MAIL FROM:<\.{1,64}(?i:@)\.{1,255}(?i:>)|(?i:R)(CPT TO:((?i:<)\.{1,64}(?i:@)\.{1,255}(?i:>)|(?i: ))?(?i:<)\.{1,64}(?i:>)|SETb)|VRFY \.{1,64}( <\.{1,64}(?i:@)\.{1,255}(?i:>)|(?i:@)\.{1,255})|AUTH [-0-9A-Z_a-zx17fx212a]{1,20}(?i: )(([+/-9A-Z_a-zx17fx212a]{4})*([+/-9A-Z_a-zx17fx212a]{2}(?i:=)|[+/-9A-Z_a-zx17fx212a]{3}))?(?i:=)|STARTTLSb|NOOPb((?i: )\.{1,255})?)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i (?is)rn\.*?b((LIST|TOP [0-9]+)( [0-9]+)?|U(SER \.+?|IDL( [0-9]+)?)|PASS \.+?|(RETR|DELE) [0-9]+?|A(POP [0-9A-Z_a-z]+ [0-9a-f]{32}|UTH [-0-9A-Z_]{1,20} (([+/-9A-Z_a-z]{4})*([+/-9A-Z_a-z]{2}=|[+/-9A-Z_a-z]{3}))?=))
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i /([?*]+[a-z/]+|[a-z/]+[?*]+)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i rn(?s:\.)*?b(DATA|QUIT|HELP( \.{1,255})?)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i (?is)rn[0-9A-Z_a-z]{1,50}b (C((REATE|OPY [*,0-:]+) ["-#%-&*--9A-Zx5c_a-z]+|APABILITY|HECK|LOSE)|DELETE ["-#%-&*--.0-9A-Zx5c_a-z]+|EX(AMINE ["-#%-&*--.0-9A-Zx5c_a-z]+|PUNGE)|FETCH [*,0-:]+|L(IST ["-#*--9A-Zx5c_a-z~]+? ["-#%-&*--9A-Zx5c_a-z]+|OG(IN [--.0-9@_a-z]{1,40} \.*?|OUT))|RENAME ["-#%-&*--9A-Zx5c_a-z]+? ["-#%-&*--9A-Zx5c_a-z]+|S(E(LECT ["-#%-&*--9A-Zx5c_a-z]+|ARCH( CHARSET [--.0-9A-Z_a-z]{1,40})? ((KEYWORD x5c)?(A(LL|NSWERED)|BCC|D(ELETED|RAFT)|(FLAGGE|OL)D|RECENT|SEEN|UN((ANSWER|FLAGG)ED|D(ELETED|RAFT)|SEEN)|NEW)|(BODY|CC|FROM|HEADER \.{1,100}|NOT|OR \.{1,255}|T(EXT|O)) \.{1,255}|LARGER [0-9]{1,20}|[*,0-:]+|(BEFORE|ON|S(ENT((BEFOR|SINC)E|ON)|INCE)) "?[0-9]{1,2}-[0-9A-Z_a-z]{3}-[0-9]{4}"?|S(MALLER [0-9]{1,20}|UBJECT \.{1,255})|U(ID [*,0-:]+?|NKEYWORD x5c(Seen|(Answer|Flagg)ed|D(eleted|raft)|Recent))))|T(ORE [*,0-:]+? [+-]?FLAGS(.SILENT)? ((x5c[a-z]{1,20}))?|ARTTLS)|UBSCRIBE ["-#%-&*--9A-Zx5c_a-z]+)|UN(SUBSCRIBE ["-#%-&*--9A-Zx5c_a-z]+|AUTHENTICATE)|NOOP)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i rn(?s:\.)*?b((QUI|STA|RSE)(?i:T)|NOOP|CAPA)
http-request deny if block_rce
acl block_rce hdr_sub(User-Agent) -i !(d|!)
http-request deny if block_rce
acl block_php hdr_sub(User-Agent) -i (b(f(tp_(nb_)?f?(ge|pu)t|get(s?s|c)|scanf|write|open|read)|gz((encod|writ)e|compress|open|read)|s(ession_start|candir)|read((gz)?file|dir)|move_uploaded_file|(proc_|bz)open|call_user_func)|$_((pos|ge)t|session))b acl block_php hdr_sub(User-Agent) -i (b(f(tp_(nb_)?f?(ge|pu)t|get(s?s|c)|scanf|write|open|read)|gz((encod|writ)e|compress|open|read)|s(ession_start|candir)|read((gz)?file|dir)|move_uploaded_file|(proc_|bz)open|call_user_func)|$_((pos|ge)t|session))b
http-request deny if block_php http-request deny if block_php

View File

@ -4,19 +4,19 @@
map $request_uri $waf_block_attack { map $request_uri $waf_block_attack {
default 0; default 0;
"~*(?:bhttp/d|<(?:html|meta)b)" 1;
"~*^[^sv,;]+[sv,;].*?b(?:((?:tex|multipar)t|application)|((?:audi|vide)o|image|cs[sv]|(?:vn|relate)d|p(?:df|lain)|json|(?:soa|cs)p|x(?:ml|-www-form-urlencoded)|form-data|x-amf|(?:octe|repor)t|stream)|([+/]))b" 1; "~*^[^sv,;]+[sv,;].*?b(?:((?:tex|multipar)t|application)|((?:audi|vide)o|image|cs[sv]|(?:vn|relate)d|p(?:df|lain)|json|(?:soa|cs)p|x(?:ml|-www-form-urlencoded)|form-data|x-amf|(?:octe|repor)t|stream)|([+/]))b" 1;
"~*[nr]" 1; "~*@gt 0" 1;
"~*^content-types*:s*(.*)$" 1; "~*." 1;
"~*content-transfer-encoding:(.*)" 1; "~*unix:[^|]*|" 1;
"~*(?:get|post|head|options|connect|put|delete|trace|track|patch|propfind|propatch|mkcol|copy|move|lock|unlock)s+[^s]+s+http/d" 1; "~*(?:get|post|head|options|connect|put|delete|trace|track|patch|propfind|propatch|mkcol|copy|move|lock|unlock)s+[^s]+s+http/d" 1;
"~*@gt 1" 1; "~*@gt 1" 1;
"~*^content-types*:s*(.*)$" 1;
"~*[nr]" 1;
"~*TX:paramcounter_(.*)" 1; "~*TX:paramcounter_(.*)" 1;
"~*@gt 0" 1;
"~*[rn]W*?(?:content-(?:type|length)|set-cookie|location):s*w" 1; "~*[rn]W*?(?:content-(?:type|length)|set-cookie|location):s*w" 1;
"~*[nr]+(?:s|location|refresh|(?:set-)?cookie|(?:x-)?(?:forwarded-(?:for|host|server)|host|via|remote-ip|remote-addr|originating-IP))s*:" 1; "~*[nr]+(?:s|location|refresh|(?:set-)?cookie|(?:x-)?(?:forwarded-(?:for|host|server)|host|via|remote-ip|remote-addr|originating-IP))s*:" 1;
"~*unix:[^|]*|" 1; "~*content-transfer-encoding:(.*)" 1;
"~*." 1;
"~*(?:bhttp/d|<(?:html|meta)b)" 1;
} }
if ($waf_block_attack) { if ($waf_block_attack) {

View File

@ -4,11 +4,11 @@
map $request_uri $waf_block_correlation { map $request_uri $waf_block_correlation {
default 0; default 0;
"~*@ge %{tx.outbound_anomaly_score_threshold}" 1;
"~*@ge %{tx.inbound_anomaly_score_threshold}" 1;
"~*@ge 5" 1; "~*@ge 5" 1;
"~*@ge %{tx.outbound_anomaly_score_threshold}" 1;
"~*@gt 0" 1; "~*@gt 0" 1;
"~*@eq 0" 1; "~*@eq 0" 1;
"~*@ge %{tx.inbound_anomaly_score_threshold}" 1;
} }
if ($waf_block_correlation) { if ($waf_block_correlation) {

View File

@ -4,65 +4,65 @@
map $request_uri $waf_block_enforcement { map $request_uri $waf_block_enforcement {
default 0; default 0;
"~*!@rx ^[w/.+*-]+(?:s?;s?(?:action|boundary|charset|component|start(?:-info)?|type|version)s?=s?['\"w.()+,/:=?<>@#*-]+)*$" 1;
"~*!@rx ^(?:OPTIONS|CONNECT)$" 1;
"~*@eq 1" 1;
"~*.([^.]+)$" 1;
"~*@validateByteRange 38,44-46,48-58,61,65-90,95,97-122" 1;
"~*@gt %{tx.total_arg_length}" 1;
"~*!@streq JSON" 1;
"~*^(?:GET|HEAD)$" 1;
"~*@validateUtf8Encoding" 1;
"~*.[^.~]+~(?:/.*|)$" 1;
"~*@validateByteRange 32,34,38,42-59,61,65-90,95,97-122" 1;
"~*%u[fF]{2}[0-9a-fA-F]{2}" 1;
"~*!@pm AppleWebKit Android Business Enterprise Entreprise" 1;
"~*@gt %{tx.max_num_args}" 1;
"~*!@rx ^(?:(?:max-age=[0-9]+|min-fresh=[0-9]+|no-cache|no-store|no-transform|only-if-cached|max-stale(?:=[0-9]+)?)(?:s*,s*|$)){1,7}$" 1;
"~*^(?i)up" 1;
"~*!@pm AppleWebKit Android" 1;
"~*@streq POST" 1;
"~*^.*$" 1; "~*^.*$" 1;
"~*!@rx ^d+$" 1; "~*@eq 1" 1;
"~*@validateUrlEncoding" 1;
"~*@gt %{tx.arg_length}" 1; "~*@gt %{tx.arg_length}" 1;
"~*@gt %{tx.combined_file_sizes}" 1;
"~*^bytes=(?:(?:d+)?-(?:d+)?s*,?s*){63}" 1;
"~*@ge 1" 1;
"~*@gt %{tx.arg_name_length}" 1;
"~*!@rx (?i)^(?:&(?:(?:[acegiln-or-suz]acut|[aeiou]grav|[ain-o]tild)e|[c-elnr-tz]caron|(?:[cgk-lnr-t]cedi|[aeiouy]um)l|[aceg-josuwy]circ|[au]ring|a(?:mp|pos)|nbsp|oslash);|[^\"';=])*$" 1;
"~*@gt 0" 1;
"~*b(?:keep-alive|close),s?(?:keep-alive|close)b" 1;
"~*@validateByteRange 32-36,38-126" 1;
"~*!@endsWith .pdf" 1;
"~*x25" 1;
"~*['\";=]" 1;
"~*^bytes=(?:(?:d+)?-(?:d+)?s*,?s*){6}" 1;
"~*@gt 50" 1;
"~*%[0-9a-fA-F]{2}" 1;
"~*charset.*?charset" 1;
"~*!@rx ^0?$" 1;
"~*!@rx ^OPTIONS$" 1;
"~*^(?i)multipart/form-data" 1;
"~*(?:^|[^x5c])x5c[cdeghijklmpqwxyz123456789]" 1;
"~*(?i)x5cu[0-9a-f]{4}" 1;
"~*charsets*=s*[\"']?([^;\"'s]+)" 1;
"~*@within %{tx.restricted_headers_extended}" 1;
"~*(?:^([d.]+|[[da-f:]+]|[da-f:]+)(:[d]+)?$)" 1; "~*(?:^([d.]+|[[da-f:]+]|[da-f:]+)(:[d]+)?$)" 1;
"~*@gt %{tx.max_file_size}" 1; "~*^bytes=(?:(?:d+)?-(?:d+)?s*,?s*){63}" 1;
"~*@endsWith .pdf" 1; "~*!@rx ^OPTIONS$" 1;
"~*!@rx ^[w/.+*-]+(?:s?;s?(?:action|boundary|charset|component|start(?:-info)?|type|version)s?=s?['\"w.()+,/:=?<>@#*-]+)*$" 1;
"~*@within %{tx.restricted_extensions}" 1; "~*@within %{tx.restricted_extensions}" 1;
"~*^$" 1; "~*%[0-9a-fA-F]{2}" 1;
"~*!@rx (?i)^(?:&(?:(?:[acegiln-or-suz]acut|[aeiou]grav|[ain-o]tild)e|[c-elnr-tz]caron|(?:[cgk-lnr-t]cedi|[aeiouy]um)l|[aceg-josuwy]circ|[au]ring|a(?:mp|pos)|nbsp|oslash);|[^\"';=])*$" 1;
"~*^(?i)multipart/form-data" 1;
"~*(d+)-(d+)" 1; "~*(d+)-(d+)" 1;
"~*@gt 1" 1; "~*['\";=]" 1;
"~*@validateByteRange 1-255" 1; "~*@ge 1" 1;
"~*@validateByteRange 9,10,13,32-126,128-255" 1; "~*@validateByteRange 9,10,13,32-126,128-255" 1;
"~*@within %{tx.restricted_headers_basic}" 1; "~*!@pm AppleWebKit Android Business Enterprise Entreprise" 1;
"~*^[^;s]+" 1; "~*@validateByteRange 1-255" 1;
"~*@eq 0" 1; "~*!@rx ^d+$" 1;
"~*^bytes=(?:(?:d+)?-(?:d+)?s*,?s*){6}" 1;
"~*@within %{tx.restricted_headers_extended}" 1;
"~*^(?i)up" 1;
"~*@streq POST" 1;
"~*^$" 1;
"~*@gt %{tx.total_arg_length}" 1;
"~*@gt %{tx.max_file_size}" 1;
"~*@gt 1" 1;
"~*.([^.]+)$" 1;
"~*@gt 50" 1;
"~*@validateByteRange 32-36,38-126" 1;
"~*b(?:keep-alive|close),s?(?:keep-alive|close)b" 1;
"~*@contains #" 1; "~*@contains #" 1;
"~*!@rx ^0$" 1; "~*!@rx ^(?:(?:max-age=[0-9]+|min-fresh=[0-9]+|no-cache|no-store|no-transform|only-if-cached|max-stale(?:=[0-9]+)?)(?:s*,s*|$)){1,7}$" 1;
"~*@gt %{tx.combined_file_sizes}" 1;
"~*@validateByteRange 38,44-46,48-58,61,65-90,95,97-122" 1;
"~*(?:^|[^x5c])x5c[cdeghijklmpqwxyz123456789]" 1;
"~*@eq 0" 1;
"~*!@endsWith .pdf" 1;
"~*!@streq JSON" 1;
"~*charsets*=s*[\"']?([^;\"'s]+)" 1;
"~*!@rx ^0?$" 1;
"~*^(?i)application/x-www-form-urlencoded" 1; "~*^(?i)application/x-www-form-urlencoded" 1;
"~*@endsWith .pdf" 1;
"~*!@rx ^0$" 1;
"~*.[^.~]+~(?:/.*|)$" 1;
"~*@gt 0" 1;
"~*(?i)x5cu[0-9a-f]{4}" 1;
"~*@validateByteRange 32,34,38,42-59,61,65-90,95,97-122" 1;
"~*!@pm AppleWebKit Android" 1;
"~*@within %{tx.restricted_headers_basic}" 1;
"~*charset.*?charset" 1;
"~*^[^;s]+" 1;
"~*@validateUtf8Encoding" 1;
"~*@gt %{tx.arg_name_length}" 1;
"~*!@rx ^(?:OPTIONS|CONNECT)$" 1;
"~*@validateUrlEncoding" 1;
"~*@gt %{tx.max_num_args}" 1;
"~*^(?:GET|HEAD)$" 1;
"~*%u[fF]{2}[0-9a-fA-F]{2}" 1;
"~*x25" 1;
} }
if ($waf_block_enforcement) { if ($waf_block_enforcement) {

View File

@ -5,12 +5,12 @@
map $request_uri $waf_block_evaluation { map $request_uri $waf_block_evaluation {
default 0; default 0;
"~*@ge 3" 1; "~*@ge 3" 1;
"~*@ge 4" 1;
"~*@eq 1" 1; "~*@eq 1" 1;
"~*@ge %{tx.outbound_anomaly_score_threshold}" 1; "~*@ge %{tx.outbound_anomaly_score_threshold}" 1;
"~*@ge %{tx.inbound_anomaly_score_threshold}" 1; "~*@ge 4" 1;
"~*@ge 1" 1;
"~*@ge 2" 1; "~*@ge 2" 1;
"~*@ge 1" 1;
"~*@ge %{tx.inbound_anomaly_score_threshold}" 1;
} }
if ($waf_block_evaluation) { if ($waf_block_evaluation) {

View File

@ -4,10 +4,10 @@
map $request_uri $waf_block_exceptions { map $request_uri $waf_block_exceptions {
default 0; default 0;
"~*^(?:GET /|OPTIONS *) HTTP/[12].[01]$" 1;
"~*@ipMatch 127.0.0.1,::1" 1; "~*@ipMatch 127.0.0.1,::1" 1;
"~*@streq GET /" 1;
"~*@endsWith (internal dummy connection)" 1; "~*@endsWith (internal dummy connection)" 1;
"~*^(?:GET /|OPTIONS *) HTTP/[12].[01]$" 1;
"~*@streq GET /" 1;
} }
if ($waf_block_exceptions) { if ($waf_block_exceptions) {

View File

@ -4,10 +4,10 @@
map $request_uri $waf_block_fixation { map $request_uri $waf_block_fixation {
default 0; default 0;
"~*!@endsWith %{request_headers.host}" 1;
"~*^(?:jsessionid|aspsessionid|asp.net_sessionid|phpsession|phpsessid|weblogicsession|session_id|session-id|cfid|cftoken|cfsid|jservsession|jwsession)$" 1; "~*^(?:jsessionid|aspsessionid|asp.net_sessionid|phpsession|phpsessid|weblogicsession|session_id|session-id|cfid|cftoken|cfsid|jservsession|jwsession)$" 1;
"~*(?i:.cookieb.*?;W*?(?:expires|domain)W*?=|bhttp-equivW+set-cookieb)" 1; "~*(?i:.cookieb.*?;W*?(?:expires|domain)W*?=|bhttp-equivW+set-cookieb)" 1;
"~*@eq 0" 1; "~*@eq 0" 1;
"~*!@endsWith %{request_headers.host}" 1;
"~*^(?:ht|f)tps?://(.*?)/" 1; "~*^(?:ht|f)tps?://(.*?)/" 1;
} }

View File

@ -4,9 +4,9 @@
map $request_uri $waf_block_generic { map $request_uri $waf_block_generic {
default 0; default 0;
"~*@{.*}" 1;
"~*while[sv]*([sv(]*(?:!+(?:false|null|undefined|NaN|[+-]?0|\"{2}|'{2}|`{2})|(?:!!)*(?:(?:t(?:rue|his)|[+-]?(?:Infinity|[1-9][0-9]*)|new [A-Za-z][0-9A-Z_a-z]*|window|String|(?:Boolea|Functio)n|Object|Array)b|{.*}|[.*]|\"[^\"]+\"|'[^']+'|`[^`]+`)).*)" 1; "~*while[sv]*([sv(]*(?:!+(?:false|null|undefined|NaN|[+-]?0|\"{2}|'{2}|`{2})|(?:!!)*(?:(?:t(?:rue|his)|[+-]?(?:Infinity|[1-9][0-9]*)|new [A-Za-z][0-9A-Z_a-z]*|window|String|(?:Boolea|Functio)n|Object|Array)b|{.*}|[.*]|\"[^\"]+\"|'[^']+'|`[^`]+`)).*)" 1;
"~*[s*constructors*]" 1; "~*[s*constructors*]" 1;
"~*@{.*}" 1;
} }
if ($waf_block_generic) { if ($waf_block_generic) {

View File

@ -4,10 +4,10 @@
map $request_uri $waf_block_iis { map $request_uri $waf_block_iis {
default 0; default 0;
"~*(?:Microsoft OLE DB Provider for SQL Server(?:</font>.{1,20}?error '800(?:04005|40e31)'.{1,40}?Timeout expired| (0x80040e31)<br>Timeout expired<br>)|<h1>internal server error</h1>.*?<h2>part of the server has crashed or it has a configuration error.</h2>|cannot connect to the server: timed out)" 1;
"~*!@rx ^404$" 1;
"~*bServer Error in.{0,50}?bApplicationb" 1; "~*bServer Error in.{0,50}?bApplicationb" 1;
"~*(?:Microsoft OLE DB Provider for SQL Server(?:</font>.{1,20}?error '800(?:04005|40e31)'.{1,40}?Timeout expired| (0x80040e31)<br>Timeout expired<br>)|<h1>internal server error</h1>.*?<h2>part of the server has crashed or it has a configuration error.</h2>|cannot connect to the server: timed out)" 1;
"~*[a-z]:x5cinetpubb" 1; "~*[a-z]:x5cinetpubb" 1;
"~*!@rx ^404$" 1;
} }
if ($waf_block_iis) { if ($waf_block_iis) {

View File

@ -4,12 +4,12 @@
map $request_uri $waf_block_initialization { map $request_uri $waf_block_initialization {
default 0; default 0;
"~*@eq 100" 1;
"~*@eq 1" 1;
"~*^[a-f]*([0-9])[a-f]*([0-9])" 1;
"~*^.*$" 1; "~*^.*$" 1;
"~*@eq 0" 1; "~*@eq 1" 1;
"~*!@rx (?:URLENCODED|MULTIPART|XML|JSON)" 1; "~*!@rx (?:URLENCODED|MULTIPART|XML|JSON)" 1;
"~*^[a-f]*([0-9])[a-f]*([0-9])" 1;
"~*@eq 0" 1;
"~*@eq 100" 1;
} }
if ($waf_block_initialization) { if ($waf_block_initialization) {

View File

@ -4,19 +4,19 @@
map $request_uri $waf_block_java { map $request_uri $waf_block_java {
default 0; default 0;
"~*javab.+(?:runtime|processbuilder)" 1;
"~*(?i)(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)(?:[^}]*(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)|jndi|ctx)" 1;
"~*(?:clonetransformer|forclosure|instantiatefactory|instantiatetransformer|invokertransformer|prototypeclonefactory|prototypeserializationfactory|whileclosure|getproperty|filewriter|xmldecoder)" 1;
"~*.*.(?:jsp|jspx).*$" 1;
"~*(?i)(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)(?:[^}]{0,15}(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)|jndi|ctx)" 1;
"~*(?i)(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)" 1;
"~*(?:runtime|processbuilder)" 1; "~*(?:runtime|processbuilder)" 1;
"~*(?:unmarshaller|base64data|java.)" 1;
"~*(?i)(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)(?:[^}]{0,15}(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)|jndi|ctx)" 1;
"~*xacxedx00x05" 1; "~*xacxedx00x05" 1;
"~*(?:class.module.classLoader.resources.context.parent.pipeline|springframework.context.support.FileSystemXmlApplicationContext)" 1;
"~*(?:cnVudGltZQ|HJ1bnRpbWU|BydW50aW1l|cHJvY2Vzc2J1aWxkZXI|HByb2Nlc3NidWlsZGVy|Bwcm9jZXNzYnVpbGRlcg|Y2xvbmV0cmFuc2Zvcm1lcg|GNsb25ldHJhbnNmb3JtZXI|BjbG9uZXRyYW5zZm9ybWVy|Zm9yY2xvc3VyZQ|GZvcmNsb3N1cmU|Bmb3JjbG9zdXJl|aW5zdGFudGlhdGVmYWN0b3J5|Gluc3RhbnRpYXRlZmFjdG9yeQ|BpbnN0YW50aWF0ZWZhY3Rvcnk|aW5zdGFudGlhdGV0cmFuc2Zvcm1lcg|Gluc3RhbnRpYXRldHJhbnNmb3JtZXI|BpbnN0YW50aWF0ZXRyYW5zZm9ybWVy|aW52b2tlcnRyYW5zZm9ybWVy|Gludm9rZXJ0cmFuc2Zvcm1lcg|BpbnZva2VydHJhbnNmb3JtZXI|cHJvdG90eXBlY2xvbmVmYWN0b3J5|HByb3RvdHlwZWNsb25lZmFjdG9yeQ|Bwcm90b3R5cGVjbG9uZWZhY3Rvcnk|cHJvdG90eXBlc2VyaWFsaXphdGlvbmZhY3Rvcnk|HByb3RvdHlwZXNlcmlhbGl6YXRpb25mYWN0b3J5|Bwcm90b3R5cGVzZXJpYWxpemF0aW9uZmFjdG9yeQ|d2hpbGVjbG9zdXJl|HdoaWxlY2xvc3VyZQ|B3aGlsZWNsb3N1cmU)" 1; "~*(?:cnVudGltZQ|HJ1bnRpbWU|BydW50aW1l|cHJvY2Vzc2J1aWxkZXI|HByb2Nlc3NidWlsZGVy|Bwcm9jZXNzYnVpbGRlcg|Y2xvbmV0cmFuc2Zvcm1lcg|GNsb25ldHJhbnNmb3JtZXI|BjbG9uZXRyYW5zZm9ybWVy|Zm9yY2xvc3VyZQ|GZvcmNsb3N1cmU|Bmb3JjbG9zdXJl|aW5zdGFudGlhdGVmYWN0b3J5|Gluc3RhbnRpYXRlZmFjdG9yeQ|BpbnN0YW50aWF0ZWZhY3Rvcnk|aW5zdGFudGlhdGV0cmFuc2Zvcm1lcg|Gluc3RhbnRpYXRldHJhbnNmb3JtZXI|BpbnN0YW50aWF0ZXRyYW5zZm9ybWVy|aW52b2tlcnRyYW5zZm9ybWVy|Gludm9rZXJ0cmFuc2Zvcm1lcg|BpbnZva2VydHJhbnNmb3JtZXI|cHJvdG90eXBlY2xvbmVmYWN0b3J5|HByb3RvdHlwZWNsb25lZmFjdG9yeQ|Bwcm90b3R5cGVjbG9uZWZhY3Rvcnk|cHJvdG90eXBlc2VyaWFsaXphdGlvbmZhY3Rvcnk|HByb3RvdHlwZXNlcmlhbGl6YXRpb25mYWN0b3J5|Bwcm90b3R5cGVzZXJpYWxpemF0aW9uZmFjdG9yeQ|d2hpbGVjbG9zdXJl|HdoaWxlY2xvc3VyZQ|B3aGlsZWNsb3N1cmU)" 1;
"~*java.lang.(?:runtime|processbuilder)" 1; "~*java.lang.(?:runtime|processbuilder)" 1;
"~*(?i)(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)(?:[^}]*(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)|jndi|ctx)" 1;
"~*(?:rO0ABQ|KztAAU|Cs7QAF)" 1; "~*(?:rO0ABQ|KztAAU|Cs7QAF)" 1;
"~*(?:unmarshaller|base64data|java.)" 1; "~*javab.+(?:runtime|processbuilder)" 1;
"~*(?:clonetransformer|forclosure|instantiatefactory|instantiatetransformer|invokertransformer|prototypeclonefactory|prototypeserializationfactory|whileclosure|getproperty|filewriter|xmldecoder)" 1;
"~*(?:class.module.classLoader.resources.context.parent.pipeline|springframework.context.support.FileSystemXmlApplicationContext)" 1;
"~*(?i)(?:$|&dollar;?)(?:{|&l(?:brace|cub);?)" 1;
"~*.*.(?:jsp|jspx).*$" 1;
} }
if ($waf_block_java) { if ($waf_block_java) {

View File

@ -4,9 +4,9 @@
map $request_uri $waf_block_leakages { map $request_uri $waf_block_leakages {
default 0; default 0;
"~*^#!s?/" 1;
"~*(?:<(?:TITLE>Index of.*?<H|title>Index of.*?<h)1>Index of|>[To Parent Directory]</[Aa]><br>)" 1; "~*(?:<(?:TITLE>Index of.*?<H|title>Index of.*?<h)1>Index of|>[To Parent Directory]</[Aa]><br>)" 1;
"~*^5d{2}$" 1; "~*^5d{2}$" 1;
"~*^#!s?/" 1;
} }
if ($waf_block_leakages) { if ($waf_block_leakages) {

View File

@ -4,17 +4,17 @@
map $request_uri $waf_block_php { map $request_uri $waf_block_php {
default 0; default 0;
"~*(?:b(?:f(?:tp_(?:nb_)?f?(?:ge|pu)t|get(?:s?s|c)|scanf|write|open|read)|gz(?:(?:encod|writ)e|compress|open|read)|s(?:ession_start|candir)|read(?:(?:gz)?file|dir)|move_uploaded_file|(?:proc_|bz)open|call_user_func)|$_(?:(?:pos|ge)t|session))b" 1;
"~*(?i)<?(?:=|php)?s+" 1;
"~*(?:<?(?:[^x]|x[^m]|xm[^l]|xml[^s]|xml$|$)|<?php|[(?:/|x5c)?php])" 1;
"~*(?:bzip2|expect|glob|ogg|(?:ph|r)ar|ssh2(?:.(?:s(?:hell|(?:ft|c)p)|exec|tunnel))?|z(?:ip|lib))://" 1;
"~*(?i)php://(?:std(?:in|out|err)|(?:in|out)put|fd|memory|temp|filter)" 1;
"~*@pm ?>" 1; "~*@pm ?>" 1;
"~*.*.(?:phpd*|phtml)..*$" 1;
"~*.*.ph(?:pd*|tml|ar|ps|t|pt).*$" 1; "~*.*.ph(?:pd*|tml|ar|ps|t|pt).*$" 1;
"~*(?:<?(?:[^x]|x[^m]|xm[^l]|xml[^s]|xml$|$)|<?php|[(?:/|x5c)?php])" 1;
"~*(?:b(?:f(?:tp_(?:nb_)?f?(?:ge|pu)t|get(?:s?s|c)|scanf|write|open|read)|gz(?:(?:encod|writ)e|compress|open|read)|s(?:ession_start|candir)|read(?:(?:gz)?file|dir)|move_uploaded_file|(?:proc_|bz)open|call_user_func)|$_(?:(?:pos|ge)t|session))b" 1;
"~*(?i)php://(?:std(?:in|out|err)|(?:in|out)put|fd|memory|temp|filter)" 1;
"~*AUTH_TYPE|HTTP_(?:ACCEPT(?:_(?:CHARSET|ENCODING|LANGUAGE))?|CONNECTION|(?:HOS|USER_AGEN)T|KEEP_ALIVE|(?:REFERE|X_FORWARDED_FO)R)|ORIG_PATH_INFO|PATH_(?:INFO|TRANSLATED)|QUERY_STRING|REQUEST_URI" 1; "~*AUTH_TYPE|HTTP_(?:ACCEPT(?:_(?:CHARSET|ENCODING|LANGUAGE))?|CONNECTION|(?:HOS|USER_AGEN)T|KEEP_ALIVE|(?:REFERE|X_FORWARDED_FO)R)|ORIG_PATH_INFO|PATH_(?:INFO|TRANSLATED)|QUERY_STRING|REQUEST_URI" 1;
"~*[oOcC]:d+:\".+?\":d+:{.*}" 1; "~*[oOcC]:d+:\".+?\":d+:{.*}" 1;
"~*@pm =" 1; "~*@pm =" 1;
"~*.*.(?:phpd*|phtml)..*$" 1;
"~*(?i)<?(?:=|php)?s+" 1;
"~*(?:bzip2|expect|glob|ogg|(?:ph|r)ar|ssh2(?:.(?:s(?:hell|(?:ft|c)p)|exec|tunnel))?|z(?:ip|lib))://" 1;
} }
if ($waf_block_php) { if ($waf_block_php) {

View File

@ -4,26 +4,26 @@
map $request_uri $waf_block_rce { map $request_uri $waf_block_rce {
default 0; default 0;
"~*ba[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?l[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?i[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?a[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?sb[sv]+[!-\"%',0-9@-Z_a-z]+=[^sv]" 1;
"~*['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]" 1;
"~*rn(?s:.)*?b(?:(?i:E)(?:HLO [--.A-Za-zx17fx212a]{1,255}|XPN .{1,64})|HELO [--.A-Za-zx17fx212a]{1,255}|MAIL FROM:<.{1,64}(?i:@).{1,255}(?i:>)|(?i:R)(?:CPT TO:(?:(?i:<).{1,64}(?i:@).{1,255}(?i:>)|(?i: ))?(?i:<).{1,64}(?i:>)|SETb)|VRFY .{1,64}(?: <.{1,64}(?i:@).{1,255}(?i:>)|(?i:@).{1,255})|AUTH [-0-9A-Z_a-zx17fx212a]{1,20}(?i: )(?:(?:[+/-9A-Z_a-zx17fx212a]{4})*(?:[+/-9A-Z_a-zx17fx212a]{2}(?i:=)|[+/-9A-Z_a-zx17fx212a]{3}))?(?i:=)|STARTTLSb|NOOPb(?:(?i: ).{1,255})?)" 1;
"~*s" 1;
"~*!(?:d|!)" 1;
"~*^[^.]+.[^;?]+[;?](.*(['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]))" 1; "~*^[^.]+.[^;?]+[;?](.*(['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]))" 1;
"~*^[^.]*?(?:['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{])" 1;
"~*!@rx [0-9]s*'s*[0-9]" 1;
"~*$(?:((?:.*|(.*)))|{.*})|[<>](.*)|/[0-9A-Z_a-z]*[!?.+]" 1;
"~*rn(?s:.)*?b(?:DATA|QUIT|HELP(?: .{1,255})?)" 1;
"~*!-d" 1;
"~*/(?:[?*]+[a-z/]+|[a-z/]+[?*]+)" 1;
"~*;[sv]*.[sv]*[\"']?(?:a(?:rchive|uth)|b(?:a(?:ckup|il)|inary)|c(?:d|h(?:anges|eck)|lone|onnection)|d(?:atabases|b(?:config|info)|ump)|e(?:cho|qp|x(?:cel|it|p(?:ert|lain)))|f(?:ilectrl|ullschema)|he(?:aders|lp)|i(?:mpo(?:rt|ster)|ndexes|otrace)|l(?:i(?:mi|n)t|o(?:ad|g))|(?:mod|n(?:onc|ullvalu)|unmodul)e|o(?:nce|pen|utput)|p(?:arameter|r(?:int|o(?:gress|mpt)))|quit|re(?:ad|cover|store)|s(?:ave|c(?:anstats|hema)|e(?:lftest|parator|ssion)|h(?:a3sum|ell|ow)?|tats|ystem)|t(?:ables|estc(?:ase|trl)|ime(?:out|r)|race)|vfs(?:info|list|name)|width)" 1;
"~*b(?:for(?:/[dflr].*)? %+[^ ]+ in(.*)[sv]?do|if(?:/i)?(?: not)?(?: (?:e(?:xist|rrorlevel)|defined|cmdextversion)b|[ (].*(?:b(?:g(?:eq|tr)|equ|neq|l(?:eq|ss))b|==)))" 1; "~*b(?:for(?:/[dflr].*)? %+[^ ]+ in(.*)[sv]?do|if(?:/i)?(?: not)?(?: (?:e(?:xist|rrorlevel)|defined|cmdextversion)b|[ (].*(?:b(?:g(?:eq|tr)|equ|neq|l(?:eq|ss))b|==)))" 1;
"~*/" 1; "~*!-d" 1;
"~*['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{]" 1;
"~*(?is)rn.*?b(?:(?:LIST|TOP [0-9]+)(?: [0-9]+)?|U(?:SER .+?|IDL(?: [0-9]+)?)|PASS .+?|(?:RETR|DELE) [0-9]+?|A(?:POP [0-9A-Z_a-z]+ [0-9a-f]{32}|UTH [-0-9A-Z_]{1,20} (?:(?:[+/-9A-Z_a-z]{4})*(?:[+/-9A-Z_a-z]{2}=|[+/-9A-Z_a-z]{3}))?=))" 1; "~*(?is)rn.*?b(?:(?:LIST|TOP [0-9]+)(?: [0-9]+)?|U(?:SER .+?|IDL(?: [0-9]+)?)|PASS .+?|(?:RETR|DELE) [0-9]+?|A(?:POP [0-9A-Z_a-z]+ [0-9a-f]{32}|UTH [-0-9A-Z_]{1,20} (?:(?:[+/-9A-Z_a-z]{4})*(?:[+/-9A-Z_a-z]{2}=|[+/-9A-Z_a-z]{3}))?=))" 1;
"~*(?is)rn[0-9A-Z_a-z]{1,50}b (?:C(?:(?:REATE|OPY [*,0-:]+) [\"-#%-&*--9A-Zx5c_a-z]+|APABILITY|HECK|LOSE)|DELETE [\"-#%-&*--.0-9A-Zx5c_a-z]+|EX(?:AMINE [\"-#%-&*--.0-9A-Zx5c_a-z]+|PUNGE)|FETCH [*,0-:]+|L(?:IST [\"-#*--9A-Zx5c_a-z~]+? [\"-#%-&*--9A-Zx5c_a-z]+|OG(?:IN [--.0-9@_a-z]{1,40} .*?|OUT))|RENAME [\"-#%-&*--9A-Zx5c_a-z]+? [\"-#%-&*--9A-Zx5c_a-z]+|S(?:E(?:LECT [\"-#%-&*--9A-Zx5c_a-z]+|ARCH(?: CHARSET [--.0-9A-Z_a-z]{1,40})? (?:(KEYWORD x5c)?(?:A(?:LL|NSWERED)|BCC|D(?:ELETED|RAFT)|(?:FLAGGE|OL)D|RECENT|SEEN|UN(?:(?:ANSWER|FLAGG)ED|D(?:ELETED|RAFT)|SEEN)|NEW)|(?:BODY|CC|FROM|HEADER .{1,100}|NOT|OR .{1,255}|T(?:EXT|O)) .{1,255}|LARGER [0-9]{1,20}|[*,0-:]+|(?:BEFORE|ON|S(?:ENT(?:(?:BEFOR|SINC)E|ON)|INCE)) \"?[0-9]{1,2}-[0-9A-Z_a-z]{3}-[0-9]{4}\"?|S(?:MALLER [0-9]{1,20}|UBJECT .{1,255})|U(?:ID [*,0-:]+?|NKEYWORD x5c(Seen|(?:Answer|Flagg)ed|D(?:eleted|raft)|Recent))))|T(?:ORE [*,0-:]+? [+-]?FLAGS(?:.SILENT)? (?:(x5c[a-z]{1,20}))?|ARTTLS)|UBSCRIBE [\"-#%-&*--9A-Zx5c_a-z]+)|UN(?:SUBSCRIBE [\"-#%-&*--9A-Zx5c_a-z]+|AUTHENTICATE)|NOOP)" 1; "~*^[^.]*?(?:['*?x5c`][^n/]+/|/[^/]+?['*?x5c`]|$[!#-$(*-0-9?-[_a-{])" 1;
"~*(?:$(?:((?:(.*)|.*))|{.*})|[<>](.*)|[!?.+])" 1; "~*$(?:((?:.*|(.*)))|{.*})|[<>](.*)|/[0-9A-Z_a-z]*[!?.+]" 1;
"~*/(?:[?*]+[a-z/]+|[a-z/]+[?*]+)" 1;
"~*rn(?s:.)*?b(?:(?:QUI|STA|RSE)(?i:T)|NOOP|CAPA)" 1; "~*rn(?s:.)*?b(?:(?:QUI|STA|RSE)(?i:T)|NOOP|CAPA)" 1;
"~*rn(?s:.)*?b(?:(?i:E)(?:HLO [--.A-Za-zx17fx212a]{1,255}|XPN .{1,64})|HELO [--.A-Za-zx17fx212a]{1,255}|MAIL FROM:<.{1,64}(?i:@).{1,255}(?i:>)|(?i:R)(?:CPT TO:(?:(?i:<).{1,64}(?i:@).{1,255}(?i:>)|(?i: ))?(?i:<).{1,64}(?i:>)|SETb)|VRFY .{1,64}(?: <.{1,64}(?i:@).{1,255}(?i:>)|(?i:@).{1,255})|AUTH [-0-9A-Z_a-zx17fx212a]{1,20}(?i: )(?:(?:[+/-9A-Z_a-zx17fx212a]{4})*(?:[+/-9A-Z_a-zx17fx212a]{2}(?i:=)|[+/-9A-Z_a-zx17fx212a]{3}))?(?i:=)|STARTTLSb|NOOPb(?:(?i: ).{1,255})?)" 1;
"~*!(?:d|!)" 1;
"~*s" 1;
"~*/" 1;
"~*rn(?s:.)*?b(?:DATA|QUIT|HELP(?: .{1,255})?)" 1;
"~*^(s*)s+{" 1; "~*^(s*)s+{" 1;
"~*ba[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?l[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?i[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?a[\"')[-x5c]*(?:(?:(?:|||&&)[sv]*)?$[!#(*-0-9?-@_a-{]*)?x5c?sb[sv]+[!-\"%',0-9@-Z_a-z]+=[^sv]" 1;
"~*(?:$(?:((?:(.*)|.*))|{.*})|[<>](.*)|[!?.+])" 1;
"~*!@rx [0-9]s*'s*[0-9]" 1;
"~*;[sv]*.[sv]*[\"']?(?:a(?:rchive|uth)|b(?:a(?:ckup|il)|inary)|c(?:d|h(?:anges|eck)|lone|onnection)|d(?:atabases|b(?:config|info)|ump)|e(?:cho|qp|x(?:cel|it|p(?:ert|lain)))|f(?:ilectrl|ullschema)|he(?:aders|lp)|i(?:mpo(?:rt|ster)|ndexes|otrace)|l(?:i(?:mi|n)t|o(?:ad|g))|(?:mod|n(?:onc|ullvalu)|unmodul)e|o(?:nce|pen|utput)|p(?:arameter|r(?:int|o(?:gress|mpt)))|quit|re(?:ad|cover|store)|s(?:ave|c(?:anstats|hema)|e(?:lftest|parator|ssion)|h(?:a3sum|ell|ow)?|tats|ystem)|t(?:ables|estc(?:ase|trl)|ime(?:out|r)|race)|vfs(?:info|list|name)|width)" 1;
"~*(?is)rn[0-9A-Z_a-z]{1,50}b (?:C(?:(?:REATE|OPY [*,0-:]+) [\"-#%-&*--9A-Zx5c_a-z]+|APABILITY|HECK|LOSE)|DELETE [\"-#%-&*--.0-9A-Zx5c_a-z]+|EX(?:AMINE [\"-#%-&*--.0-9A-Zx5c_a-z]+|PUNGE)|FETCH [*,0-:]+|L(?:IST [\"-#*--9A-Zx5c_a-z~]+? [\"-#%-&*--9A-Zx5c_a-z]+|OG(?:IN [--.0-9@_a-z]{1,40} .*?|OUT))|RENAME [\"-#%-&*--9A-Zx5c_a-z]+? [\"-#%-&*--9A-Zx5c_a-z]+|S(?:E(?:LECT [\"-#%-&*--9A-Zx5c_a-z]+|ARCH(?: CHARSET [--.0-9A-Z_a-z]{1,40})? (?:(KEYWORD x5c)?(?:A(?:LL|NSWERED)|BCC|D(?:ELETED|RAFT)|(?:FLAGGE|OL)D|RECENT|SEEN|UN(?:(?:ANSWER|FLAGG)ED|D(?:ELETED|RAFT)|SEEN)|NEW)|(?:BODY|CC|FROM|HEADER .{1,100}|NOT|OR .{1,255}|T(?:EXT|O)) .{1,255}|LARGER [0-9]{1,20}|[*,0-:]+|(?:BEFORE|ON|S(?:ENT(?:(?:BEFOR|SINC)E|ON)|INCE)) \"?[0-9]{1,2}-[0-9A-Z_a-z]{3}-[0-9]{4}\"?|S(?:MALLER [0-9]{1,20}|UBJECT .{1,255})|U(?:ID [*,0-:]+?|NKEYWORD x5c(Seen|(?:Answer|Flagg)ed|D(?:eleted|raft)|Recent))))|T(?:ORE [*,0-:]+? [+-]?FLAGS(?:.SILENT)? (?:(x5c[a-z]{1,20}))?|ARTTLS)|UBSCRIBE [\"-#%-&*--9A-Zx5c_a-z]+)|UN(?:SUBSCRIBE [\"-#%-&*--9A-Zx5c_a-z]+|AUTHENTICATE)|NOOP)" 1;
} }
if ($waf_block_rce) { if ($waf_block_rce) {

View File

@ -4,31 +4,31 @@
map $request_uri $waf_block_shells { map $request_uri $waf_block_shells {
default 0; default 0;
"~*^<html>n <head>n <title>azrail [0-9.]+ by C-W-M</title>" 1;
"~*(<title>r57 Shell Version [0-9.]+</title>|<title>r57 shell</title>)" 1;
"~*^<html><head><meta http-equiv='Content-Type' content='text/html; charset=Windows-1251'><title>.*? - WSO [0-9.]+</title>" 1;
"~*@contains <title>punkholicshell</title>" 1;
"~*^<html>n<title>.*? ~ Shell I</title>n<head>n<style>" 1;
"~*<title>Mini Shell</title>.*Developed By LameHacker" 1;
"~*<title>SimAttacker - (?:Version|Vrsion) : [0-9.]+ -" 1;
"~*^<title>PHP Web Shell</title>rn<html>rn<body>rn <!-- Replaces command with Base64-encoded Data -->" 1;
"~*^<html>rn<head>rn<title>GRP WebShell [0-9.]+" 1;
"~*<title>s72 Shell v[0-9.]+ Codinf by Cr@zy_King</title>" 1;
"~*^ *<html>n[ ]+<head>n[ ]+<title>lostDC -" 1; "~*^ *<html>n[ ]+<head>n[ ]+<title>lostDC -" 1;
"~*<small>NGHshell [0-9.]+ by Cr4sh</body></html>n$" 1;
"~*>SmEvK_PaThAn Shell v[0-9]+ coded by <a href=" 1;
"~*B4TM4N SH3LL</title>.*<meta name='author' content='k4mpr3t'/>" 1; "~*B4TM4N SH3LL</title>.*<meta name='author' content='k4mpr3t'/>" 1;
"~*^<!DOCTYPE html>n<html>n<!-- By Artyum .*<title>Web Shell</title>" 1; "~*^<html>n <head>n <title>azrail [0-9.]+ by C-W-M</title>" 1;
"~*<title>.:: .* ~ Ashiyane V [0-9.]+ ::.</title>" 1;
"~*^<html>rn<head>rn<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">rn<title>PhpSpy Ver [0-9]+</title>" 1; "~*^<html>rn<head>rn<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">rn<title>PhpSpy Ver [0-9]+</title>" 1;
"~*^<html>n<head>n<title>Ru24PostWebShell -" 1;
"~*<title>CasuS [0-9.]+ by MafiABoY</title>" 1; "~*<title>CasuS [0-9.]+ by MafiABoY</title>" 1;
"~*@contains <h1 style=\"margin-bottom: 0\">webadmin.php</h1>" 1;
"~*^<html>n<head>n<div align=\"left\"><font size=\"1\">Input command :</font></div>n<form name=\"cmd\" method=\"POST\" enctype=\"multipart/form-data\">" 1;
"~*^ <html><head><title>:: b374k m1n1 [0-9.]+ ::</title>" 1; "~*^ <html><head><title>:: b374k m1n1 [0-9.]+ ::</title>" 1;
"~*(<title>r57 Shell Version [0-9.]+</title>|<title>r57 shell</title>)" 1;
"~*^<html>n<title>.*? ~ Shell I</title>n<head>n<style>" 1;
"~*<title>s72 Shell v[0-9.]+ Codinf by Cr@zy_King</title>" 1;
"~*^<!DOCTYPE html>n<html>n<!-- By Artyum .*<title>Web Shell</title>" 1;
"~*<title>SimAttacker - (?:Version|Vrsion) : [0-9.]+ -" 1;
"~*^<html>n<head>n<div align=\"left\"><font size=\"1\">Input command :</font></div>n<form name=\"cmd\" method=\"POST\" enctype=\"multipart/form-data\">" 1;
"~*<title>Symlink_Sa [0-9.]+</title>" 1; "~*<title>Symlink_Sa [0-9.]+</title>" 1;
"~*<title>lama's'hell v. [0-9.]+</title>" 1;
"~*^ <html>nn<head>nn<title>g00nshell v[0-9.]+" 1; "~*^ <html>nn<head>nn<title>g00nshell v[0-9.]+" 1;
"~*@contains <h1 style=\"margin-bottom: 0\">webadmin.php</h1>" 1;
"~*^<html>n<head>n<title>Ru24PostWebShell -" 1;
"~*@contains <title>punkholicshell</title>" 1;
"~*>SmEvK_PaThAn Shell v[0-9]+ coded by <a href=" 1;
"~*^<title>PHP Web Shell</title>rn<html>rn<body>rn <!-- Replaces command with Base64-encoded Data -->" 1;
"~*<title>.:: .* ~ Ashiyane V [0-9.]+ ::.</title>" 1;
"~*^<html><head><meta http-equiv='Content-Type' content='text/html; charset=Windows-1251'><title>.*? - WSO [0-9.]+</title>" 1;
"~*<title>Mini Shell</title>.*Developed By LameHacker" 1;
"~*<title>lama's'hell v. [0-9.]+</title>" 1;
"~*^<html>rn<head>rn<title>GRP WebShell [0-9.]+" 1;
"~*<small>NGHshell [0-9.]+ by Cr4sh</body></html>n$" 1;
} }
if ($waf_block_shells) { if ($waf_block_shells) {

View File

@ -4,19 +4,19 @@
map $request_uri $waf_block_sql { map $request_uri $waf_block_sql {
default 0; default 0;
"~*(?i)(?:System.Data.OleDb.OleDbException|[Microsoft][ODBC SQL Server Driver]|[Macromedia][SQLServer JDBC Driver]|[SqlException|System.Data.SqlClient.SqlException|Unclosed quotation mark after the character string|'80040e14'|mssql_query()|Microsoft OLE DB Provider for ODBC Drivers|Microsoft OLE DB Provider for SQL Server|Incorrect syntax near|Sintaxis incorrecta cerca de|Syntax error in string in query expression|Procedure or function .* expects parameter|Unclosed quotation mark before the character string|Syntax error .* in query expression|Data type mismatch in criteria expression.|ADODB.Field (0x800A0BCD)|the used select statements have different number of columns|OLE DB.*SQL Server|Warning.*mssql_.*|Driver.*SQL[ _-]*Server|SQL Server.*Driver|SQL Server.*[0-9a-fA-F]{8}|Exception.*WSystem.Data.SqlClient.|Conversion failed when converting the varchar value .*? to data type int.)" 1;
"~*(?i)(?:Warning.*sqlite_.*|Warning.*SQLite3::|SQLite/JDBCDriver|SQLite.Exception|System.Data.SQLite.SQLiteException)" 1;
"~*(?i)Dynamic SQL Error" 1; "~*(?i)Dynamic SQL Error" 1;
"~*(?i)org.hsqldb.jdbc" 1; "~*(?i)org.hsqldb.jdbc" 1;
"~*(?i:JET Database Engine|Access Database Engine|[Microsoft][ODBC Microsoft Access Driver])" 1;
"~*(?i:<b>Warning</b>: ibase_|Unexpected end of command in statement)" 1;
"~*(?i:[DM_QUERY_E_SYNTAX]|has occurred in the vicinity of:)" 1;
"~*(?i:An illegal character has been found in the statement|com.informix.jdbc|Exception.*Informix)" 1;
"~*(?i)Exception (?:condition )?d+. Transaction rollback." 1; "~*(?i)Exception (?:condition )?d+. Transaction rollback." 1;
"~*(?i)(?:System.Data.OleDb.OleDbException|[Microsoft][ODBC SQL Server Driver]|[Macromedia][SQLServer JDBC Driver]|[SqlException|System.Data.SqlClient.SqlException|Unclosed quotation mark after the character string|'80040e14'|mssql_query()|Microsoft OLE DB Provider for ODBC Drivers|Microsoft OLE DB Provider for SQL Server|Incorrect syntax near|Sintaxis incorrecta cerca de|Syntax error in string in query expression|Procedure or function .* expects parameter|Unclosed quotation mark before the character string|Syntax error .* in query expression|Data type mismatch in criteria expression.|ADODB.Field (0x800A0BCD)|the used select statements have different number of columns|OLE DB.*SQL Server|Warning.*mssql_.*|Driver.*SQL[ _-]*Server|SQL Server.*Driver|SQL Server.*[0-9a-fA-F]{8}|Exception.*WSystem.Data.SqlClient.|Conversion failed when converting the varchar value .*? to data type int.)" 1;
"~*(?i:<b>Warning</b>: ibase_|Unexpected end of command in statement)" 1;
"~*(?i:JET Database Engine|Access Database Engine|[Microsoft][ODBC Microsoft Access Driver])" 1;
"~*(?i:SQL error.*POS[0-9]+.*|Warning.*maxdb.*)" 1; "~*(?i:SQL error.*POS[0-9]+.*|Warning.*maxdb.*)" 1;
"~*(?i:An illegal character has been found in the statement|com.informix.jdbc|Exception.*Informix)" 1;
"~*(?i:[DM_QUERY_E_SYNTAX]|has occurred in the vicinity of:)" 1;
"~*(?i:Warning.*ingres_|Ingres SQLSTATE|IngresW.*Driver)" 1; "~*(?i:Warning.*ingres_|Ingres SQLSTATE|IngresW.*Driver)" 1;
"~*(?i)(?:Sybase message:|Warning.{2,20}sybase|Sybase.*Server message.*)" 1; "~*(?i)(?:Sybase message:|Warning.{2,20}sybase|Sybase.*Server message.*)" 1;
"~*(?i:ORA-[0-9][0-9][0-9][0-9]|java.sql.SQLException|Oracle error|Oracle.*Driver|Warning.*oci_.*|Warning.*ora_.*)" 1; "~*(?i:ORA-[0-9][0-9][0-9][0-9]|java.sql.SQLException|Oracle error|Oracle.*Driver|Warning.*oci_.*|Warning.*ora_.*)" 1;
"~*(?i)(?:Warning.*sqlite_.*|Warning.*SQLite3::|SQLite/JDBCDriver|SQLite.Exception|System.Data.SQLite.SQLiteException)" 1;
} }
if ($waf_block_sql) { if ($waf_block_sql) {

View File

@ -4,41 +4,41 @@
map $request_uri $waf_block_sqli { map $request_uri $waf_block_sqli {
default 0; default 0;
"~*[\"'`][sd]*?[^ws]W*?dW*?.*?[\"'`d]" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){8})" 1;
"~*@streq %{TX.2}" 1;
"~*!@rx ^ey[-0-9A-Z_a-z]+.ey[-0-9A-Z_a-z]+.[-0-9A-Z_a-z]+$" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){12})" 1;
"~*^(?i:-0000023456|4294967295|4294967296|2147483648|2147483647|0000012345|-2147483648|-2147483649|0000023456|2.2250738585072007e-308|2.2250738585072011e-308|1e309)$" 1; "~*^(?i:-0000023456|4294967295|4294967296|2147483648|2147483647|0000012345|-2147483648|-2147483649|0000023456|2.2250738585072007e-308|2.2250738585072011e-308|1e309)$" 1;
"~*(?i)[sv\"'-)`]*?b([0-9A-Z_a-z]+)b[sv\"'-)`]*?(?:![<->]|<[=->]?|>=?|^|is[sv]+not|not[sv]+(?:like|r(?:like|egexp)))[sv\"'-)`]*?b([0-9A-Z_a-z]+)b" 1;
"~*(?:^s*[\"'`;]+|[\"'`]+s*$)" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){2})" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){6})" 1;
"~*(?i)alter[sv]*?[0-9A-Z_a-z]+.*?char(?:acter)?[sv]+set[sv]+[0-9A-Z_a-z]+|[\"'`](?:;*?[sv]*?waitfor[sv]+(?:time|delay)[sv]+[\"'`]|;.*?:[sv]*?goto)" 1;
"~*(?i)[\"'`][sv]*?(?:(?:is[sv]+not|not[sv]+(?:like|glob|(?:betwee|i)n|null|regexp|match)|mod|div|sounds[sv]+like)b|[%-&*-+-/<->^|])" 1;
"~*(?i:sleep(s*?d*?s*?)|benchmark(.*?,.*?))" 1;
"~*^.*?x5c['\"`](?:.*?['\"`])?s*(?:and|or)b" 1;
"~*(?i)bandb(?:[sv]+(?:[0-9]{1,10}[sv]*?[<->]|'[^=]{1,10}')| ?(?:[0-9]{1,10}|[\"'][^=]{1,10}[\"']) ?[<->]+)" 1;
"~*(?i)W+d*?s*?bhavingbs*?[^s-]" 1;
"~*(?i)[sv\"'-)`]*?b([0-9A-Z_a-z]+)b[sv\"'-)`]*?(?:=|<=>|(?:sounds[sv]+)?like|glob|r(?:like|egexp))[sv\"'-)`]*?b([0-9A-Z_a-z]+)b" 1;
"~*(?i)union.*?select.*?from" 1;
"~*!@streq %{TX.2}" 1;
"~*(?i:^[Wd]+s*?(?:alter|union)b)" 1;
"~*(?i:b0x[a-fd]{3,})" 1;
"~*(?i)b(?:orb(?:[sv]?(?:[0-9]{1,10}|[\"'][^=]{1,10}[\"'])[sv]?[<->]+|[sv]+(?:[0-9]{1,10}|'[^=]{1,10}')(?:[sv]*?[<->])?)|xorb[sv]+(?:[0-9]{1,10}|'[^=]{1,10}')(?:[sv]*?[<->])?)|'[sv]+x?or[sv]+.{1,20}[!+-<->]" 1;
"~*(?i)autonomous_transaction|(?:current_use|n?varcha|tbcreato)r|db(?:a_users|ms_java)|open(?:owa_util|query|rowset)|s(?:p_(?:(?:addextendedpro|sqlexe)c|execute(?:sql)?|help|is_srvrolemember|makewebtask|oacreate|p(?:assword|repare)|replwritetovarbin)|ql_(?:longvarchar|variant))|utl_(?:file|http)|xp_(?:availablemedia|(?:cmdshel|servicecontro)l|dirtree|e(?:numdsn|xecresultset)|filelist|loginconfig|makecab|ntsec(?:_enumdomains)?|reg(?:addmultistring|delete(?:key|value)|enum(?:key|value)s|re(?:ad|movemultistring)|write)|terminate(?:_process)?)" 1;
"~*@detectSQLi" 1;
"~*(?i)1.e[(-),]" 1;
"~*(?i)[\"'`][sv]*?(?:(?:and|n(?:and|ot)|(?:xx?)?or|div|like|between||||&&)[sv]+[sv0-9A-Z_a-z]+=[sv]*?[0-9A-Z_a-z]+[sv]*?having[sv]+|like[^0-9A-Z_a-z]*?[\"'0-9`])|[0-9A-Z_a-z][sv]+like[sv]+[\"'`]|like[sv]*?[\"'`]%|select[sv]+?[sv\"'-),-.0-9A-[]_-z]+from[sv]+" 1;
"~*^(?:and|or)$" 1;
"~*(?i)create[sv]+function[sv].+[sv]returns|;[sv]*?(?:alter|(?:(?:cre|trunc|upd)at|renam)e|d(?:e(?:lete|sc)|rop)|(?:inser|selec)t|load)b[sv]*?[([]?[0-9A-Z_a-z]{2,}" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){3})" 1;
"~*(?i)^(?:[^']*?(?:'[^']*?'[^']*?)*?'|[^\"]*?(?:\"[^\"]*?\"[^\"]*?)*?\"|[^`]*?(?:`[^`]*?`[^`]*?)*?`)[sv]*([0-9A-Z_a-z]+)b" 1; "~*(?i)^(?:[^']*?(?:'[^']*?'[^']*?)*?'|[^\"]*?(?:\"[^\"]*?\"[^\"]*?)*?\"|[^`]*?(?:`[^`]*?`[^`]*?)*?`)[sv]*([0-9A-Z_a-z]+)b" 1;
"~*';" 1; "~*^(?:and|or)$" 1;
"~*^(?:[^']*'|[^\"]*\"|[^`]*`)[sv]*;" 1; "~*(?i)alter[sv]*?[0-9A-Z_a-z]+.*?char(?:acter)?[sv]+set[sv]+[0-9A-Z_a-z]+|[\"'`](?:;*?[sv]*?waitfor[sv]+(?:time|delay)[sv]+[\"'`]|;.*?:[sv]*?goto)" 1;
"~*(?i)select[sv]*?pg_sleep|waitfor[sv]*?delay[sv]?[\"'`]+[sv]?[0-9]|;[sv]*?shutdown[sv]*?(?:[#;{]|/*|--)" 1; "~*(?i)[\"'`][sv]*?(?:(?:and|n(?:and|ot)|(?:xx?)?or|div|like|between||||&&)[sv]+[sv0-9A-Z_a-z]+=[sv]*?[0-9A-Z_a-z]+[sv]*?having[sv]+|like[^0-9A-Z_a-z]*?[\"'0-9`])|[0-9A-Z_a-z][sv]+like[sv]+[\"'`]|like[sv]*?[\"'`]%|select[sv]+?[sv\"'-),-.0-9A-[]_-z]+from[sv]+" 1;
"~*W{4}" 1;
"~*(?i)[\"'`][sv]*?b(?:x?or|div|like|between|and)b[sv]*?[\"'`]?[0-9]|x5cx(?:2[37]|3d)|^(?:.?[\"'`]$|[\"'x5c`]*?(?:[\"'0-9`]+|[^\"'`]+[\"'`])[sv]*?b(?:and|n(?:and|ot)|(?:xx?)?or|div|like|between||||&&)b[sv]*?[\"'0-9A-Z_-z][!&(-)+-.@])|[^sv0-9A-Z_a-z][0-9A-Z_a-z]+[sv]*?[-|][sv]*?[\"'`][sv]*?[0-9A-Z_a-z]|@(?:[0-9A-Z_a-z]+[sv]+(?:and|x?or|div|like|between)b[sv]*?[\"'0-9`]+|[-0-9A-Z_a-z]+[sv](?:and|x?or|div|like|between)b[sv]*?[^sv0-9A-Z_a-z])|[^sv0-:A-Z_a-z][sv]*?[0-9][^0-9A-Z_a-z]+[^sv0-9A-Z_a-z][sv]*?[\"'`].|[^0-9A-Z_a-z]information_schema|table_name[^0-9A-Z_a-z]" 1; "~*(?i)[\"'`][sv]*?b(?:x?or|div|like|between|and)b[sv]*?[\"'`]?[0-9]|x5cx(?:2[37]|3d)|^(?:.?[\"'`]$|[\"'x5c`]*?(?:[\"'0-9`]+|[^\"'`]+[\"'`])[sv]*?b(?:and|n(?:and|ot)|(?:xx?)?or|div|like|between||||&&)b[sv]*?[\"'0-9A-Z_-z][!&(-)+-.@])|[^sv0-9A-Z_a-z][0-9A-Z_a-z]+[sv]*?[-|][sv]*?[\"'`][sv]*?[0-9A-Z_a-z]|@(?:[0-9A-Z_a-z]+[sv]+(?:and|x?or|div|like|between)b[sv]*?[\"'0-9`]+|[-0-9A-Z_a-z]+[sv](?:and|x?or|div|like|between)b[sv]*?[^sv0-9A-Z_a-z])|[^sv0-:A-Z_a-z][sv]*?[0-9][^0-9A-Z_a-z]+[^sv0-9A-Z_a-z][sv]*?[\"'`].|[^0-9A-Z_a-z]information_schema|table_name[^0-9A-Z_a-z]" 1;
"~*W{4}" 1;
"~*^(?:[^']*'|[^\"]*\"|[^`]*`)[sv]*;" 1;
"~*(?i:b0x[a-fd]{3,})" 1;
"~*';" 1;
"~*(?i)union.*?select.*?from" 1;
"~*(?i)autonomous_transaction|(?:current_use|n?varcha|tbcreato)r|db(?:a_users|ms_java)|open(?:owa_util|query|rowset)|s(?:p_(?:(?:addextendedpro|sqlexe)c|execute(?:sql)?|help|is_srvrolemember|makewebtask|oacreate|p(?:assword|repare)|replwritetovarbin)|ql_(?:longvarchar|variant))|utl_(?:file|http)|xp_(?:availablemedia|(?:cmdshel|servicecontro)l|dirtree|e(?:numdsn|xecresultset)|filelist|loginconfig|makecab|ntsec(?:_enumdomains)?|reg(?:addmultistring|delete(?:key|value)|enum(?:key|value)s|re(?:ad|movemultistring)|write)|terminate(?:_process)?)" 1;
"~*(?i)[\"'`][sv]*?(?:(?:is[sv]+not|not[sv]+(?:like|glob|(?:betwee|i)n|null|regexp|match)|mod|div|sounds[sv]+like)b|[%-&*-+-/<->^|])" 1;
"~*(?i)create[sv]+function[sv].+[sv]returns|;[sv]*?(?:alter|(?:(?:cre|trunc|upd)at|renam)e|d(?:e(?:lete|sc)|rop)|(?:inser|selec)t|load)b[sv]*?[([]?[0-9A-Z_a-z]{2,}" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){2})" 1;
"~*@detectSQLi" 1;
"~*(?i)[sv\"'-)`]*?b([0-9A-Z_a-z]+)b[sv\"'-)`]*?(?:![<->]|<[=->]?|>=?|^|is[sv]+not|not[sv]+(?:like|r(?:like|egexp)))[sv\"'-)`]*?b([0-9A-Z_a-z]+)b" 1;
"~*(?i:sleep(s*?d*?s*?)|benchmark(.*?,.*?))" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){12})" 1;
"~*(?i)bandb(?:[sv]+(?:[0-9]{1,10}[sv]*?[<->]|'[^=]{1,10}')| ?(?:[0-9]{1,10}|[\"'][^=]{1,10}[\"']) ?[<->]+)" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){8})" 1;
"~*^.*?x5c['\"`](?:.*?['\"`])?s*(?:and|or)b" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){6})" 1;
"~*((?:[~!@#$%^&*()-+={}[]|:;\"'´`<>][^~!@#$%^&*()-+={}[]|:;\"'´`<>]*?){3})" 1;
"~*(?i)W+d*?s*?bhavingbs*?[^s-]" 1;
"~*[\"'`][sd]*?[^ws]W*?dW*?.*?[\"'`d]" 1;
"~*(?i)select[sv]*?pg_sleep|waitfor[sv]*?delay[sv]?[\"'`]+[sv]?[0-9]|;[sv]*?shutdown[sv]*?(?:[#;{]|/*|--)" 1;
"~*@streq %{TX.2}" 1;
"~*(?i:^[Wd]+s*?(?:alter|union)b)" 1;
"~*!@rx ^ey[-0-9A-Z_a-z]+.ey[-0-9A-Z_a-z]+.[-0-9A-Z_a-z]+$" 1;
"~*!@streq %{TX.2}" 1;
"~*(?i)[sv\"'-)`]*?b([0-9A-Z_a-z]+)b[sv\"'-)`]*?(?:=|<=>|(?:sounds[sv]+)?like|glob|r(?:like|egexp))[sv\"'-)`]*?b([0-9A-Z_a-z]+)b" 1;
"~*(?i)b(?:orb(?:[sv]?(?:[0-9]{1,10}|[\"'][^=]{1,10}[\"'])[sv]?[<->]+|[sv]+(?:[0-9]{1,10}|'[^=]{1,10}')(?:[sv]*?[<->])?)|xorb[sv]+(?:[0-9]{1,10}|'[^=]{1,10}')(?:[sv]*?[<->])?)|'[sv]+x?or[sv]+.{1,20}[!+-<->]" 1;
"~*(?:^s*[\"'`;]+|[\"'`]+s*$)" 1;
"~*(?i)1.e[(-),]" 1;
} }
if ($waf_block_sqli) { if ($waf_block_sqli) {

View File

@ -4,31 +4,31 @@
map $request_uri $waf_block_xss { map $request_uri $waf_block_xss {
default 0; default 0;
"~*(?i).(?:b(?:x(?:link:href|html|mlns)|data:text/html|formaction|patternb.*?=)|!ENTITY[sv]+(?:%[sv]+)?[^sv]+[sv]+(?:SYSTEM|PUBLIC)|@import|;base64)b" 1;
"~*(?i)<EMBED[s/+].*?(?:src|type).*?=" 1;
"~*(?i)<APPLET[s/+>]" 1;
"~*xbc[^xbe>]*[xbe>]|<[^xbe]*xbe" 1;
"~*@detectXSS" 1;
"~*(?i)<LINK[s/+].*?href[s/+]*=" 1;
"~*(?i:<META[s/+].*?charset[s/+]*=)" 1;
"~*(?:xbcs*/s*[^xbe>]*[xbe>])|(?:<s*/s*[^xbe]*xbe)" 1;
"~*<(?:a|abbr|acronym|address|applet|area|audioscope|b|base|basefront|bdo|bgsound|big|blackface|blink|blockquote|body|bq|br|button|caption|center|cite|code|col|colgroup|comment|dd|del|dfn|dir|div|dl|dt|em|embed|fieldset|fn|font|form|frame|frameset|h1|head|hr|html|i|iframe|ilayer|img|input|ins|isindex|kdb|keygen|label|layer|legend|li|limittext|link|listing|map|marquee|menu|meta|multicol|nobr|noembed|noframes|noscript|nosmartquotes|object|ol|optgroup|option|p|param|plaintext|pre|q|rt|ruby|s|samp|script|select|server|shadow|sidebar|small|spacer|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|ul|var|wbr|xml|xmp)W" 1;
"~*{{.*?}}" 1;
"~*(?i)<OBJECT[s/+].*?(?:type|codetype|classid|code|data)[s/+]*=" 1; "~*(?i)<OBJECT[s/+].*?(?:type|codetype|classid|code|data)[s/+]*=" 1;
"~*@contains -->" 1;
"~*(?i:[\"'][ ]*(?:[^a-z0-9~_:' ]|in).*?(?:(?:l|x5cu006C)(?:o|x5cu006F)(?:c|x5cu0063)(?:a|x5cu0061)(?:t|x5cu0074)(?:i|x5cu0069)(?:o|x5cu006F)(?:n|x5cu006E)|(?:n|x5cu006E)(?:a|x5cu0061)(?:m|x5cu006D)(?:e|x5cu0065)|(?:o|x5cu006F)(?:n|x5cu006E)(?:e|x5cu0065)(?:r|x5cu0072)(?:r|x5cu0072)(?:o|x5cu006F)(?:r|x5cu0072)|(?:v|x5cu0076)(?:a|x5cu0061)(?:l|x5cu006C)(?:u|x5cu0075)(?:e|x5cu0065)(?:O|x5cu004F)(?:f|x5cu0066)).*?=)" 1;
"~*(?i)<script[^>]*>[sS]*?" 1;
"~*(?i)[s\"'`;/0-9=x0Bx09x0Cx3Bx2Cx28x3B]on[a-zA-Z]{3,25}[sx0Bx09x0Cx3Bx2Cx28x3B]*?=[^=]" 1;
"~*(?i)<[^0-9<>A-Z_a-z]*(?:[^sv\"'<>]*:)?[^0-9<>A-Z_a-z]*[^0-9A-Z_a-z]*?(?:s[^0-9A-Z_a-z]*?(?:c[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?p[^0-9A-Z_a-z]*?t|t[^0-9A-Z_a-z]*?y[^0-9A-Z_a-z]*?l[^0-9A-Z_a-z]*?e|v[^0-9A-Z_a-z]*?g|e[^0-9A-Z_a-z]*?t[^0-9>A-Z_a-z])|f[^0-9A-Z_a-z]*?o[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?m|m[^0-9A-Z_a-z]*?(?:a[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?q[^0-9A-Z_a-z]*?u[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?e|e[^0-9A-Z_a-z]*?t[^0-9A-Z_a-z]*?a[^0-9>A-Z_a-z])|(?:l[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?n[^0-9A-Z_a-z]*?k|o[^0-9A-Z_a-z]*?b[^0-9A-Z_a-z]*?j[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?c[^0-9A-Z_a-z]*?t|e[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?b[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?d|a[^0-9A-Z_a-z]*?(?:p[^0-9A-Z_a-z]*?p[^0-9A-Z_a-z]*?l[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?t|u[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?o|n[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?t[^0-9A-Z_a-z]*?e)|p[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?m|i?[^0-9A-Z_a-z]*?f[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?e|b[^0-9A-Z_a-z]*?(?:a[^0-9A-Z_a-z]*?s[^0-9A-Z_a-z]*?e|o[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?y|i[^0-9A-Z_a-z]*?n[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?n[^0-9A-Z_a-z]*?g[^0-9A-Z_a-z]*?s)|i[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?a?[^0-9A-Z_a-z]*?g[^0-9A-Z_a-z]*?e?|v[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?o)[^0-9>A-Z_a-z])|(?:<[0-9A-Z_a-z].*[sv/]|[\"'](?:.*[sv/])?)(?:background|formaction|lowsrc|on(?:a(?:bort|ctivate|d(?:apteradded|dtrack)|fter(?:print|(?:scriptexecu|upda)te)|lerting|n(?:imation(?:cancel|end|iteration|start)|tennastatechange)|ppcommand|u(?:dio(?:end|process|start)|xclick))|b(?:e(?:fore(?:(?:(?:(?:de)?activa|scriptexecu)t|toggl)e|c(?:opy|ut)|editfocus|input|p(?:aste|rint)|u(?:nload|pdate))|gin(?:Event)?)|l(?:ocked|ur)|oun(?:ce|dary)|roadcast|usy)|c(?:a(?:(?:ch|llschang)ed|nplay(?:through)?|rdstatechange)|(?:ell|fstate)change|h(?:a(?:rging(?:time)?cha)?nge|ecking)|l(?:ick|ose)|o(?:m(?:mand(?:update)?|p(?:lete|osition(?:end|start|update)))|n(?:nect(?:ed|ing)|t(?:extmenu|rolselect))|py)|u(?:echange|t))|d(?:ata(?:(?:availabl|chang)e|error|setc(?:hanged|omplete))|blclick|e(?:activate|livery(?:error|success)|vice(?:found|light|(?:mo|orienta)tion|proximity))|i(?:aling|s(?:abled|c(?:hargingtimechange|onnect(?:ed|ing))))|o(?:m(?:a(?:ctivate|ttrmodified)|(?:characterdata|subtree)modified|focus(?:in|out)|mousescroll|node(?:inserted(?:intodocument)?|removed(?:fromdocument)?))|wnloading)|r(?:ag(?:drop|e(?:n(?:d|ter)|xit)|(?:gestur|leav)e|over|start)|op)|urationchange)|e(?:mptied|n(?:abled|d(?:ed|Event)?|ter)|rror(?:update)?|xit)|f(?:ailed|i(?:lterchange|nish)|o(?:cus(?:in|out)?|rm(?:change|input))|ullscreenchange)|g(?:amepad(?:axismove|button(?:down|up)|(?:dis)?connected)|et)|h(?:ashchange|e(?:adphoneschange|l[dp])|olding)|i(?:cc(?:cardlockerror|infochange)|n(?:coming|put|valid))|key(?:down|press|up)|l(?:evelchange|o(?:ad(?:e(?:d(?:meta)?data|nd)|start)?|secapture)|y)|m(?:ark|essage|o(?:use(?:down|enter|(?:lea|mo)ve|o(?:ut|ver)|up|wheel)|ve(?:end|start)?|z(?:a(?:fterpaint|udioavailable)|(?:beforeresiz|orientationchang|t(?:apgestur|imechang))e|(?:edgeui(?:c(?:ancel|omplet)|start)e|network(?:down|up)loa)d|fullscreen(?:change|error)|m(?:agnifygesture(?:start|update)?|ouse(?:hittest|pixelscroll))|p(?:ointerlock(?:change|error)|resstapgesture)|rotategesture(?:start|update)?|s(?:crolledareachanged|wipegesture(?:end|start|update)?))))|no(?:match|update)|o(?:(?:bsolet|(?:ff|n)lin)e|pen|verflow(?:changed)?)|p(?:a(?:ge(?:hide|show)|int|(?:st|us)e)|lay(?:ing)?|o(?:inter(?:down|enter|(?:(?:lea|mo)v|rawupdat)e|o(?:ut|ver)|up)|p(?:state|up(?:hid(?:den|ing)|show(?:ing|n))))|ro(?:gress|pertychange))|r(?:atechange|e(?:adystatechange|ceived|movetrack|peat(?:Event)?|quest|s(?:et|ize|u(?:lt|m(?:e|ing)))|trieving)|ow(?:e(?:nter|xit)|s(?:delete|inserted)))|s(?:croll(?:end)?|e(?:arch|ek(?:complete|ed|ing)|lect(?:ionchange|start)?|n(?:ding|t)|t)|how|(?:ound|peech)(?:end|start)|t(?:a(?:lled|rt|t(?:echange|uschanged))|k(?:comma|sessione)nd|op)|u(?:bmit|ccess|spend)|vg(?:abort|error|(?:un)?load|resize|scroll|zoom))|t(?:ext|ime(?:out|update)|o(?:ggle|uch(?:cancel|en(?:d|ter)|(?:lea|mo)ve|start))|ransition(?:cancel|end|run|start))|u(?:n(?:derflow|handledrejection|load)|p(?:dateready|gradeneeded)|s(?:erproximity|sdreceived))|v(?:ersion|o(?:ic|lum)e)change|w(?:a(?:it|rn)ing|ebkit(?:animation(?:end|iteration|start)|transitionend)|heel)|zoom)|ping|s(?:rc|tyle))[x08-nf-r ]*?=" 1;
"~*(?i:<META[s/+].*?http-equiv[s/+]*=[s/+]*[\"'`]?(?:(?:c|&#x?0*(?:67|43|99|63);?)|(?:r|&#x?0*(?:82|52|114|72);?)|(?:s|&#x?0*(?:83|53|115|73);?)))" 1;
"~*(?i)[\"'][ ]*(?:[^a-z0-9~_:' ]|in).+?[.].+?=" 1;
"~*(?i:<style.*?>.*?(?:@[ix5c]|(?:[:=]|&#x?0*(?:58|3A|61|3D);?).*?(?:[(x5c]|&#x?0*(?:40|28|92|5C);?)))" 1;
"~*(?i:<.*[:]?vmlframe.*?[s/+]*?src[s/+]*=)" 1; "~*(?i:<.*[:]?vmlframe.*?[s/+]*?src[s/+]*=)" 1;
"~*(?i)b(?:s(?:tyle|rc)|href)b[sS]*?=" 1;
"~*<[?]?import[s/+S]*?implementation[s/+]*?=" 1; "~*<[?]?import[s/+S]*?implementation[s/+]*?=" 1;
"~*(?i)<BASE[s/+].*?href[s/+]*=" 1; "~*(?i)<BASE[s/+].*?href[s/+]*=" 1;
"~*((?:[[^]]*][^.]*.)|Reflect[^.]*.).*(?:map|sort|apply)[^.]*..*call[^`]*`.*`" 1; "~*(?i:<META[s/+].*?charset[s/+]*=)" 1;
"~*!@validateByteRange 20, 45-47, 48-57, 65-90, 95, 97-122" 1; "~*!@validateByteRange 20, 45-47, 48-57, 65-90, 95, 97-122" 1;
"~*(?i)[\"'][ ]*(?:[^a-z0-9~_:' ]|in).+?[.].+?=" 1;
"~*(?:xbcs*/s*[^xbe>]*[xbe>])|(?:<s*/s*[^xbe]*xbe)" 1;
"~*(?i:[\"'][ ]*(?:[^a-z0-9~_:' ]|in).*?(?:(?:l|x5cu006C)(?:o|x5cu006F)(?:c|x5cu0063)(?:a|x5cu0061)(?:t|x5cu0074)(?:i|x5cu0069)(?:o|x5cu006F)(?:n|x5cu006E)|(?:n|x5cu006E)(?:a|x5cu0061)(?:m|x5cu006D)(?:e|x5cu0065)|(?:o|x5cu006F)(?:n|x5cu006E)(?:e|x5cu0065)(?:r|x5cu0072)(?:r|x5cu0072)(?:o|x5cu006F)(?:r|x5cu0072)|(?:v|x5cu0076)(?:a|x5cu0061)(?:l|x5cu006C)(?:u|x5cu0075)(?:e|x5cu0065)(?:O|x5cu004F)(?:f|x5cu0066)).*?=)" 1;
"~*xbc[^xbe>]*[xbe>]|<[^xbe]*xbe" 1;
"~*(?i:<style.*?>.*?(?:@[ix5c]|(?:[:=]|&#x?0*(?:58|3A|61|3D);?).*?(?:[(x5c]|&#x?0*(?:40|28|92|5C);?)))" 1;
"~*{{.*?}}" 1;
"~*(?i)<[^0-9<>A-Z_a-z]*(?:[^sv\"'<>]*:)?[^0-9<>A-Z_a-z]*[^0-9A-Z_a-z]*?(?:s[^0-9A-Z_a-z]*?(?:c[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?p[^0-9A-Z_a-z]*?t|t[^0-9A-Z_a-z]*?y[^0-9A-Z_a-z]*?l[^0-9A-Z_a-z]*?e|v[^0-9A-Z_a-z]*?g|e[^0-9A-Z_a-z]*?t[^0-9>A-Z_a-z])|f[^0-9A-Z_a-z]*?o[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?m|m[^0-9A-Z_a-z]*?(?:a[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?q[^0-9A-Z_a-z]*?u[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?e|e[^0-9A-Z_a-z]*?t[^0-9A-Z_a-z]*?a[^0-9>A-Z_a-z])|(?:l[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?n[^0-9A-Z_a-z]*?k|o[^0-9A-Z_a-z]*?b[^0-9A-Z_a-z]*?j[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?c[^0-9A-Z_a-z]*?t|e[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?b[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?d|a[^0-9A-Z_a-z]*?(?:p[^0-9A-Z_a-z]*?p[^0-9A-Z_a-z]*?l[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?t|u[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?o|n[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?t[^0-9A-Z_a-z]*?e)|p[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?m|i?[^0-9A-Z_a-z]*?f[^0-9A-Z_a-z]*?r[^0-9A-Z_a-z]*?a[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?e|b[^0-9A-Z_a-z]*?(?:a[^0-9A-Z_a-z]*?s[^0-9A-Z_a-z]*?e|o[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?y|i[^0-9A-Z_a-z]*?n[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?n[^0-9A-Z_a-z]*?g[^0-9A-Z_a-z]*?s)|i[^0-9A-Z_a-z]*?m[^0-9A-Z_a-z]*?a?[^0-9A-Z_a-z]*?g[^0-9A-Z_a-z]*?e?|v[^0-9A-Z_a-z]*?i[^0-9A-Z_a-z]*?d[^0-9A-Z_a-z]*?e[^0-9A-Z_a-z]*?o)[^0-9>A-Z_a-z])|(?:<[0-9A-Z_a-z].*[sv/]|[\"'](?:.*[sv/])?)(?:background|formaction|lowsrc|on(?:a(?:bort|ctivate|d(?:apteradded|dtrack)|fter(?:print|(?:scriptexecu|upda)te)|lerting|n(?:imation(?:cancel|end|iteration|start)|tennastatechange)|ppcommand|u(?:dio(?:end|process|start)|xclick))|b(?:e(?:fore(?:(?:(?:(?:de)?activa|scriptexecu)t|toggl)e|c(?:opy|ut)|editfocus|input|p(?:aste|rint)|u(?:nload|pdate))|gin(?:Event)?)|l(?:ocked|ur)|oun(?:ce|dary)|roadcast|usy)|c(?:a(?:(?:ch|llschang)ed|nplay(?:through)?|rdstatechange)|(?:ell|fstate)change|h(?:a(?:rging(?:time)?cha)?nge|ecking)|l(?:ick|ose)|o(?:m(?:mand(?:update)?|p(?:lete|osition(?:end|start|update)))|n(?:nect(?:ed|ing)|t(?:extmenu|rolselect))|py)|u(?:echange|t))|d(?:ata(?:(?:availabl|chang)e|error|setc(?:hanged|omplete))|blclick|e(?:activate|livery(?:error|success)|vice(?:found|light|(?:mo|orienta)tion|proximity))|i(?:aling|s(?:abled|c(?:hargingtimechange|onnect(?:ed|ing))))|o(?:m(?:a(?:ctivate|ttrmodified)|(?:characterdata|subtree)modified|focus(?:in|out)|mousescroll|node(?:inserted(?:intodocument)?|removed(?:fromdocument)?))|wnloading)|r(?:ag(?:drop|e(?:n(?:d|ter)|xit)|(?:gestur|leav)e|over|start)|op)|urationchange)|e(?:mptied|n(?:abled|d(?:ed|Event)?|ter)|rror(?:update)?|xit)|f(?:ailed|i(?:lterchange|nish)|o(?:cus(?:in|out)?|rm(?:change|input))|ullscreenchange)|g(?:amepad(?:axismove|button(?:down|up)|(?:dis)?connected)|et)|h(?:ashchange|e(?:adphoneschange|l[dp])|olding)|i(?:cc(?:cardlockerror|infochange)|n(?:coming|put|valid))|key(?:down|press|up)|l(?:evelchange|o(?:ad(?:e(?:d(?:meta)?data|nd)|start)?|secapture)|y)|m(?:ark|essage|o(?:use(?:down|enter|(?:lea|mo)ve|o(?:ut|ver)|up|wheel)|ve(?:end|start)?|z(?:a(?:fterpaint|udioavailable)|(?:beforeresiz|orientationchang|t(?:apgestur|imechang))e|(?:edgeui(?:c(?:ancel|omplet)|start)e|network(?:down|up)loa)d|fullscreen(?:change|error)|m(?:agnifygesture(?:start|update)?|ouse(?:hittest|pixelscroll))|p(?:ointerlock(?:change|error)|resstapgesture)|rotategesture(?:start|update)?|s(?:crolledareachanged|wipegesture(?:end|start|update)?))))|no(?:match|update)|o(?:(?:bsolet|(?:ff|n)lin)e|pen|verflow(?:changed)?)|p(?:a(?:ge(?:hide|show)|int|(?:st|us)e)|lay(?:ing)?|o(?:inter(?:down|enter|(?:(?:lea|mo)v|rawupdat)e|o(?:ut|ver)|up)|p(?:state|up(?:hid(?:den|ing)|show(?:ing|n))))|ro(?:gress|pertychange))|r(?:atechange|e(?:adystatechange|ceived|movetrack|peat(?:Event)?|quest|s(?:et|ize|u(?:lt|m(?:e|ing)))|trieving)|ow(?:e(?:nter|xit)|s(?:delete|inserted)))|s(?:croll(?:end)?|e(?:arch|ek(?:complete|ed|ing)|lect(?:ionchange|start)?|n(?:ding|t)|t)|how|(?:ound|peech)(?:end|start)|t(?:a(?:lled|rt|t(?:echange|uschanged))|k(?:comma|sessione)nd|op)|u(?:bmit|ccess|spend)|vg(?:abort|error|(?:un)?load|resize|scroll|zoom))|t(?:ext|ime(?:out|update)|o(?:ggle|uch(?:cancel|en(?:d|ter)|(?:lea|mo)ve|start))|ransition(?:cancel|end|run|start))|u(?:n(?:derflow|handledrejection|load)|p(?:dateready|gradeneeded)|s(?:erproximity|sdreceived))|v(?:ersion|o(?:ic|lum)e)change|w(?:a(?:it|rn)ing|ebkit(?:animation(?:end|iteration|start)|transitionend)|heel)|zoom)|ping|s(?:rc|tyle))[x08-nf-r ]*?=" 1;
"~*@contains -->" 1;
"~*<(?:a|abbr|acronym|address|applet|area|audioscope|b|base|basefront|bdo|bgsound|big|blackface|blink|blockquote|body|bq|br|button|caption|center|cite|code|col|colgroup|comment|dd|del|dfn|dir|div|dl|dt|em|embed|fieldset|fn|font|form|frame|frameset|h1|head|hr|html|i|iframe|ilayer|img|input|ins|isindex|kdb|keygen|label|layer|legend|li|limittext|link|listing|map|marquee|menu|meta|multicol|nobr|noembed|noframes|noscript|nosmartquotes|object|ol|optgroup|option|p|param|plaintext|pre|q|rt|ruby|s|samp|script|select|server|shadow|sidebar|small|spacer|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|ul|var|wbr|xml|xmp)W" 1;
"~*(?i)<APPLET[s/+>]" 1;
"~*(?i)<EMBED[s/+].*?(?:src|type).*?=" 1;
"~*(?i:<META[s/+].*?http-equiv[s/+]*=[s/+]*[\"'`]?(?:(?:c|&#x?0*(?:67|43|99|63);?)|(?:r|&#x?0*(?:82|52|114|72);?)|(?:s|&#x?0*(?:83|53|115|73);?)))" 1;
"~*(?i)[s\"'`;/0-9=x0Bx09x0Cx3Bx2Cx28x3B]on[a-zA-Z]{3,25}[sx0Bx09x0Cx3Bx2Cx28x3B]*?=[^=]" 1;
"~*(?i)<LINK[s/+].*?href[s/+]*=" 1;
"~*@detectXSS" 1;
"~*(?i)b(?:s(?:tyle|rc)|href)b[sS]*?=" 1;
"~*((?:[[^]]*][^.]*.)|Reflect[^.]*.).*(?:map|sort|apply)[^.]*..*call[^`]*`.*`" 1;
"~*(?i)<script[^>]*>[sS]*?" 1;
"~*(?i).(?:b(?:x(?:link:href|html|mlns)|data:text/html|formaction|patternb.*?=)|!ENTITY[sv]+(?:%[sv]+)?[^sv]+[sv]+(?:SYSTEM|PUBLIC)|@import|;base64)b" 1;
} }
if ($waf_block_xss) { if ($waf_block_xss) {

File diff suppressed because one or more lines are too long