Sophos Central 로그 수집

다음에서 지원:

이 문서에서는 Bindplane을 사용하여 Sophos Central 로그를 수집하는 방법을 설명합니다. 파서는 JSON 로그를 통합 데이터 모델(UDM)로 변환합니다. 중첩된 JSON 구조에서 필드를 추출하고, UDM 필드에 매핑하고, 유형 필드를 기반으로 이벤트 분류를 수행하여 다양한 Sophos Central 이벤트 유형에 대한 특정 세부정보와 작업으로 데이터를 보강합니다.

시작하기 전에

다음 기본 요건이 충족되었는지 확인합니다.

  • Google SecOps 인스턴스
  • Windows 2016 이상 또는 systemd가 있는 Linux 호스트를 사용 중입니다.
  • Python을 지속적으로 실행할 수 있는 추가 Windows 또는 Linux 머신이 있습니다.
  • 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
  • Sophos Central Admin 콘솔에 대한 액세스 권한

Bindplane 에이전트의 Google SecOps 사용자 인증 정보 가져오기

Google SecOps에 Bindplane 에이전트를 인증하려면 다음 방법 중 하나를 선택합니다.

  • 새 배포: Chronicle API를 사용합니다(옵션 1).
  • 기존 배포: 2027년 7월 20일에 Ingestion API가 중단될 때까지 데이터 수집 인증 파일(옵션 2)을 계속 사용합니다.
  1. Google Cloud 콘솔에 로그인하고 Google SecOps 인스턴스에 연결된 Google Cloud 프로젝트를 선택합니다.
  2. IAM 및 관리자 > 서비스 계정으로 이동합니다.
  3. 서비스 계정 만들기를 클릭합니다.
  4. 다음 구성 세부정보를 제공합니다.
    • 서비스 계정 이름: 계정 이름을 입력합니다(예: bindplane-ingest).
    • 서비스 계정 설명: 설명을 입력합니다(예: Bindplane agent log ingestion).
  5. 만들고 계속하기를 클릭합니다.
  6. 이 서비스 계정에 프로젝트에 대한 액세스 권한 부여 섹션에서 역할 선택을 클릭하고 Chronicle 편집자를 선택합니다.
  7. 계속을 클릭한 다음 완료를 클릭합니다.
  8. 만든 서비스 계정을 클릭한 다음 키 탭으로 이동합니다.
  9. 키 추가 > 새 키 만들기를 클릭합니다.
  10. JSON을 선택하고 만들기를 클릭합니다. 키 파일이 컴퓨터에 다운로드됩니다.
  11. 키 파일을 Bindplane 수집기 디렉터리(Linux의 경우 /opt/observiq-otel-collector/ingestion-auth.json, Windows의 경우 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)에 ingestion-auth.json로 저장하거나 config.yaml의 creds_file_path를 업데이트하여 저장한 경로와 일치시킵니다.
  12. IAM 및 관리자 > 설정으로 이동하여 프로젝트 번호를 복사합니다. 내보내기 도구 구성에 필요합니다.

옵션 2: 데이터 수집 인증 파일 다운로드(기존)

  1. Google SecOps 콘솔에 로그인합니다.
  2. 설정 > 데이터 관리 > 수집 에이전트로 이동합니다. SIEM 전용 플랫폼을 사용하는 경우 설정 > 수집 에이전트로 이동합니다.
  3. 데이터 수집 인증 파일을 다운로드합니다.
  4. Bindplane 에이전트가 설치될 시스템에 파일을 안전하게 저장합니다.

Google SecOps 고객 ID 가져오기

  1. Google SecOps 콘솔에 로그인합니다.
  2. 설정 > 관리 > 프로필로 이동합니다. SIEM 전용 플랫폼을 사용하는 경우 설정 > 프로필로 이동합니다.
  3. 조직 세부정보 섹션에서 고객 ID를 복사하여 저장합니다.

Bindplane 에이전트 설치

다음 안내에 따라 Windows 또는 Linux 운영체제에 Bindplane 에이전트를 설치합니다.

Windows 설치

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

    msiexec /i "[https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi](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](https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh))" install_unix.sh
    

추가 설치 리소스

추가 설치 옵션은 이 설치 가이드를 참고하세요.

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

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

    • config.yaml 파일을 찾습니다. 일반적으로 Linux의 /opt/observiq-otel-collector/ 디렉터리 또는 Windows의 설치 디렉터리에 있습니다.
    • 텍스트 편집기(예: 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:
        protocol: https
        # Region of your instance, for example us, europe, asia-southeast1
        location: <LOCATION>
        # Project number of the Google Cloud project linked to the instance
        project: '<PROJECT_NUMBER>'
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: '<customer_id>'
        endpoint: chronicle.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'SOPHOS_CENTRAL'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    
  3. 인프라에서 필요한 대로 포트와 IP 주소를 바꿉니다.

  4. <LOCATION>을 Google SecOps 인스턴스의 리전(예: us, europe 또는 asia-southeast1)으로 바꿉니다. 내보내기 도구는 이 값으로 chronicle.googleapis.com에 프리픽스를 추가합니다.

  5. <PROJECT_NUMBER>를 IAM 및 관리자 > 설정의 프로젝트 번호로 바꿉니다.

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

  7. /path/to/ingestion-authentication-file.json을 1단계에서 서비스 계정 키 파일(옵션 1)이 저장된 파일 경로로 업데이트합니다.

기존 수집 API 내보내기 도구

  • 옵션 2의 데이터 수집 인증 파일을 사용하는 경우 exporters 블록을 다음으로 바꿉니다. creds_file_path를 데이터 수집 인증 파일의 경로로 설정하고 인스턴스가 미국 외부에 있는 경우 malachiteingestion-pa.googleapis.com를 리전 엔드포인트(예: europe-malachiteingestion-pa.googleapis.com)로 바꿉니다.

    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/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
        log_type: 'SOPHOS_CENTRAL'
        raw_log_field: body
        ingestion_labels:
    

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

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

    /opt/observiq-otel-collector/config.yaml
    
  2. Windows에서 Bindplane 에이전트를 다시 시작하려면 서비스 콘솔을 사용하거나 다음 명령어를 입력합니다.

    net stop BindPlaneAgent && net start BindPlaneAgent
    

Sophos Central API 액세스 구성

  1. Sophos Central Admin에 로그인하세요.
  2. 전체 설정 > API 토큰 관리를 선택합니다.
  3. 토큰 추가를 클릭하여 새 토큰을 만듭니다.
  4. 토큰 이름을 입력하고 저장을 클릭합니다. 제공된 토큰의 API 토큰 요약이 표시됩니다.
  5. API 토큰 요약 섹션에서 복사를 클릭하여 API 액세스 URL과 헤더를 복사합니다.

추가 머신에 Python 설치

  1. 웹브라우저를 열고 Python 웹사이트로 이동합니다.
  2. 운영체제(Windows 또는 Mac)에 맞는 Python 다운로드를 클릭합니다.
  3. Python을 설치합니다.

    • Windows:
      1. 설치 프로그램을 실행합니다.
      2. Add Python to PATH(PATH에 Python 추가) 체크박스를 선택합니다.
      3. I can help you with that. Let's get started.
    • Mac:
      1. Python이 이미 설치되어 있을 수 있습니다. 설치되어 있지 않다면 터미널을 사용하여 최신 버전을 설치할 수 있습니다.
      2. 터미널을 열고 다음 명령어를 입력하여 확인합니다.
    python --version
    

Sophos 통합 스크립트 다운로드

  1. Sophos Central SIEM 통합 저장소의 GitHub 페이지로 이동합니다.
  2. 녹색 Code 버튼 > Download ZIP을 클릭합니다.
  3. ZIP 파일의 압축을 풉니다.

스크립트 구성 설정

  1. 텍스트 편집기로 config.ini 파일을 찾아 엽니다.
  2. 구성 파일을 수정합니다.
    • API 토큰: 이전에 Sophos Central에서 복사한 API 키를 입력합니다.
    • Syslog 서버 세부정보: syslog 서버의 세부정보를 입력합니다.
    • 호스트: Bindplane IP 주소를 입력합니다.
    • 포트: Bindplane 포트 번호를 입력합니다.
    • 프로토콜: UDP를 입력합니다(설정에 따라 TCP 또는 TLS를 사용할 수도 있음).
  3. 파일을 저장합니다.

스크립트 실행

  1. 스크립트 폴더로 이동합니다.
    • Windows:
      1. Windows 키를 누르고 cmd를 입력합니다.
      2. 명령 프롬프트를 클릭합니다.
      3. 폴더로 이동합니다. cmd cd C:\Users\YourName\Downloads\Sophos-Central-SIEM-Integration
    • macOS의 경우:
      1. Applications(애플리케이션) > Utilities(유틸리티)로 이동합니다.
      2. Terminal(터미널)을 엽니다.
      3. 폴더로 이동합니다. bash cd /Users/YourName/Downloads/Sophos-Central-SIEM-Integration
  2. 스크립트를 실행합니다.

    • 다음 명령어를 입력하여 스크립트를 시작합니다.
    python siem.py
    

스크립트가 지속적으로 실행되도록 자동화

Windows(작업 스케줄러 사용)

  1. 시작 메뉴에 '작업 스케줄러'를 입력하여 작업 스케줄러를 엽니다.
  2. 태스크 만들기를 클릭합니다.
  3. 일반 탭에서 다음을 수행합니다.
    • 작업 이름을 지정합니다(예: Sophos Central Log Export).
  4. 트리거 탭에서 다음을 수행합니다.
    • New(새로 만들기)를 클릭하고 작업을 Daily(매일) 또는 At startup(시작 시)으로 설정합니다.
  5. 작업 탭에서 다음을 수행합니다.
    • 새로 만들기를 클릭하고 프로그램 시작을 선택합니다.
    • python.exe 실행 파일(일반적으로 C:\PythonXX\python.exe에 있음)을 찾습니다.
    • 인수 추가 필드에 스크립트 경로를 입력합니다(예: C:\Users\YourName\Downloads\Sophos-Central-SIEM-Integration\siem.py).
  6. 확인을 클릭하여 작업을 저장합니다.

Mac(크론 작업 사용)

  1. 터미널을 엽니다.
  2. crontab -e를 입력하고 Enter 키를 누릅니다.
  3. 파일 끝에 새 줄을 추가합니다.

    * * * * * /usr/bin/python /Users/YourName/Downloads/Sophos-Central-SIEM-Integration/siem.py
    
  4. 저장하고 편집기를 종료합니다.

UDM 매핑 테이블

로그 필드 UDM 매핑 로직
created_at_label additional.fields 병합됨
datastream_label additional.fields 병합됨
security_result.description metadata.description 이름 변경/매핑됨
end metadata.event_timestamp RFC 3339(으)로 파싱됨
when metadata.event_timestamp RFC 3339(으)로 파싱됨
has_principal metadata.event_type 매핑됨: true → FILE_OPEN, true → NETWORK_CONNECTION, true → SCAN_UNCATEGORIZED
type metadata.event_type 매핑된 값(총 14개, 예: Event::Endpoint::DataLossPreventionAutomaticallyAllowed → `F…
type metadata.product_event_type 직접 매핑됨
type network.direction 매핑됨: Event::Endpoint::WebControlViolation → OUTBOUND, `Event::Endpoint::WindowsFirewa…
type network.ip_protocol 매핑됨: Event::Endpoint::WebControlViolation → TCP
dhost principal.asset.hostname 직접 매핑됨
location principal.asset.hostname 직접 매핑됨
data.source_info.ip principal.asset.ip 병합됨
source_info.ip principal.asset.ip 병합됨
dhost principal.hostname 직접 매핑됨
location principal.hostname 직접 매핑됨
data.source_info.ip principal.ip 병합됨
source_info.ip principal.ip 병합됨
type principal.user.attribute.labels 매핑됨: Event::Endpoint::DataLossPreventionAutomaticallyAllowed → username_label
username_label principal.user.attribute.labels 병합됨
Username principal.user.user_display_name 직접 매핑됨
source principal.user.user_display_name 직접 매핑됨
source principal.user.userid 직접 매핑됨
suser principal.user.userid 직접 매핑됨
user_id principal.user.userid 직접 매핑됨
endpoint_type_label security_result.about.labels 병합됨
sec_action security_result.action 병합됨
type security_result.action 매핑됨: Event::Endpoint::DataLossPreventionAutomaticallyAllowed → sec_action, `Event::En…
group security_result.category_details 병합됨
name security_result.description 직접 매핑됨
type security_result.description 매핑됨: Event::Endpoint::(UpdateRebootRequired/ServiceNotRunning/NonCompliant/OutOfDate) →…
duid_label security_result.detection_fields 병합됨
id_label security_result.detection_fields 병합됨
rule security_result.rule_name 직접 매핑됨
rules security_result.rule_name 직접 매핑됨
severity security_result.severity 매핑됨: low → LOW, medium → MEDIUM, high → HIGH
security_result.description security_result.summary 이름 변경/매핑됨
app target.application 직접 매핑됨
application target.application 직접 매핑됨
dhost target.asset.hostname 직접 매핑됨
endpoint_id target.asset_id 직접 매핑됨
f_path target.file.full_path 직접 매핑됨
f_size target.file.size 이름 변경/매핑됨
dhost target.hostname 직접 매핑됨
application target.process.file.full_path 직접 매핑됨
core_remedy_items.items.0.descriptor target.process.file.full_path 직접 매핑됨
data.core_remedy_items.items.0.descriptor target.process.file.full_path 직접 매핑됨
file_path_1 target.process.file.full_path 직접 매핑됨
customer_id target.resource.id 직접 매핑됨
p_device target.resource.name 직접 매핑됨
scan_name target.resource.name 직접 매핑됨
type target.resource.name 매핑됨: Event::Endpoint::SavDisabled → Real time protection, `Event::Endpoint::Registere…
type target.resource.type 매핑된 값(총 5개, 예: Event::Endpoint::SavDisabled → SETTING, `Event::Endpoint::R…
url target.url 직접 매핑됨
principal.user.userid target.user.userid 직접 매핑됨
suser target.user.userid 직접 매핑됨
해당 사항 없음 metadata.event_type 상수: GENERIC_EVENT
해당 사항 없음 metadata.product_name 상수: Sophos Central
해당 사항 없음 metadata.vendor_name 상수: Sophos
해당 사항 없음 network.direction 상수: OUTBOUND
해당 사항 없음 network.ip_protocol 상수: TCP
해당 사항 없음 security_result.description 상수: security_result.summary
해당 사항 없음 security_result.severity 상수: LOW
해당 사항 없음 target.resource.name 상수: Real time protection
해당 사항 없음 target.resource.type 상수: SETTING

변경 로그

이 파서의 변경 로그 보기

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