From cf076b944aa8335fad753e8a895a21df95836820 Mon Sep 17 00:00:00 2001 From: kappa Date: Thu, 9 Apr 2026 11:51:09 +0900 Subject: [PATCH] =?UTF-8?q?crowdsec:=20apisix-high-rate-per-ip=20=EC=99=84?= =?UTF-8?q?=ED=99=94=20(200=E2=86=921000,=20300ms=E2=86=92100ms),=202026-0?= =?UTF-8?q?4-09=20=EC=98=A4=ED=83=90=20=EC=9D=B8=EC=8B=9C=EB=8D=98?= =?UTF-8?q?=ED=8A=B8=20=EA=B8=B0=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/crowdsec-safeline.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/crowdsec-safeline.md b/infra/crowdsec-safeline.md index 398afb8..16e3620 100644 --- a/infra/crowdsec-safeline.md +++ b/infra/crowdsec-safeline.md @@ -150,7 +150,7 @@ ddos-detect AI 분석기 폐기 후 deterministic 패턴 매칭으로 대체. | 시나리오 | 매개변수 | 의도 | filter | |---|---|---|---| -| `apisix-high-rate-per-ip` | capacity 200, leakspeed 300ms (≈ 200req/60s sustained) | 일반 HTTP flood. APISIX 자체 limit-req(20 req/s)에 안 걸리는 sustained 패턴 | `log_type=http_access-log`, groupby `source_ip` | +| `apisix-high-rate-per-ip` | capacity 1000, leakspeed 100ms (≈ sustained 10 req/s, burst 1000) | 일반 HTTP flood. APISIX 자체 limit-req(20 req/s)에 안 걸리는 sustained 패턴 | `log_type=http_access-log`, groupby `source_ip` | | `apisix-499-burst` | capacity 30, leakspeed 2s | connection exhaustion / Slowloris (클라이언트 강제 끊김) | `http_status == "499"` | | `apisix-single-path-flood` | capacity 50, leakspeed 600ms | 동일 path 반복 (CAPTCHA 우회, login bf, 동일 자원 폭격) | groupby `source_ip + ":" + http_path` | | `apisix-5xx-burst` | capacity 20, leakspeed 3s | 백엔드 부하 유발성 공격, 취약점 스캔 | `http_status startsWith "5"` | @@ -160,6 +160,7 @@ ddos-detect AI 분석기 폐기 후 deterministic 패턴 매칭으로 대체. - `499-burst`: 모바일 클라이언트 끊김으로 정상 발생할 수 있어 30 임계값을 며칠 관찰 후 조정 권장. - `high-rate-per-ip`: APISIX `limit-req` 글로벌 룰(20 req/s burst 10)을 통과한 트래픽만 도달 → 1차 통과 후 sustained pattern을 잡는 2차 layer. - 현재 모두 `remediation: true` (즉시 ban). dry-run으로 시작 안 함 — false positive 발생 시 임계값 또는 ban duration 조정. +- **2026-04-09 조정**: `high-rate-per-ip` 초기값(capacity 200, leakspeed 300ms) 사용 중 kappa 본인 트래픽이 지속 ≈3.3 req/s 한도를 넘어 오탐 ban 발생 → BunnyCDN 엣지 미들웨어가 캡챠 페이지 반환 → **POST /__captcha/verify 가 BunnyCDN 미들웨어에서 미처리 상태로 origin까지 흘러 404 반환하는 dead-end 버그**와 결합되어 outline/vault/n8n/jarvis/telegram-webhook/actions 전 호스트 접근 불가. 조치: (1) cscli로 ban decision 삭제 + BunnyCDN zone 캐시 퍼지, (2) capacity 200→1000, leakspeed 300ms→100ms로 완화 (sustained 10 req/s 허용). 별건: BunnyCDN 미들웨어 스크립트 64811의 verify POST 처리 버그는 미해결(웹 UI로 스크립트 본문 수정 필요). ### 발견 사항: K3s APISIX 글로벌 limit-req