--- title: anomaly-detect 폐기 (오탐 다수) updated: 2026-04-25 tags: [security, crowdsec, anomaly-detect, deprecation] --- # anomaly-detect 인스턴스 완전 제거 (2026-04-25) ## 결정 [[../infra/platform/anomaly-detect|anomaly-detect]] (Grok-4-fast agentic 분석기)를 컨테이너 포함 완전 제거. ## 폐기 사유 CrowdSec active decision 점검 중 anomaly-detect가 발급한 ban이 사실상 모두 오탐임을 확인. ### 오탐 사례 (2026-04-19 ~ 2026-04-24 alerts metrics 기준) | ban된 IP | 시나리오 | 의심 사유 | |---|---|---| | `1.1.1.1`, `2.2.2.2`, `3.3.3.3`, `4.4.4.4`, `5.5.5.5` | path-enumeration | 명백한 시퀀스/예시 IP. 1.1.1.1은 Cloudflare DNS | | `1.2.3.4`, `5.6.7.8`, `9.10.11.12`, `13.14.15.16` | path-enumeration | 튜토리얼/예제용 더미 IP 패턴 | | `172.70.242.122` | path-enumeration | **Cloudflare 엣지 IP 대역** (172.70.0.0/16). real IP 추출 실패 의심 | | `45.79.164.218`, `45.79.207.123`, `45.79.218.123/124`, `45.79.245.123` | path-enumeration | **Linode 도쿄 IDC 대역** — Netbis NPM 오리진과 같은 IDC. 자체 인프라 가능성 | | `203.133.168.226/227/228` | path-enumeration | 동일 ASN 연속 IP — NAT 통합 환경과 공격 구분 실패 | 같은 기간 hub 시나리오는 단 1건(`103.215.74.213`, India SoloRDP)만 잡았고 그것이 진짜 스캐너였음 (`http-probing` + `http-sensitive-files` + `http-crawl-non_statics` 동시 매칭). ### 추정 원인 1. **Grok-4-fast의 LogSQL 결과 해석 오류**: APISIX access log에 합성/health-check/tutorial 트래픽이 섞여있고, agent가 이를 "여러 IP가 같은 path 열거"로 분류 2. **real IP 추출 검증 부재**: `172.70.x.x` ban이 통과한 건 Cloudflare 엣지 IP를 client_ip로 받았다는 의미. APISIX `real_ip_from`에 CF 엣지 대역이 빠진 가능성 3. **자체 인프라 whitelist 부재**: Linode IDC `45.79.x` 대역이 화이트리스트에 없음 ## 작업 내역 (헤임달 위임) | 단계 | 명령 | 위치 | |---|---|---| | 1 | `systemctl stop anomaly-detect.timer anomaly-detect.service` + `disable` | incus-hp2 / `anomaly-detect` 컨테이너 | | 2 | `cscli decisions delete --origin crowdsec` (활성 2건 해제: `45.94.31.74`, `45.76.123.45`) | jp1 incus / `crowdsec` 컨테이너 | | 3 | `incus stop anomaly-detect; incus delete anomaly-detect` | incus-hp2 | | 4 | `cscli machines delete ` | jp1 incus / `crowdsec` 컨테이너 | ## 보존 항목 - **Vault `secret/ai/openrouter`**: OpenRouter API 키. 다른 서비스가 공용으로 사용할 가능성이 있어 삭제하지 않고 보존. - **Gitea `kaffa/anomaly-detect` private repo**: 코드 reference로 보존 (재구축 시 참고). ## 향후 재가동 조건 재도입 시 다음 항목 선행 필수: 1. APISIX access log 합성/health-check 트래픽 사전 필터링 (Vector transform 단계) 2. APISIX `real_ip_from`에 Cloudflare 엣지 대역 (`173.245.48.0/20`, `103.21.244.0/22`, `103.22.200.0/22`, `103.31.4.0/22`, `141.101.64.0/18`, `108.162.192.0/18`, `190.93.240.0/20`, `188.114.96.0/20`, `197.234.240.0/22`, `198.41.128.0/17`, `162.158.0.0/15`, `104.16.0.0/13`, `104.24.0.0/14`, `172.64.0.0/13`, `131.0.72.0/22`) 추가 검증 3. Linode 도쿄 IDC 대역 (45.79.x 등 자체 인프라 IDC) whitelist 등록 4. dry_run으로 최소 1주 운영 후 임계값 조정 ## 참고 - 정본 stub: [[../infra/platform/anomaly-detect]] (deprecated marker만 남김) - 이전 설계 반복 이력: [[2026-04-08-anomaly-detect-iterations]] - CrowdSec LAPI 정본: [[../infra/security/crowdsec-safeline]]