이번 글에서는 SOC에서 가장 큰 골칫거리인 "알람 지옥(False Positive 지옥)"에서 어떻게 탈출할지 실전 기술을 정리해드리겠습니다.
SigmaHQ 문서와 탐지 엔지니어링 가이드에 따르면, 오탐 튜닝은 filter 블록, condition NOT, whitelist 관리, threshold 설정을 체계적으로 활용해야 하며, 테스트 데이터셋으로 검증하는 것이 핵심입니다.
단순히 룰을 끄는 것이 아니라, 탐지 품질을 유지하면서 노이즈를 줄이는 기술을 중점으로 설명드리겠습니다.
◎ 알람 지옥의 원인과 구조
- SOC에서 하루 10만 건 알람 중 95%가 오탐이라면, 분석팀은 피로도가 극대화됩니다.
- 원인은 주로 너무 넓은 패턴, 정상 행위 무시, 환경 특성 미반영입니다.
- Sigma는 filter_legit 블록과 NOT condition으로 이 문제를 구조적으로 해결합니다.
- 탐지 로직을 base_selection + filter로 분리해 유지보수성을 높이는 것이 핵심입니다.
◎ 기본 오탐 튜닝 패턴
- Filter 블록 사용 (가장 효과적)
| detection: base: Image|endswith: '\powershell.exe' CommandLine|contains: 'net user' filter_legit: CommandLine|contains: - 'C:\Windows\System32\WindowsPowerShell' - 'Microsoft Corporation' condition: base and not filter_legit |
- filter_legit는 잘 알려진 정상 패턴을 명시적으로 제외.
- Whitelist 리스트 관리
| filter_whitelist: Image: - 'C:\Program Files\LegitApp\app.exe' - 'C:\Windows\System32\taskhost.exe' Username: - 'svc_scan' - 'admin_service' |
- 정상 사용자/프로세스 제외.
◎ 고급 튜닝 기술
- Threshold (value_count)
| detection: failed_login: result: failed condition: value_count(failed_login, 5, 10m) > 20 |
- 10분간 5개 이상 실패 시 20회 초과 탐지.
- Environment-specific 필터
| filter_legit: Hostname|startswith: - 'DC0' # Domain Controller - 'SCANNER' # 취약점 스캐너 |
- 환경별 정상 호스트 제외.
- Time-based 필터:
| filter_maintenance: event_time: - between: '22:00', '06:00' condition: base and not filter_maintenance |
- 유지보수 시간 제외.
◎ 단계별 오탐 튜닝 워크플로
- 알람 분석 (1주)
| # Hayabusa 또는 Sigma CLI로 히트 로그 분석 hayabusa.exe -d evtx/ -r rules/ --json > hits.json grep "powershell" hits.json | jq '.event | select(.Computer == "DC01")' |
- 정상 패턴 식별
- 관리자 스크립트 목록.
- 백업/스캐너 정상 행위.
- 타임존/유지보수 패턴.
- Filter 블록 추가
| # 기존 condition: selection # 튜닝 후 filter_dc: Hostname|startswith: 'DC' condition: selection and not filter_dc |
- Threshold 적용
| # 단순 패턴 → count 기반 condition: value_count(selection, 3, 5m) > 10 |
- 테스트 검증
| # evtx-baseline (정상 데이터셋) sigma test --target splunk rule.yml evtx-baseline/ # 0 FP 목표 |
◎ 실전 예제: PowerShell 오탐 튜닝
- Before (지옥):
| detection: selection: Image|endswith: '\powershell.exe' condition: selection # 1만 건/일 |
- After (천국):
| detection: selection: Image|endswith: '\powershell.exe' CommandLine|contains: - 'net user' - 'whoami' - 'Invoke-WebRequest' filter_legit: CommandLine|contains: - 'Get-Service' - 'WindowsUpdate' - 'Microsoft Corporation' filter_dc: Hostname|startswith: 'DC' condition: value_count(selection, 3, 10m) > 5 and not filter_legit and not filter_dc |
- 결과: 1만 → 50건/일 (99.5% 감소).
◎ Whitelist 관리 전략
- Dynamic Whitelist
| filter_whitelist: Username: - 'file:whitelist_users.txt' # 외부 파일 |
- Hash-based
| filter_hash: ImageHash|in: - 'known_legit_hash1' - 'known_legit_hash2' |
- Certificate Pinning
| filter_signed: ImageSigned: true Signer|startswith: 'Microsoft' |
◎ 환경별 튜닝 가이드
- Windows DC 환경
| filter_dc: Hostname|startswith: ['DC01', 'DC02'] Username: ['svc_backup'] |
- Linux Scanner
| filter_scanner: UserAgent|contains: ['Nessus', 'Nmap'] CommandLine|startswith: '/usr/bin/nmap' |
- Cloud (AWS)
| filter_cloud: UserAgent|contains: 'aws-cli' eventName|startswith: 'Describe' |
◎ 자동화 도구
- SigmaOptimizer
| SigmaOptimizer -i rules/ -t evtx-baseline/ -o optimized_rules/ # 자동 FP 튜닝 |
- Hayabusa Rule Tester:
| hayabusa.exe -r rules/ --test-set fp-test.evtx |
- Sigma CLI Validate:
| sigma validate --fp-check rules/ |
◎ 성능 측정 지표
- KPI
- Hit Rate: TP / (TP + FP) > 95%.
- Alert Volume: < 100/분/SOC analyst.
- MTTR: 오탐 수정 < 1시간.
- Coverage: Navigator 75%+.
- 대시보드
| Grafana: COUNT(*) FROM sigma_hits WHERE fp = true GROUP BY rule_id |
◎ 마무리
- 알람 지옥 탈출은 filter + threshold + whitelist 체계적 적용입니다.
- Sigma의 구조화된 오탐 튜닝으로 노이즈 99% 감소, 탐지 품질 유지 가능합니다.
'IT > Sigma Rule' 카테고리의 다른 글
| [Sigma Rule] 제15화: 오픈소스 Sigma 레포지토리 200% 활용법 (CTI 연동 전략) (0) | 2026.05.06 |
|---|---|
| [Sigma Rule] 제14화: 단일 로그의 한계를 넘는 메타 룰(Meta Rule)과 상관분석 (0) | 2026.05.05 |
| [Sigma Rule] 제12화: MITRE ATT&CK와 Sigma Rule 매핑: 체계적인 위협 커버리지 구축 (0) | 2026.05.03 |
| [Sigma Rule] 제11화: ArcSight 환경에서 Sigma 활용하기 (0) | 2026.05.02 |
| [Sigma Rule] 제10화: QRadar 환경에서 Sigma 활용하기 (0) | 2026.05.01 |
