Time-based Blind SQL Injection 해킹 대비

This commit is contained in:
2026-03-17 17:11:52 +09:00
parent a57fc28825
commit 51b9a99f95
3 changed files with 29 additions and 9 deletions
+28
View File
@@ -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