Time-based Blind SQL Injection 해킹 대비
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# SQL Injection 방어 - Apache 레벨 WAF
|
||||
# Time-based Blind SQL Injection 공격 패턴 차단
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# SLEEP(), BENCHMARK() 등 시간 지연 함수 차단 (Time-based Blind SQLi 핵심 패턴)
|
||||
RewriteCond %{QUERY_STRING} (sleep|benchmark|waitfor\s+delay|pg_sleep) [NC]
|
||||
RewriteRule .* - [F,L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} (sleep|benchmark|waitfor\s+delay|pg_sleep) [NC]
|
||||
RewriteRule .* - [F,L]
|
||||
|
||||
# POST body의 SQLi 패턴은 mod_security로 처리 (아래 참조)
|
||||
</IfModule>
|
||||
|
||||
# PHP 에러 메시지 노출 방지
|
||||
<IfModule mod_php7.c>
|
||||
php_flag display_errors Off
|
||||
php_flag log_errors On
|
||||
</IfModule>
|
||||
<IfModule mod_php.c>
|
||||
php_flag display_errors Off
|
||||
php_flag log_errors On
|
||||
</IfModule>
|
||||
|
||||
# 서버 정보 숨기기
|
||||
ServerSignature Off
|
||||
Reference in New Issue
Block a user