Imperva CEF 로그 수집
이 문서에서는 Bindplane 에이전트를 사용하여 Imperva CEF 로그를 Google Security Operations로 수집하는 방법을 설명합니다.
파서는 CEF (Common Event Format)의 Imperva syslog 형식 로그에서 필드를 추출합니다. grok 또는 kv를 사용하여 CEF 메시지를 파싱한 다음 이러한 값을 통합 데이터 모델 (UDM)에 매핑합니다. 또한 이벤트 소스 및 유형의 기본 메타데이터 값을 설정합니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google SecOps 인스턴스
systemd가 설치된 Windows 2016 이상 또는 Linux 호스트- 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
- Imperva 관리 콘솔 또는 어플라이언스에 대한 권한 액세스
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
추가 설치 리소스
추가 설치 옵션은 Bindplane 에이전트 설치 가이드를 참고하세요.
Syslog를 수집하여 Google SecOps로 전송하도록 Bindplane 에이전트 구성
구성 파일에 액세스합니다.
config.yaml파일을 찾습니다. 일반적으로 Linux에서는/opt/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: <CUSTOMER_ID> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization log_type: 'IMPERVA_CEF' raw_log_field: body ingestion_labels: service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels- 인프라에 필요한 대로 포트와 IP 주소를 바꿉니다.
<CUSTOMER_ID>를 실제 고객 ID로 바꿉니다.- 1단계에서 인증 파일을 저장한 파일 경로로
/path/to/ingestion-authentication-file.json를 업데이트합니다.
변경사항을 적용하려면 Bindplane 에이전트를 다시 시작하세요.
Linux에서 Bindplane 에이전트를 다시 시작하려면 다음 명령어를 실행합니다.
sudo systemctl restart observiq-otel-collectorWindows에서 Bindplane 에이전트를 다시 시작하려면 서비스 콘솔을 사용하거나 다음 명령어를 입력하면 됩니다.
net stop observiq-otel-collector && net start observiq-otel-collector
syslog를 통해 CEF를 전송하도록 Imperva WAF Gateway (SecureSphere) 구성
MX 콘솔에서 액션 세트를 만듭니다.
- 정책 > 작업 세트로 이동합니다.
- 새로 만들기를 클릭하고 이름을 지정합니다 (예:
Google SecOps CEF).
CEF syslog 작업 인터페이스를 추가합니다.
- 사용 가능한 작업 인터페이스에서 시스템 로그를 열고 필요에 따라 다음 중 하나 이상을 추가합니다.
- CEF 표준을 사용하여 시스템 로그 (syslog)에 보안 이벤트 로깅
- CEF 표준을 사용하여 시스템 로그 (syslog)에 네트워크 보안 이벤트 로깅
- CEF 표준을 사용하여 시스템 로그 (syslog)에 시스템 이벤트 로깅
- CEF 표준을 사용하여 시스템 로그 (syslog)에 맞춤 보안 이벤트 로깅
- 사용 가능한 작업 인터페이스에서 시스템 로그를 열고 필요에 따라 다음 중 하나 이상을 추가합니다.
작업 인터페이스 매개변수를 구성합니다.
- Syslog 호스트: Bindplane 에이전트 IP 주소를 입력합니다. 기본이 아닌 포트를 사용하려면
:PORT를 추가하세요 (지정하지 않으면 기본값은 514임). 예를 들면10.0.0.10:514입니다. - 기능 / 로그 수준: 정책 요구사항에 따라 설정합니다.
- 메시지: 맞춤 매핑이 없는 경우 CEF의 공급업체 기본값을 그대로 둡니다.
- Syslog 호스트: Bindplane 에이전트 IP 주소를 입력합니다. 기본이 아닌 포트를 사용하려면
정책에 작업 세트를 연결합니다.
- 보안 / 네트워크 보안 이벤트: 관련 정책을 열고 후속 조치를 작업 세트로 설정합니다.
- 시스템 이벤트: 시스템 이벤트 정책을 만들거나 확인하고 후속 조치를 작업 세트로 설정하여 해당 이벤트도 CEF를 통해 전송되도록 합니다.
(선택사항) 게이트웨이별 타겟을 구성합니다.
- 서로 다른 게이트웨이 그룹이 서로 다른 syslog 서버로 전송해야 하는 경우 각 게이트웨이 그룹> 외부 로거를 구성하고 정책에서 '게이트웨이 구성이 있는 경우 사용'을 사용 설정합니다.
UDM 매핑 테이블
| 로그 필드 | UDM 매핑 | 로직 |
|---|---|---|
act |
security_result.action |
파생됨 act이 '허용됨'이거나 '알림'이거나 'REQ_PASSED'로 시작하거나 'REQ_CACHED'로 시작하면 action은 '허용'입니다. act이 'deny', 'blocked'이거나 'REQ_BLOCKED'로 시작하거나 'REQ_CHALLENGE'로 시작하는 경우 action은 'BLOCK'입니다. act이 정규식 (?i)REQ_BAD와 일치하면 action은 'FAIL'입니다. 그렇지 않으면 action은 'UNKNOWN_ACTION'입니다. 그런 다음 security_result.action이 action 값으로 설정됩니다. |
act |
security_result.action_details |
파생됨 act 값에 따라 자세한 설명이 생성됩니다. 예: 'REQ_CACHED_FRESH: 응답이 데이터 센터의 캐시에서 반환됨', 'REQ_BLOCKED: 요청이 차단됨' |
app |
network.application_protocol |
대문자로 변환된 후 직접 매핑됩니다. |
cs1 |
security_result.detection_fields.value |
cs1이 비어 있지 않거나 'NA'인 경우 조건부로 매핑됩니다. security_result.detection_fields.key는 cs1Label 값으로 설정됩니다. |
cs1Label |
security_result.detection_fields.key |
cs1이 비어 있지 않거나 'NA'인 경우 조건부로 매핑됩니다. security_result.detection_fields.value는 cs1 값으로 설정됩니다. |
cs2 |
security_result.detection_fields.value |
비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key는 cs2Label 값으로 설정됩니다. |
cs2Label |
security_result.detection_fields.key |
cs2이 비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.value는 cs2 값으로 설정됩니다. |
cs3 |
security_result.detection_fields.value |
비어 있지 않거나 '-'인 경우 조건부로 매핑됩니다. security_result.detection_fields.key이 cs3Label 값으로 설정됩니다. |
cs3Label |
security_result.detection_fields.key |
cs3이 비어 있지 않거나 '-'인 경우 조건부로 매핑됩니다. security_result.detection_fields.value은 cs3의 값으로 설정됩니다. |
cs4 |
security_result.detection_fields.value |
비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key는 cs4Label 값으로 설정됩니다. |
cs4Label |
security_result.detection_fields.key |
cs4이 비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.value는 cs4 값으로 설정됩니다. |
cs5 |
security_result.detection_fields.value |
비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key는 cs5Label 값으로 설정됩니다. |
cs5Label |
security_result.detection_fields.key |
cs5이 비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.value는 cs5 값으로 설정됩니다. |
cs6 |
security_result.detection_fields.value |
비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key는 cs6Label 값으로 설정됩니다. |
cs6Label |
security_result.detection_fields.key |
cs6이 비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.value는 cs6 값으로 설정됩니다. |
cs7 |
principal.location.region_latitude |
cs7Label이 '위도'인 경우 조건부로 매핑됩니다. |
cs8 |
principal.location.region_longitude |
cs8Label이 'longitude'인 경우 조건부로 매핑됩니다. |
cn1 |
security_result.detection_fields.value |
비어 있지 않고 cn1Label이 비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key는 cn1Label 값으로 설정됩니다. |
cn1Label |
security_result.detection_fields.key |
cn1 및 cn1Label이 비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.value는 cn1 값으로 설정됩니다. |
fileType |
security_result.detection_fields.value |
비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key이(가) 'fileType'으로 설정됩니다. |
filePermission |
security_result.detection_fields.value |
비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key이(가) 'filePermission'으로 설정됩니다. |
request |
target.url |
직접 매핑됩니다. |
requestClientApplication |
network.http.user_agent |
비어 있지 않은 경우 조건부로 매핑됩니다. CEF 페이로드의 requestContext 또는 requestClientApplication 키-값 쌍에서 추출된 user_agent 필드에서 매핑된 값을 덮어씁니다. |
requestMethod |
network.http.method |
직접 매핑됩니다. |
siteid |
security_result.detection_fields.value |
비어 있지 않은 경우 조건부로 매핑됩니다. security_result.detection_fields.key이(가) 'siteid'로 설정됩니다. |
sourceServiceName |
target.hostname |
직접 매핑됩니다. dhost 값이 있는 경우 해당 값을 덮어씁니다. |
src |
principal.ip |
직접 매핑됩니다. |
start |
metadata.event_timestamp.seconds |
grok 패턴을 사용하여 추출하고 타임스탬프로 변환했습니다. deviceReceiptTime이 없는 경우 대체로 사용됩니다. deviceReceiptTime와 start가 모두 비어 있으면 로그 타임스탬프가 사용됩니다. |
suid |
principal.user.userid |
비어 있지 않은 경우 조건부로 매핑됩니다. |
| 해당 사항 없음 | metadata.event_type |
'NETWORK_HTTP'로 하드코딩됩니다. |
| 해당 사항 없음 | metadata.log_type |
최상위 log_type 필드에서 직접 매핑됩니다. |
| 해당 사항 없음 | metadata.product_event_type |
비어 있지 않은 경우 csv.event_id에서 매핑됩니다. |
| 해당 사항 없음 | metadata.product_name |
'웹 애플리케이션 방화벽'으로 하드코딩됩니다. |
| 해당 사항 없음 | metadata.vendor_name |
'Imperva'로 하드코딩됩니다. |
kv.act |
event.idm.read_only_udm.security_result.action_details |
변경 로그에서 매핑됨 |
kv.sourceServiceName |
event.idm.read_only_udm.target.resource.name |
변경 로그에서 매핑됨 |
cicode |
event.idm.read_only_udm.principal.location.city |
변경 로그에서 매핑됨 |
ccode |
event.idm.read_only_udm.principal.location.country_or_region |
변경 로그에서 매핑됨 |
Customer |
event.idm.read_only_udm.network.organization_name |
변경 로그에서 매핑됨 |
tls_cipher |
event.idm.read_only_udm.network.tls.cipher |
변경 로그에서 매핑됨 |
cpt |
event.idm.read_only_udm.target.port |
변경 로그에서 매핑됨 |
fileId |
event.idm.read_only_udm.target.resource.product_object_id |
변경 로그에서 매핑됨 |
dproc |
event.idm.read_only_udm.security_result.category_details |
변경 로그에서 매핑됨 |
deviceFacility |
event.idm.read_only_udm.security_result.detection_fields |
변경 로그에서 매핑됨 |
deviceExternalId |
event.idm.read_only_udm.security_result.detection_fields |
변경 로그에서 매핑됨 |
end |
event.idm.read_only_udm.metadata.collected_timestamp |
변경 로그에서 매핑됨 |
변경 로그
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가에게 문의하여 답변을 받으세요.