사용 매뉴얼
Sigma 개요
Sigma는 SIEM 시스템에 독립적인 형식으로 탐지 규칙을 작성할 수 있어, 다양한 플랫폼에서 동일한 규칙을 활용할 수 있습니다.
Sigma 룰 구조
title: 룰 제목
id: UUID 형식의 고유 식별자
status: experimental | test | stable
description: 탐지 설명
references:
- https://참조URL
author: 작성자
date: 작성일 (YYYY-MM-DD)
modified: 수정일
tags:
- attack.tactic
- attack.technique_id
logsource:
product: windows | linux | macos 등
category: process_creation | file_event 등
service: security | system 등
detection:
selection:
필드명: 값
condition: selection
falsepositives:
- 오탐 가능 사례
level: informational | low | medium | high | critical
Detection 문법
기본 필드 매칭
→
Modifier (수정자)
| Modifier | 설명 | 로그프레소 변환 |
|---|---|---|
| contains | 부분 문자열 포함 | contains(field, "value") |
| startswith | 접두사 매칭 | field == "value*" |
| endswith | 접미사 매칭 | field == "*value" |
| re | 정규표현식 | match(field, "pattern") |
| cidr | IP 대역 매칭 | network(field, prefix) == ip("addr") |
| base64 | Base64 디코딩 후 매칭 | decode(frombase64(field)) == "value" |
| all | 모든 값 AND 조건 | 각 값을 AND로 연결 |
예시:
→
다중 값 (OR 조건)
→
Condition 표현식
| 표현식 | 설명 |
|---|---|
| selection | 해당 selection 참조 |
| selection1 and selection2 | 두 조건 모두 만족 |
| selection1 or selection2 | 둘 중 하나 만족 |
| not selection | 조건 부정 |
| 1 of selection_* | 패턴 매칭되는 selection 중 1개 이상 |
| all of selection_* | 패턴 매칭되는 모든 selection 만족 |
예시:
detection:
selection_parent:
ParentImage|endswith: '\explorer.exe'
selection_child:
Image|endswith: '\cmd.exe'
filter:
CommandLine|contains: 'legitimate'
condition: selection_parent and selection_child and not filter
로그프레소 쿼리 변환 규칙
AND 조건 분리
최상위 AND 조건은 개별 | search 명령으로 분리됩니다:
→
OR 조건 그룹화
OR 조건은 괄호로 그룹화됩니다:
→
NOT 조건
→
Of 표현식
→
필드 매핑
Sigma 필드명은 로그프레소 정규 필드로 매핑됩니다.
process_creation 카테고리 예시
| Sigma 필드 | 로그프레소 필드 |
|---|---|
| Image | image_path |
| ParentImage | parent_image_path |
| CommandLine | cmd_line |
| User | user |
| ProcessId | pid |
지원하지 않는 기능
현재 다음 기능은 변환되지 않습니다:
-
Keyword 매칭: 필드명 없이 문자열만 나열하는 형식
-
Aggregation 조건:
count,sum등 집계 함수
이러한 룰은 쿼리 필드가 null로 표시됩니다.
