macOS 시스템 로그 수집
이 문서에서는 Bindplane을 사용하여 macOS 시스템 로그를 Google Security Operations에 수집하는 방법을 설명합니다. macOS는 Apple 통합 로깅 시스템을 사용하여 인증, 프로세스 실행, 커널 활동, 애플리케이션 동작 등 시스템 수준 이벤트를 캡처합니다. 이러한 로그는 syslog를 통해 원격 수집기로 전달되어 중앙 집중식 보안 모니터링 및 분석을 수행할 수 있습니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google SecOps 인스턴스
- systemd가 있는 Windows 2016 이상 또는 Linux 호스트
- 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
- 로그를 전달할 macOS 엔드포인트에 대한 관리 액세스 권한
- 통합 로깅을 지원하는 macOS 10.12 (Sierra) 이상
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
Linux 설치
- 루트 또는 sudo 권한으로 터미널을 엽니다.
다음 명령어를 실행합니다.
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
추가 설치 리소스
추가 설치 옵션은 이 설치 가이드를 참고하세요.
Syslog를 수집하여 Google SecOps로 전송하도록 Bindplane 에이전트 구성
구성 파일에 액세스합니다.
config.yaml파일을 찾습니다. 일반적으로 Linux에서는/observiq-otel-collector/디렉터리에 있고 Windows에서는 설치 디렉터리에 있습니다.- 텍스트 편집기 (예:
nano,vi또는 메모장)를 사용하여 파일을 엽니다.
다음과 같이
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: <PLACEHOLDER_CUSTOMER_ID> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization log_type: 'MACOS' raw_log_field: body ingestion_labels: service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
- 인프라에 필요한 대로 포트와 IP 주소를 바꿉니다.
<PLACEHOLDER_CUSTOMER_ID>를 실제 고객 ID로 바꿉니다.- Google SecOps 수집 인증 파일 가져오기 섹션에서 인증 파일이 저장된 파일 경로로
/path/to/ingestion-authentication-file.json를 업데이트합니다.
변경사항을 적용하려면 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"
macOS syslog 전달 구성
macOS는 통합 로깅 시스템을 사용합니다. syslog를 통해 로그를 Bindplane 에이전트로 전달하려면 각 macOS 엔드포인트에서 기본 제공 syslogd 서비스를 구성하세요.
옵션 1: syslog.conf를 사용하여 syslog 전달 구성
- macOS 엔드포인트에서 터미널을 엽니다.
syslog 구성 파일을 수정합니다.
sudo nano /etc/syslog.conf파일 끝에 다음 줄을 추가하여 UDP를 통해 모든 로그를 Bindplane 에이전트로 전달합니다.
*.* @<BINDPLANE_IP_ADDRESS>:514<BINDPLANE_IP_ADDRESS>를 Bindplane 에이전트 호스트의 IP 주소로 바꿉니다 (예:192.168.1.100).
파일을 저장하고 종료합니다.
syslog 데몬을 다시 시작합니다.
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
옵션 2: asl.conf를 사용하여 syslog 전달 구성
- macOS 엔드포인트에서 터미널을 엽니다.
ASL 구성 파일을 수정합니다.
sudo nano /etc/asl.conf다음 줄을 추가하여 로그를 원격 syslog 서버로 전달합니다.
? [= Sender kernel] forward <BINDPLANE_IP_ADDRESS>:514 ? [<= Level notice] forward <BINDPLANE_IP_ADDRESS>:514<BINDPLANE_IP_ADDRESS>를 Bindplane 에이전트 호스트의 IP 주소로 바꿉니다.
파일을 저장하고 종료합니다.
syslog 데몬을 다시 시작합니다.
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
로그 전달 확인
macOS 엔드포인트에서 테스트 로그 메시지를 생성합니다.
logger -p user.notice "Test syslog message for Bindplane"Bindplane 에이전트 호스트에서 에이전트 로그에 수신 메시지가 있는지 확인합니다.
sudo journalctl -u observiq-otel-collector -f
UDM 매핑 테이블
| 로그 필드 | UDM 매핑 | 논리 |
|---|---|---|
activityIdentifier_label |
additional.fields |
병합됨 |
backtrace_label |
additional.fields |
병합됨 |
bootUUID_label |
additional.fields |
병합됨 |
category_label |
additional.fields |
병합됨 |
chronicle_log_type_label |
additional.fields |
병합됨 |
formatString_label |
additional.fields |
병합됨 |
log_type_label |
additional.fields |
병합됨 |
machTimestamp_label |
additional.fields |
병합됨 |
messageType_label |
additional.fields |
병합됨 |
parentActivityIdentifier_label |
additional.fields |
병합됨 |
processImageUUID_label |
additional.fields |
병합됨 |
senderImageUUID_label |
additional.fields |
병합됨 |
senderProgramCounter_label |
additional.fields |
병합됨 |
subprocess_label |
additional.fields |
병합됨 |
subsystem_label |
additional.fields |
병합됨 |
threadID_label |
additional.fields |
병합됨 |
traceID_label |
additional.fields |
병합됨 |
intermediary_host |
intermediary.hostname |
직접 매핑됨 |
attributes.message |
metadata.description |
직접 매핑됨 |
description |
metadata.description |
직접 매핑됨 |
eventMessage |
metadata.description |
직접 매핑됨 |
timestamp |
metadata.event_timestamp |
ISO8601로 파싱됨 |
has_principal |
metadata.event_type |
매핑됨: true → STATUS_UPDATE |
has_user |
metadata.event_type |
매핑됨: true → USER_UNCATEGORIZED |
attributes.process |
metadata.product_event_type |
직접 매핑됨 |
eventType |
metadata.product_event_type |
직접 매핑됨 |
attributes.host |
principal.asset.hostname |
직접 매핑됨 |
hostname |
principal.asset.hostname |
직접 매핑됨 |
source |
principal.asset.hostname |
직접 매핑됨 |
senderImagePath |
principal.file.full_path |
직접 매핑됨 |
attributes.host |
principal.hostname |
직접 매핑됨 |
hostname |
principal.hostname |
직접 매핑됨 |
source |
principal.hostname |
직접 매핑됨 |
command_line |
principal.process.command_line |
직접 매핑됨 |
processImagePath |
principal.process.file.full_path |
직접 매핑됨 |
attributes.pid |
principal.process.pid |
직접 매핑됨 |
processID |
principal.process.pid |
직접 매핑됨 |
process_id |
principal.process.pid |
직접 매핑됨 |
userID |
principal.user.userid |
직접 매핑됨 |
| 해당 사항 없음 | metadata.event_type |
상수: USER_UNCATEGORIZED |
| 해당 사항 없음 | metadata.product_name |
상수: MacOS |
| 해당 사항 없음 | metadata.vendor_name |
상수: Apple |
| 해당 사항 없음 | principal.platform |
상수: MAC |
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가에게 문의하여 답변을 받으세요.