Sophos Endpoint 로그 수집

다음에서 지원:

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

시작하기 전에

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

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

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

  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" /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. 구성 파일에 액세스합니다.
    • config.yaml 파일을 찾습니다. 일반적으로 Linux에서는 /etc/bindplane-agent/ 디렉터리에 있고 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:
        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_AV'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    
  3. 인프라에 필요한 대로 포트와 IP 주소를 바꿉니다.

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

  5. 1단계에서 인증 파일을 저장한 파일 경로로 /path/to/ingestion-authentication-file.json를 업데이트합니다.

변경사항을 적용하려면 Bindplane 에이전트를 다시 시작하세요.

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

    sudo systemctl restart bindplane-agent
    
  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(Python을 PATH에 추가) 체크박스를 선택합니다.
      3. 지금 설치를 클릭합니다.
    • Mac의 경우:

      1. Python이 이미 설치되어 있을 수 있습니다. 설치되어 있지 않다면 터미널을 사용하여 최신 버전을 설치할 수 있습니다.
      2. 터미널을 열고 다음 명령어를 입력합니다.
      python --version
      

Sophos 통합 스크립트 다운로드

  1. Sophos Central SIEM Integration GitHub Repository의 GitHub 페이지로 이동합니다.
  2. 녹색 코드 버튼 > ZIP 다운로드를 클릭합니다.
  3. ZIP 파일의 압축을 풉니다.

스크립트 구성 설정

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

스크립트 실행

  1. 스크립트 폴더로 이동합니다.

    • Windows의 경우:

      1. Windows 키를 누르고 cmd를 입력합니다.
      2. 명령 프롬프트를 클릭합니다.
      3. 스크립트 폴더로 이동합니다.
      cd C:UsersYourNameDownloadsSophos-Central-SIEM-Integration
      
    • macOS의 경우:

      1. 애플리케이션 > 유틸리티로 이동합니다.
      2. Terminal(터미널)을 엽니다.
      3. 스크립트 폴더로 이동합니다.
      cd /Users/YourName/Downloads/Sophos-Central-SIEM-Integration
      
  2. 스크립트를 실행합니다.

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

      python siem.py
      

Windows에서 스크립트가 지속적으로 실행되도록 자동화합니다 (작업 스케줄러 사용).

  1. 시작 메뉴에 작업 스케줄러를 입력하여 작업 스케줄러를 엽니다.
  2. 태스크 만들기를 클릭합니다.
  3. 일반 탭에서 다음을 수행합니다.
    • 작업 이름을 지정합니다(예: Sophos AV Log Export).
  4. 트리거 탭에서 다음을 수행합니다.
    • 새로 만들기를 클릭하고 필요에 따라 태스크를 매일 또는 시작 시에 실행되도록 설정합니다.
  5. 작업 탭에서 다음을 수행합니다.
    • 새로 만들기를 클릭하고 프로그램 시작을 선택합니다.
    • python.exe 실행 파일 (일반적으로 C:PythonXXpython.exe에 있음)을 찾아봅니다.
    • 인수 추가 필드에 스크립트 경로를 입력합니다(예: C:UsersYourNameDownloadsSophos-Central-SIEM-Integrationsiem.py).
  6. 확인을 클릭하여 작업을 저장합니다.

Mac에서 스크립트가 지속적으로 실행되도록 자동화합니다 (Cron 작업 사용).

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

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

UDM 매핑 표

로그 필드 UDM 매핑 논리
s_ip intermediary.ip 병합됨
description metadata.description 직접 매핑됨
name metadata.description 직접 매핑됨
security_result.description metadata.description 이름이 변경됨/매핑됨
end metadata.event_timestamp RFC 3339로 파싱됨
ts metadata.event_timestamp RFC 3339로 파싱됨
action metadata.event_type 매핑됨: unknownNETWORK_CONNECTION, allowedSCAN_PROCESS, blocked → `SCAN_PROC...
e_type metadata.event_type 매핑된 값 (총 11개, 예: NonCompliantSCAN_HOST, SavDisabled → `SETTING_MODIFIC...
type metadata.event_type 매핑된 값 (총 13개, 예: Event::Endpoint::NonCompliantSCAN_HOST, `Event::Endpoin...
e_type metadata.product_event_type 직접 매핑됨
type metadata.product_event_type 직접 매핑됨
action network.direction 매핑됨: warnedOUTBOUND, unknownOUTBOUND
e_type network.direction 매핑됨: WindowsFirewall::BlockedOUTBOUND
type network.direction 매핑됨: Event::Endpoint::WindowsFirewall::BlockedOUTBOUND
action network.ip_protocol 매핑됨: warnedTCP, unknownTCP
appSha256 principal.file.sha256 직접 매핑됨
dhost principal.hostname 직접 매핑됨
host principal.hostname 직접 매핑됨
source_info.ip principal.ip 병합됨
src_ip principal.ip 병합됨
id principal.resource.id 직접 매핑됨
suser principal.user.user_display_name 직접 매핑됨
suser principal.user.userid 직접 매핑됨
user principal.user.userid 직접 매핑됨
user_id principal.user.userid 직접 매핑됨
endpoint_id_label security_result.about.labels 병합됨
endpoint_type_label security_result.about.labels 병합됨
action security_result.action 매핑된 값 (총 5개, 예: allowsec_action, unknownsec_action, allowed → `...
sec_action security_result.action 병합됨
group security_result.category_details 병합됨
sub_cat security_result.category_details 병합됨
desc security_result.description 직접 매핑됨
e_type security_result.description 매핑됨: (UpdateRebootRequired/ServiceNotRunning/NonCompliant/OutOfDate) → `security_result...
type security_result.description 매핑됨: Event::Endpoint::(UpdateRebootRequired/ServiceNotRunning/NonCompliant/OutOfDate) →...
rule security_result.rule_name 직접 매핑됨
rules security_result.rule_name 직접 매핑됨
severity security_result.severity 매핑된 값 (총 6개, 예: lowLOW, lowMEDIUM, lowHIGH)
security_result.description security_result.summary 이름이 변경됨/매핑됨
application target.application 직접 매핑됨
endpoint_id target.asset_id 직접 매핑됨
f_path target.file.full_path 직접 매핑됨
f_size target.file.size 이름이 변경됨/매핑됨
dhost target.hostname 직접 매핑됨
host target.hostname 직접 매핑됨
application target.process.file.full_path 직접 매핑됨
customer_id target.resource.id 직접 매핑됨
e_type target.resource.name 매핑됨: SavDisabledReal time protection, OutOfDateDevice Registration, `Regist...
p_device target.resource.name 직접 매핑됨
scan_name target.resource.name 직접 매핑됨
type target.resource.name 매핑됨: Event::Endpoint::SavDisabledReal time protection, `Event::Endpoint::OutOfDate...
action target.resource.type 매핑됨: blockedDevice, restricted to read-onlyDevice
e_type target.resource.type 매핑된 값 (총 5개, 예: SavDisabledSETTING, OutOfDateSETTING, `Registered...
type target.resource.type 매핑된 값 (총 5개, 예: Event::Endpoint::SavDisabledSETTING, `Event::Endpoint::O...
url target.url 직접 매핑됨
duid target.user.userid 직접 매핑됨
suser target.user.userid 직접 매핑됨
user target.user.userid 직접 매핑됨
해당 사항 없음 metadata.event_type 상수: GENERIC_EVENT
해당 사항 없음 metadata.product_name 상수: Sophos Anti-Virus
해당 사항 없음 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 전문가에게 문의하여 답변을 받으세요.