Cisco 라우터 로그 수집

다음에서 지원:

이 문서에서는 Bindplane 에이전트를 사용하여 Cisco 라우터 로그를 Google Security Operations에 수집하는 방법을 설명합니다. 파서는 먼저 다양한 syslog 메시지 형식에서 일련의 Grok 패턴을 사용하여 공통 필드를 추출하여 다양한 타임스탬프와 키-값 데이터 변형을 처리합니다. 그런 다음 추출된 이벤트 유형 (facility, mnemonics, message_type)에 따라 특정 로직을 적용하여 추가 필드로 데이터를 보강하고 UDM 모델에 매핑합니다.

시작하기 전에

  • Google SecOps 인스턴스가 있는지 확인합니다.
  • Windows 2016 이상 또는 systemd가 설치된 Linux 호스트를 사용하고 있는지 확인합니다.
  • 프록시 뒤에서 실행하는 경우 방화벽 포트가 열려 있는지 확인합니다.
  • Cisco 라우터에 대한 권한 액세스 권한이 있는지 확인합니다.

Google SecOps 수집 인증 파일 가져오기

  1. Google SecOps 콘솔에 로그인합니다.
  2. SIEM 설정 > 수집 에이전트로 이동합니다.
  3. 수집 인증 파일을 다운로드합니다. Bindplane이 설치될 시스템에 파일을 안전하게 저장합니다.

Google SecOps 고객 ID 가져오기

  1. Google SecOps 콘솔에 로그인합니다.
  2. SIEM 설정 > 프로필로 이동합니다.
  3. 조직 세부정보 섹션에서 고객 ID를 복사하여 저장합니다.

Bindplane 에이전트 설치

Windows 설치

  1. 명령 프롬프트 또는 PowerShell을 관리자로 엽니다.
  2. 다음 명령어를 실행합니다.

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux 설치

  1. 루트 또는 sudo 권한으로 터미널을 엽니다.
  2. 다음 명령어를 실행합니다.

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

추가 설치 리소스

Syslog를 수집하여 Google SecOps로 전송하도록 Bindplane 에이전트 구성

  1. 구성 파일에 액세스합니다.

    1. config.yaml 파일을 찾습니다. 일반적으로 Linux에서는 /etc/bindplane-agent/ 디렉터리에 있고 Windows에서는 설치 디렉터리에 있습니다.
    2. 텍스트 편집기 (예: nano, vi, 메모장)를 사용하여 파일을 엽니다.
  2. 다음과 같이 config.yaml 파일을 수정합니다.

    receivers:
        udplog:
            # Replace the port and IP address as required
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            # Adjust the path to the credentials file you downloaded in Step 1
            creds: '/path/to/ingestion-authentication-file.json'
            # Replace with your actual customer ID from Step 2
            customer_id: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # Add optional ingestion labels for better organization
            ingestion_labels:
                log_type: CISCO_ROUTER
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 인프라에 필요한 대로 포트와 IP 주소를 바꿉니다.

  4. <customer_id>를 실제 고객 ID로 바꿉니다.

  5. Google SecOps 수집 인증 파일 가져오기 섹션에서 인증 파일이 저장된 경로로 /path/to/ingestion-authentication-file.json를 업데이트합니다.

Bindplane 에이전트를 다시 시작하여 변경사항 적용

  • Linux에서 Bindplane 에이전트를 다시 시작하려면 다음 명령어를 실행합니다.

    sudo systemctl restart bindplane-agent
    
  • Windows에서 Bindplane 에이전트를 다시 시작하려면 서비스 콘솔을 사용하거나 다음 명령어를 입력하면 됩니다.

    net stop BindPlaneAgent && net start BindPlaneAgent
    

Cisco 라우터에서 Syslog 구성

  1. Cisco 라우터에 로그인합니다.
  2. enable 명령어를 입력하여 권한을 에스컬레이션합니다.

    Switch> enable
    Switch#
    
  3. conf t 명령어를 입력하여 구성 모드로 전환합니다.

    Switch# conf t
    Switch(config)#
    
  4. 다음 명령어를 입력합니다.

    logging host <bindplane-server-ip> transport <tcp/udp> port <port-number>
    logging source-interface <interface>
    
    • <bindplane-server-ip>를 Bindplane 에이전트 IP 주소로, <port-number>를 구성된 포트로 바꿉니다.
    • <tcp/udp>을 Bindplane 에이전트에서 구성된 리슨 프로토콜로 바꿉니다(예: udp).
    • <interface>를 Cisco 인터페이스 ID(예: Ethernet1/1)로 바꿉니다.
  5. 다음 명령어를 입력하여 우선순위 수준을 설정합니다.

    logging trap Informational 
    logging console Informational 
    logging severity Informational
    
  6. syslog 기능을 설정합니다.

    logging facility local6
    
  7. 다음 명령어를 입력하여 타임스탬프를 사용 설정합니다.

    service timestamps log datetime
    
  8. 저장 후 종료합니다.

  9. 다음 명령어를 입력하여 다시 시작 후에도 설정이 유지되도록 구성합니다.

    copy running-config startup-config
    

UDM 매핑 테이블

로그 필드 UDM 매핑 논리
client_ip target.ip, target.asset.ip 값은 grok 파서로 추출된 client_ip 필드에서 가져옵니다.
client_mac target.mac 값은 grok 파서로 추출된 client_mac 필드에서 가져옵니다.
dst_ip target.ip, target.asset.ip 값은 grok 파서로 추출된 dst_ip 필드에서 가져옵니다.
dst_port target.port 값은 grok 파서로 추출된 dst_port 필드에서 가져와 정수로 변환됩니다.
duration - 이 필드는 UDM에 매핑되지 않습니다.
host_ip target.ip, target.asset.ip 값은 grok 파서로 추출된 host_ip 필드에서 가져옵니다.
local_proxy intermediary.ip 값은 grok 파서로 추출된 local_proxy 필드에서 가져옵니다.
message_data metadata.description 값은 grok 파서로 추출된 message_data 필드에서 가져옵니다.
protocol network.ip_protocol 값은 grok 파서로 추출된 protocol 필드에서 가져와 대문자로 변환됩니다.
received_bytes network.received_bytes 값은 grok 파서에 의해 추출된 received_bytes 필드에서 가져와 부호 없는 정수로 변환됩니다.
referral_url network.http.referral_url 값은 grok 파서로 추출된 referral_url 필드에서 가져옵니다.
remote_proxy intermediary.ip 값은 grok 파서로 추출된 remote_proxy 필드에서 가져옵니다.
send_bytes network.sent_bytes 값은 grok 파서에 의해 추출된 send_bytes 필드에서 가져와 부호 없는 정수로 변환됩니다.
sent_bytes network.sent_bytes 값은 grok 파서에 의해 추출된 sent_bytes 필드에서 가져와 부호 없는 정수로 변환됩니다.
server_host target.hostname, target.asset.hostname 값은 grok 파서로 추출된 server_host 필드에서 가져옵니다.
server_ip target.ip, target.asset.ip 값은 grok 파서로 추출된 server_ip 필드에서 가져옵니다.
src_ip principal.ip, principal.asset.ip 값은 grok 파서로 추출된 src_ip 필드에서 가져옵니다.
src_port principal.port 값은 grok 파서로 추출된 src_port 필드에서 가져와 정수로 변환됩니다.
user_ip target.ip, target.asset.ip 값은 grok 파서로 추출된 user_ip 필드에서 가져옵니다.
user_mail principal.user.userid, principal.user.email_addresses 값은 grok 파서로 추출된 user_mail 필드에서 가져옵니다.
username target.user.userid 값은 grok 파서로 추출된 username 필드에서 가져옵니다.
- metadata.event_timestamp 값은 create_time 필드에서 가져옵니다.
- metadata.event_type 기본적으로 값은 GENERIC_EVENT로 설정되며, 파싱된 로그 메시지에 따라 특정 이벤트 유형으로 변경됩니다.
- metadata.log_type 값은 CISCO_ROUTER로 설정됩니다.
- metadata.product_event_type 이 값은 facility, priority, mnemonics 필드를 결합하여 생성된 message_type 필드에서 가져옵니다.
- metadata.product_name 값은 Router로 설정됩니다.
- metadata.vendor_name 값은 Cisco로 설정됩니다.
- network.application_protocol protocol 필드가 http 또는 https인 경우 값은 각각 HTTP 또는 HTTPS로 설정됩니다.
- extensions.auth.type 기본적으로 값은 AUTHTYPE_UNSPECIFIED로 설정되며, 파싱된 로그 메시지에 따라 특정 인증 유형으로 변경됩니다.
- security_result.action 로그인에 성공하면 값이 ALLOW로 설정되고 로그인에 실패하면 BLOCK로 설정됩니다.
- security_result.category IP 옵션이 있는 이벤트의 경우 값은 NETWORK_SUSPICIOUS로 설정되고 로그인 실패의 경우 AUTH_VIOLATION로 설정됩니다.
- security_result.description 값은 다양한 이벤트에 대한 특정 메시지로 설정됩니다.
- security_result.severity 성공한 로그인에는 LOW, 실패한 로그인에는 MEDIUM, 기타 이벤트에는 INFORMATIONAL 값이 설정됩니다.
- security_result.severity_details 이 값은 로그인 실패의 경우 fail_reason 필드에서 가져오고 IP 옵션이 있는 이벤트의 경우 Informational message로 설정됩니다.
- security_result.summary 값은 다양한 이벤트에 대한 특정 메시지로 설정됩니다.

도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가로부터 답변을 받으세요.