이번 글에서는 logsource 정의를 실무 중심으로 해부해드리겠습니다.

SIEM 상관분석에서 자주 쓰이는 단일 장비(IPS, FW, WAF, DDoS, WebLog, VPN)와 다중 로그 조합까지 포괄적으로 다루며, 윈도우/클라우드와 함께 네트워크 보안 장비 로그를 중점으로 공략하겠습니다.

SigmaHQ 공식 문서에 따르면 logsource는 category, product, service로 구성되며, SIEM 효율과 정확도를 결정짓는 핵심입니다.

상관분석 룰의 경우 여러 logsource를 correlation 타입으로 연결해 다중 이벤트 패턴을 잡을 수 있습니다.

 

◎  logsource의 실무적 중요성: 단일 vs 상관분석

  • SIEM에서 logsource는 단순 로그 필터가 아닙니다. 
  • 상관분석 룰의 기반으로, 단일 장비(IPS alert, FW deny)나 조합(FW + WebLog + VPN) 탐지를 정의합니다. 
  • 잘못된 logsource는 탐지 누락이나 성능 저하를 초래하죠. Sigma는 네트워크 장비 로그를 category: firewall, web, proxy 등으로 지원하며, correlation을 통해 FW deny → WAF anomaly → VPN brute force 같은 체인을 연결합니다.
  • 가이드처럼 logsource를 정확히 잡으면 SIEM 쿼리가 최적화되고, 변환 시 필드 매핑이 자동화됩니다.

 

◎ logsource 3대 필드 완전 해부

  • category: 로그 유형 (firewall, web, proxy, process_creation 등)
  • product: 장비/플랫폼 (paloalto, f5, cisco, windows, aws)
  • service: 세부 채널 (syslog, cef, json)

 

1. 윈도우 이벤트 로그 소스

  • process_creation이 대표적입니다. 

 - Sysmon 프로세스 생성 탐지

title: LOLBIN PowerShell via CMD (Sysmon)
id: sysmon-powershell-lolbin-001
logsource:
  category: process_creation
  product: windows
  service: sysmon     # Sysmon EID 1
detection:
  selection:
    Image|endswith: '\powershell.exe'
    ParentImage|endswith: 
      - '\cmd.exe'
      - '\explorer.exe'
  condition: selection
level: high


 - Security 이벤트 탐지

title: LOLBIN PowerShell via CMD (Security)
id: security-powershell-lolbin-001  
logsource:
  category: process_creation
  product: windows
  service: security    # EID 4688
detection:
  selection:
    EventID: 4688
    NewProcessName|endswith: '\powershell.exe'
    ParentProcessName|contains: 'cmd.exe'
  condition: selection
level: high

 

2. 네트워크 보안 장비 로그 소스 (IPS/FW/WAF/DDoS)

  • SIEM 상관분석의 70%가 네트워크 로그입니다. Sigma는 firewall, ids, waf, proxy 카테고리를 지원.

 - 예시:

장비 Category Product Service 탐지 예
Palo Alto FW firewall paloalto - deny IP
Cisco IPS ids cisco snort signature hit
F5 WAF web f5 asm anomaly score
DDoS 미티게이터 firewall radware - volumetric attack
WebLog web apache access suspicious UA
VPN vpn cisco asa brute force

 

 - Palo Alto FW Deny 탐지

title: Palo Alto Suspicious FW Deny
id: paloalto-fw-deny-001
logsource:
  category: firewall
  product: paloalto    # 필수!
detection:
  selection:
    action: deny
    app|startswith: 
      - 'ssh'
      - 'rdp'
    src_zone: untrust
  condition: selection
level: medium

 

 - Cisco ASA VPN Brute Force

title: Cisco ASA VPN Failed Login
id: cisco-vpn-bruteforce-001
logsource:
  category: vpn
  product: cisco
  service: asa
detection:
  selection:
    message|contains: '%ASA-4-113019'
    Username|startswith: 'guest'
  condition: selection
level: medium


 - F5 ASM WAF Anomaly

title: F5 ASM High Anomaly Score
id: f5-asm-anomaly-001
logsource:
  category: web
  product: f5
  service: asm
detection:
  selection:
    attack_type: anomaly
    anomaly_score:
      - 40
      - 41
      - 42
      - 43
      - 44
      - 45
  condition: 1 of selection*
level: high


 - Apache WebLog Suspicious UA

title: Apache Suspicious User-Agent
id: apache-weblog-ua-001
logsource:
  category: web
  product: apache
detection:
  selection:
    http_user_agent|contains:
      - 'curl'
      - 'wget'
      - 'python-requests'
    http_method: POST
  filter_legit:
    http_user_agent|contains: 'Googlebot'
  condition: selection and not filter_legit
level: low


3. DDoS 및 IPS 탐지
 - Generic DDoS 탐지

title: DDoS Volumetric Attack
id: ddos-volumetric-001
logsource:
  category: firewall
  product: generic-firewall
detection:
  selection:
    action: drop
    reason|contains: 
      - 'SYN flood'
      - 'UDP flood'
      - 'ICMP flood'
  condition: selection
level: critical

 

 - Snort IPS Signature Hit

title: Snort High Priority Signature
id: snort-sid-high-001
logsource:
  category: ids
  product: snort
detection:
  selection:
    signature_id|gt: 1000000  # High priority
    classification|contains: 'attempted'
  condition: selection
level: high

 

4. 클라우드 로그 소스

 - AWS CloudTrail IAM 변경

title: AWS IAM Policy Change
id: aws-iam-policy-change-001
logsource:
  category: aws-cloudtrail
  product: aws
  service: management-console
detection:
  selection:
    eventName: 
      - 'AttachRolePolicy'
      - 'CreatePolicyVersion'
      - 'DeletePolicy'
  condition: 1 of selection*
level: high

 

 - Azure AD Suspicious Login

title: Azure AD Failed Login from New IP
id: azure-ad-failed-newip-001
logsource:
  category: azure
  service: signinlogs
detection:
  selection:
    ResultType: 50126  # New IP
    status|contains: 'Failure'
  condition: selection
level: medium

 

5. 상관분석 실전 예제 (FW + WAF + VPN)

 - 상황: FW deny → WAF anomaly → VPN brute force 체인
  > 1단계: FW Deny 룰

title: FW Suspicious Deny #1
id: fw-deny-001
logsource:
  category: firewall
  product: paloalto
detection:
  selection:
    action: deny
    app: 'unknown-tcp'
  condition: selection
tags:
  - correlation_step: 1


  > 2단계: WAF Anomaly 룰

title: WAF High Anomaly #2
id: waf-anomaly-002
logsource:
  category: web
  product: f5
detection:
  selection:
    anomaly_score|gt: 40
  condition: selection
tags:
  - correlation_step: 2


  > 3단계: 상관분석 룰

title: FW+WAF+VPN Attack Chain
id: correlation-chain-001
correlation:
  type: temporal
  rules:
    - fw-deny-001
    - waf-anomaly-002
  group-by: 
    - src_ip
  timespan: 10m
  condition: all of them
logsource:
  category: firewall  # 상관분석의 기본 logsource
level: critical

 

 

 

 

◎ 실전 공략: logsource 마스터

1. 장비별 템플릿:

# IPS Snort
logsource:
  category: ids
  product: snort

# WAF ModSecurity
logsource:
  category: web
  product: modsecurity

# DDoS (generic)
logsource:
  category: firewall
  product: generic-firewall


2. 상관분석 워크플로:

  • 단일 룰 ID 생성.
  • Correlation YAML 작성.
  • sigma convert --target splunk.

 

3. 흔한 실수 피하기:

  • 너무 넓은 category (firewall → paloalto-firewall).
  • service 누락 (syslog vs cef).
  • 상관 시 timespan 과소/과다.

4. 상관분석 시 주의사항

  • 각 룰에 correlation_step 태그
  • group-by: src_ip 또는 dst_ip
  • timespan: 5m~30m 적정 설정
  • 최종 룰에 condition: all of them

 

5. 변환 테스트

sigma convert fw-deny.yml --target splunk-windows
sigma convert fw-deny.yml --target elasticsearch  
sigma convert correlation-chain.yml --target qradar



 

 

반응형

+ Recent posts