Suricata EVE 로그 수집
이 문서에서는 Bindplane을 사용하여 Suricata EVE 로그를 Google Security Operations로 수집하는 방법을 설명합니다.
Suricata는 침입 감지 (IDS), 침입 방지 (IPS), 네트워크 보안 모니터링 기능을 제공하는 오픈소스 고성능 네트워크 위협 감지 엔진입니다. EVE (Extensible Event Format) 로그 출력은 알림, 흐름, DNS, HTTP, TLS, 파일 트랜잭션 데이터를 포괄하는 포괄적인 JSON 형식 로그를 제공합니다. 파서는 Suricata EVE JSON 형식 로그에서 필드를 추출합니다. JSON 메시지를 파싱한 다음 이러한 값을 통합 데이터 모델 (UDM)에 매핑합니다. 또한 이벤트 소스 및 유형의 기본 메타데이터 값을 설정합니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google SecOps 인스턴스
- Windows Server 2016 이상 또는
systemd가 설치된 Linux 호스트 - 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
- Suricata 호스트에 대한 액세스 권한 (루트 또는 sudo)
Google SecOps 수집 인증 파일 가져오기
- Google SecOps 콘솔에 로그인합니다.
- SIEM 설정 > 수집 에이전트로 이동합니다.
- 수집 인증 파일을 다운로드합니다. Bindplane이 설치될 시스템에 파일을 안전하게 저장합니다.
Google SecOps 고객 ID 가져오기
- Google SecOps 콘솔에 로그인합니다.
- SIEM 설정 > 프로필로 이동합니다.
- 조직 세부정보 섹션에서 고객 ID를 복사하여 저장합니다.
Bindplane 에이전트 설치
다음 안내에 따라 Windows 또는 Linux 운영체제에 Bindplane 에이전트를 설치합니다.
Windows 설치
- 명령 프롬프트 또는 PowerShell을 관리자로 엽니다.
다음 명령어를 실행합니다.
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet설치가 완료될 때까지 기다립니다.
다음을 실행하여 설치를 확인합니다.
sc query observiq-otel-collector
서비스가 실행 중으로 표시되어야 합니다.
Linux 설치
- 루트 또는 sudo 권한으로 터미널을 엽니다.
다음 명령어를 실행합니다.
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh설치가 완료될 때까지 기다립니다.
다음을 실행하여 설치를 확인합니다.
sudo systemctl status observiq-otel-collector
서비스가 active (running)으로 표시되어야 합니다.
추가 설치 리소스
추가 설치 옵션 및 문제 해결은 Bindplane 에이전트 설치 가이드를 참고하세요.
syslog를 수집하여 Google SecOps로 전송하도록 Bindplane 에이전트 구성
구성 파일 찾기
Linux:
sudo nano /etc/bindplane-agent/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
구성 파일 설정
config.yaml의 전체 내용을 다음 구성으로 바꿉니다.receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/chronicle_w_labels: compression: gzip creds_file_path: '/path/to/ingestion-authentication-file.json' customer_id: 'YOUR_CUSTOMER_ID' endpoint: malachiteingestion-pa.googleapis.com log_type: 'SURICATA_EVE' raw_log_field: body ingestion_labels: service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
구성 매개변수
다음 자리표시자를 바꿉니다.
수신기 구성:
udplog: UDP syslog의 경우udplog, TCP syslog의 경우tcplog사용0.0.0.0: 리슨할 IP 주소 (모든 인터페이스에서 리슨하려면0.0.0.0)514: 리슨할 포트 번호 (표준 syslog 포트)
내보내기 도구 구성:
creds_file_path: 수집 인증 파일의 전체 경로입니다.- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
YOUR_CUSTOMER_ID: 고객 ID 가져오기 섹션의 고객 IDendpoint: 리전 엔드포인트 URL:- 미국:
malachiteingestion-pa.googleapis.com - 유럽:
europe-malachiteingestion-pa.googleapis.com - 아시아:
asia-southeast1-malachiteingestion-pa.googleapis.com - 전체 목록은 리전 엔드포인트를 참고하세요.
- 미국:
log_type: Chronicle에 표시되는 로그 유형 (SURICATA_EVE)
구성 파일 저장
- 수정 후 파일을 저장합니다.
- Linux:
Ctrl+O,Enter,Ctrl+X순서로 누릅니다. - Windows: 파일 > 저장을 클릭합니다.
- Linux:
Bindplane 에이전트를 다시 시작하여 변경사항 적용
Linux에서 Bindplane 에이전트를 다시 시작하려면 다음 명령어를 실행합니다.
sudo systemctl restart observiq-otel-collector서비스가 실행 중인지 확인합니다.
sudo systemctl status observiq-otel-collector로그에서 오류를 확인합니다.
sudo journalctl -u observiq-otel-collector -f
Windows에서 Bindplane 에이전트를 다시 시작하려면 다음 옵션 중 하나를 선택합니다.
명령 프롬프트 또는 PowerShell(관리자 권한)
net stop observiq-otel-collector && net start observiq-otel-collector서비스 콘솔:
Win+R를 누르고services.msc를 입력한 다음 Enter 키를 누릅니다.- observIQ OpenTelemetry Collector를 찾습니다.
마우스 오른쪽 버튼을 클릭하고 다시 시작을 선택합니다.
서비스가 실행 중인지 확인합니다.
sc query observiq-otel-collector로그에서 오류를 확인합니다.
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
Suricata EVE syslog 전달 구성
- Suricata 구성 파일 (일반적으로
/etc/suricata/suricata.yaml)을 엽니다. outputs섹션을 찾아 syslog의 EVE 로그 출력을 구성합니다.outputs: - eve-log: enabled: yes filetype: syslog identity: "suricata" facility: local5 level: Info types: - alert: payload: yes payload-printable: yes packet: yes metadata: yes - http: extended: yes - dns: query: yes answer: yes - tls: extended: yes - files: force-magic: no - flow - netflow - anomaly: enabled: yes - stats: enabled: yessyslog 데몬이 Bindplane으로 전달하도록 구성되지 않은 경우 rsyslog 또는 syslog-ng를 구성합니다.
rsyslog의 경우 (
/etc/rsyslog.conf수정 또는/etc/rsyslog.d/suricata.conf생성):local5.* @BINDPLANE_IP:514BINDPLANE_IP를 Bindplane 에이전트 호스트의 IP 주소로 바꿉니다.- UDP의 경우
@을 사용하고 TCP의 경우@@을 사용합니다.
syslog-ng의 경우 (
/etc/syslog-ng/syslog-ng.conf수정):destination d_bindplane { udp("BINDPLANE_IP" port(514)); }; filter f_suricata { facility(local5); }; log { source(s_src); filter(f_suricata); destination(d_bindplane); };
syslog 데몬을 다시 시작합니다.
sudo systemctl restart rsyslogSuricata를 다시 시작합니다.
sudo systemctl restart suricataBindplane 에이전트 로그를 확인하여 syslog 메시지가 전송되고 있는지 확인합니다.
UDM 매핑 테이블
| 로그 필드 | UDM 매핑 | 논리 |
|---|---|---|
| 타임스탬프 | metadata.event_timestamp | 이벤트 타임스탬프 |
| event_type | metadata.product_event_type | EVE 이벤트 유형 (예: alert, flow, dns, http, tls) |
| src_ip | principal.ip | 소스 IP 주소 |
| src_port | principal.port | 소스 포트 번호 |
| dest_ip | target.ip | 대상 IP 주소 |
| dest_port | target.port | 대상 포트 번호 |
| proto | network.ip_protocol | 네트워크 프로토콜 (예: TCP, UDP, ICMP) |
| flow_id | network.session_id | 고유 흐름 식별자 |
| alert.signature | security_result.rule_name | 알림 서명 이름 |
| alert.signature_id | security_result.rule_id | 알림 서명 식별자 |
| alert.severity | security_result.severity | 알림 심각도 수준 |
| alert.category | security_result.category_details | 알림 분류 카테고리 |
| alert.action | security_result.action | 취해진 조치 (예: 허용, 차단) |
| alert.rev | security_result.rule_version | 규칙 버전 번호 |
| http.hostname | target.hostname | HTTP 요청 호스트 이름 |
| http.url | target.url | HTTP 요청 URL |
| http.http_method | network.http.method | HTTP 요청 메서드 |
| http.status | network.http.response_code | HTTP 응답 상태 코드 |
| http.http_user_agent | network.http.user_agent | HTTP 사용자 에이전트 문자열 |
| http.http_refer | network.http.referral_url | HTTP 리퍼러 URL |
| http.length | additional.fields | HTTP 콘텐츠 길이 |
| dns.type | network.dns.type | DNS 쿼리 또는 응답 |
| dns.rrname | network.dns.questions.name | DNS 쿼리 이름 |
| dns.rrtype | network.dns.questions.type | DNS 쿼리 유형 |
| dns.rdata | network.dns.answers.data | DNS 응답 데이터 |
| tls.subject | network.tls.client.subject | TLS 인증서 주체 |
| tls.issuerdn | network.tls.client.issuer | TLS 인증서 발급기관 |
| tls.sni | network.tls.client.server_name | TLS 서버 이름 표시 |
| tls.version | network.tls.version | TLS 버전 |
| tls.ja3.hash | network.tls.client.ja3 | JA3 클라이언트 디지털 지문 해시 |
| tls.ja3s.hash | network.tls.server.ja3s | JA3S 서버 디지털 지문 해시 |
| app_proto | network.application_protocol | 애플리케이션 계층 프로토콜이 감지됨 |
| flow.bytes_toserver | network.sent_bytes | 클라이언트에서 서버로 전송된 바이트 |
| flow.bytes_toclient | network.received_bytes | 서버에서 클라이언트로 전송된 바이트 |
| flow.pkts_toserver | additional.fields | 클라이언트에서 서버로 전송된 패킷 |
| flow.pkts_toclient | additional.fields | 서버에서 클라이언트로 전송된 패킷 |
| in_iface | additional.fields | 입력 네트워크 인터페이스 |
| community_id | network.community_id | 네트워크 커뮤니티 ID 흐름 해시 |
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가에게 문의하여 답변을 받으세요.