Arista 스위치 로그 수집
파서 버전: 3.0
이 문서에서는 Bindplane 에이전트를 사용하여 Arista 스위치 로그를 Google Security Operations로 수집하는 방법을 설명합니다.
Arista EOS (Extensible Operating System)는 Arista 네트워크 스위치에서 실행되며 시스템 이벤트, 인터페이스 변경, 인증, AAA 회계, 프로토콜 상태 변경에 대한 syslog 메시지를 생성합니다. 파서는 JSON 형식과 syslog 형식을 모두 처리합니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google SecOps 인스턴스
- Windows Server 2016 이상 또는
systemd가 설치된 Linux 호스트 - Bindplane 에이전트와 Arista 스위치 간의 네트워크 연결
- 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
- Arista EOS 4.23.x 이상
- Arista EOS 스위치의 액세스 권한 관리
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서비스가 RUNNING으로 표시됩니다.
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서비스가 활성 (실행 중)으로 표시되어야 합니다.
추가 설치 리소스
추가 설치 옵션 및 문제 해결은 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/arista_switch: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: ARISTA_SWITCH raw_log_field: body service: pipelines: logs/arista_to_chronicle: receivers: - udplog exporters: - chronicle/arista_switch
구성 매개변수
다음 자리표시자를 바꿉니다.
수신자 구성:
listen_address: 리슨할 IP 주소 및 포트:0.0.0.0: 모든 인터페이스에서 수신 대기 (권장)- 포트
514는 표준 syslog 포트입니다 (Linux에서 루트 필요, 루트가 아닌 경우1514사용).
내보내기 도구 구성:
creds_file_path: 수집 인증 파일의 전체 경로입니다.- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id: Google SecOps 콘솔에서 복사한 고객 IDendpoint: 리전 엔드포인트 URL:- 미국:
malachiteingestion-pa.googleapis.com - 유럽:
europe-malachiteingestion-pa.googleapis.com - 아시아:
asia-southeast1-malachiteingestion-pa.googleapis.com - 전체 목록은 리전 엔드포인트를 참조하세요.
- 미국:
구성 파일 저장
- 수정 후 파일을 저장합니다.
- Linux:
Ctrl+O,Enter,Ctrl+X순으로 누릅니다. - Windows: 파일 > 저장을 클릭합니다.
- Linux:
변경사항을 적용하려면 Bindplane 에이전트를 다시 시작하세요.
Linux에서 Bindplane 에이전트를 다시 시작하려면 다음 명령어를 실행합니다.
sudo systemctl restart observiq-otel-collector서비스가 실행 중인지 확인합니다.
```bash sudo systemctl status observiq-otel-collector ```로그에서 오류를 확인합니다.
```bash 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"
Arista 스위치에서 syslog 구성
- Arista 스위치에 로그인합니다.
구성 모드로 전환합니다.
Arista# configure terminalBindplane 에이전트에 로그를 전송하도록 syslog 대상을 구성합니다.
Arista(config)# logging host <bindplane-server-ip> <port-number> protocol udp Arista(config)# logging trap informational Arista(config)# copy running-config startup-config<bindplane-server-ip>를 Bindplane 에이전트 IP 주소로 바꿉니다.<port-number>를 리슨하도록 구성된 포트 (예:514)로 바꿉니다.
(선택사항) AAA 계정의 명령어 실행 로깅을 사용 설정합니다.
Arista(config)# aaa accounting commands all console start-stop logging Arista(config)# aaa accounting commands all default start-stop logging Arista(config)# aaa accounting exec console start-stop logging Arista(config)# aaa accounting exec default start-stop logging Arista(config)# copy running-config startup-config(선택사항) 인증 성공 및 실패 로깅을 사용 설정합니다.
Arista(config)# aaa authentication policy on-success log Arista(config)# aaa authentication policy on-failure log Arista(config)# copy running-config startup-config
UDM 매핑 테이블
| 로그 필드 | UDM 매핑 | 로직 |
|---|---|---|
appname |
target.application |
appname 필드에서 직접 매핑됩니다. |
description |
metadata.description |
product_event_type를 기반으로 하는 grok 패턴을 사용하여 message 필드에서 추출된 description 필드에서 직접 매핑됩니다. |
dst_ip |
target.ip, target.asset.ip |
grok 패턴을 사용하여 message 필드에서 추출된 dst_ip 필드에서 직접 매핑됩니다. |
dst_mac |
target.mac |
grok 패턴을 사용하여 message 필드에서 추출된 dst_mac 필드에서 직접 매핑됩니다. |
dst_port |
target.port |
grok 패턴을 사용하여 message 필드에서 추출된 dst_port 필드에서 직접 매핑됩니다. |
facility |
additional.fields[facility].string_value |
facility 필드에서 직접 매핑됩니다. |
hostname |
principal.hostname, principal.asset.hostname |
hostname 필드에서 직접 매핑됩니다. |
inner_msg |
metadata.description |
grok 패턴을 사용하여 message 필드에서 추출된 inner_msg 필드에서 직접 매핑됩니다. |
ip_protocol |
network.ip_protocol |
grok 패턴을 사용하여 message 필드에서 추출된 ip_protocol 필드에서 직접 매핑됩니다. 값이 'tcp'이면 'TCP'로 변환됩니다. 이벤트 유형이 'NO_IGMP_QUERIER'인 경우 'IGMP'로 설정됩니다. |
pid |
principal.process.pid |
grok 패턴을 사용하여 message 필드에서 추출된 pid 필드에서 직접 매핑됩니다. |
prin_ip |
principal.ip, principal.asset.ip |
grok 패턴을 사용하여 message 필드에서 추출된 prin_ip 필드에서 직접 매핑됩니다. |
product_event_type |
metadata.product_event_type |
grok 패턴을 사용하여 message 필드에서 추출된 product_event_type 필드에서 직접 매핑됩니다. |
proto |
network.application_protocol |
proto 필드가 'sshd'인 경우 UDM 필드가 'SSH'로 설정됩니다. |
severity |
security_result.severity, security_result.severity_details |
security_result.severity는 "DEFAULT", "DEBUG", "INFO", "NOTICE" -> "INFORMATIONAL", "WARNING", "ERROR", "ERR", "WARN" -> "MEDIUM", "CRITICAL", "ALERT", "EMERGENCY" -> "HIGH" 매핑을 기반으로 severity 필드에서 파생됩니다. severity의 원시 값은 security_result.severity_details에 매핑됩니다. |
session_id |
network.session_id |
grok 패턴을 사용하여 message 필드에서 추출된 session_id 필드에서 직접 매핑됩니다. |
source_ip |
principal.ip, principal.asset.ip |
grok 패턴을 사용하여 message 필드에서 추출된 source_ip 필드에서 직접 매핑됩니다. |
source_port |
principal.port |
grok 패턴을 사용하여 message 필드에서 추출된 source_port 필드에서 직접 매핑됩니다. |
src_ip |
principal.ip, principal.asset.ip |
grok 패턴을 사용하여 message 필드에서 추출된 src_ip 필드에서 직접 매핑됩니다. |
table_name |
target.resource.name |
grok 패턴을 사용하여 message 필드에서 추출된 table_name 필드에서 직접 매핑됩니다. 이 필드가 채워지면 target.resource.resource_type이 'TABLE'로 설정됩니다. |
target_host |
target.hostname, target.asset.hostname |
grok 패턴을 사용하여 message 필드에서 추출된 target_host 필드에서 직접 매핑됩니다. |
target_ip |
target.ip, target.asset.ip |
grok 패턴을 사용하여 message 필드에서 추출된 target_ip 필드에서 직접 매핑됩니다. |
target_package |
target.process.command_line |
grok 패턴을 사용하여 message 필드에서 추출된 target_package 필드에서 직접 매핑됩니다. |
target_port |
target.port |
grok 패턴을 사용하여 message 필드에서 추출된 target_port 필드에서 직접 매핑됩니다. |
timestamp |
metadata.event_timestamp |
타임스탬프 객체로 파싱된 후 timestamp 필드에서 직접 매핑됩니다. |
user |
principal.user.userid |
grok 패턴을 사용하여 message 필드에서 추출된 user 필드에서 직접 매핑됩니다. |
user_name |
target.user.userid |
grok 패턴을 사용하여 message 필드에서 추출된 user_name 필드에서 직접 매핑됩니다. |
vrf |
additional.fields[vrf].string_value |
grok 패턴을 사용하여 message 필드에서 추출된 vrf 필드에서 직접 매핑됩니다. 파서 코드에 설명된 복잡한 조건부 로직을 사용하여 has_principal, has_target, user, message, product_event_type, description 필드의 조합에서 파생됩니다. 기본값은 'GENERIC_EVENT'입니다. 'ARISTA_SWITCH'로 하드코딩됩니다. 'Arista Switch'로 하드코딩됩니다. 'Arista'로 하드코딩됩니다. description 필드에 'connection rejected'가 포함된 경우 'BLOCK'으로 설정합니다. |
dpid |
additional.fields[DPID].string_value |
dpid 필드에서 직접 매핑됩니다. |
intf |
additional.fields[intf].string_value |
intf 필드에서 직접 매핑됩니다. |
변경 로그
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가에게 문의하여 답변을 받으세요.