Imperva Database 로그 수집
이 문서에서는 Bindplane을 사용하여 Imperva 데이터베이스 로그를 Google Security Operations로 수집하는 방법을 설명합니다. 파서는 먼저 CEF, LEEF, JSON과 같은 다양한 구조화된 로그 형식에서 필드를 추출하려고 시도합니다. 이러한 형식이 없으면 grok 패턴을 사용하여 구조화되지 않은 syslog 메시지에서 필드를 추출하고 추출된 데이터를 통합 데이터 모델 (UDM)에 매핑합니다. Imperva Database Security는 포괄적인 데이터베이스 활동 모니터링, 감사, 보호 기능을 제공합니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google SecOps 인스턴스
- Windows 2016 이상 또는
systemd
가 설치된 Linux 호스트 - 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
- Imperva SecureSphere 관리 콘솔에 대한 권한 있는 액세스
Google SecOps 수집 인증 파일 가져오기
- Google SecOps 콘솔에 로그인합니다.
- SIEM 설정 > 수집 에이전트로 이동합니다.
- 수집 인증 파일을 다운로드합니다. Bindplane이 설치될 시스템에 파일을 안전하게 저장합니다.
Google SecOps 고객 ID 가져오기
- Google SecOps 콘솔에 로그인합니다.
- SIEM 설정 > 프로필로 이동합니다.
- 조직 세부정보 섹션에서 고객 ID를 복사하여 저장합니다.
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에서는/etc/bindplane-agent/
디렉터리에 있고 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_DB' 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로 바꿉니다.- Google SecOps 수집 인증 파일 가져오기 섹션에서 인증 파일이 저장된 경로로
/path/to/ingestion-authentication-file.json
를 업데이트합니다.
Bindplane 에이전트를 다시 시작하여 변경사항 적용
Linux에서 Bindplane 에이전트를 다시 시작하려면 다음 명령어를 실행합니다.
sudo systemctl restart bindplane-agent
Windows에서 Bindplane 에이전트를 다시 시작하려면 서비스 콘솔을 사용하거나 다음 명령어를 입력하면 됩니다.
net stop BindPlaneAgent && net start BindPlaneAgent
Imperva 데이터베이스에서 Syslog 전달 구성
- Imperva SecureSphere 관리 콘솔에 로그인합니다.
- 구성 > 작업 세트로 이동합니다.
- 추가를 클릭하여 새 작업 세트를 만들거나 기존 작업 세트를 수정합니다.
- 작업 추가를 클릭하고 다음 구성 세부정보를 제공합니다.
- 이름: 설명이 포함된 이름을 입력합니다 (예:
Google SecOps Syslog
). - 작업 유형: GW Syslog를 선택합니다.
- 호스트: BindPlane 에이전트 IP 주소를 입력합니다.
- 포트: BindPlane 에이전트 포트 번호 (기본값
514
)를 입력합니다. - 프로토콜: BindPlane 에이전트 구성에 따라 UDP 또는 TCP를 선택합니다.
- Syslog Log Level(Syslog 로그 수준): 포괄적인 로깅을 위해 DEBUG를 선택합니다.
- Syslog Facility: LOCAL0 또는 적절한 시설을 선택합니다.
- 작업 인터페이스: SYSLOG+JSON 형식의 경우 게이트웨이 로그 - 보안 이벤트 - 시스템 로그 (syslog) - JSON 형식 (확장)을 선택하고 표준 SYSLOG 형식의 경우 게이트웨이 로그 - 보안 이벤트 - 시스템 로그 (syslog)를 선택합니다.
- 이름: 설명이 포함된 이름을 입력합니다 (예:
- 작업 구성을 저장합니다.
- 정책 > 보안 정책 또는 정책 > 데이터베이스 감사 정책으로 이동합니다.
- 관련 정책을 수정하고 syslog 작업을 포함하는 작업 세트를 추가하여 이벤트가 Google SecOps로 전달되도록 합니다.
UDM 매핑 테이블
로그 필드 | UDM 매핑 | 논리 |
---|---|---|
acct | principal.user.userid | acct 이 'admin'이면 target.user.userid 에 매핑하고, 그렇지 않으면 principal.user.userid 에 매핑합니다. 매핑하기 전에 acct 에서 따옴표와 공백을 삭제합니다. |
action | security_result.action_details | 원시 로그의 action 필드 값 |
alertSev | security_result.severity | alertSev 이 'Informative'이면 'INFORMATIONAL'로 매핑하고, 그렇지 않으면 alertSev 의 대문자로 매핑합니다. |
애플리케이션 | principal.application | application 이 'pam_unix(sudo:session)'이거나 description 에 'pam_unix'가 포함된 경우 'pam_unix'로 매핑합니다. message 에 'run-parts'가 포함된 경우 'run-parts'로 매핑합니다. message 에 'audispd'가 포함된 경우 'audispd'로 매핑합니다. message 에 'FSS 감사'가 포함된 경우 'FSS 감사'로 매핑합니다. 그렇지 않으면 원시 로그에서 application 필드로 매핑 |
application-name | target.application | 원시 로그의 application-name 필드 값 |
audit-policy | security_result.category_details | 원시 로그의 audit-policy 필드 값 |
bind-variables | additional.fields.bind_variables_label.value.string_value | 원시 로그의 bind-variables 필드 값 |
카테고리 | security_result.category_details | 원시 로그의 category 필드 값 |
COMMAND | target.process.command_line | exe 이 비어 있지 않으면 원시 로그에서 exe 필드로 매핑합니다. 그렇지 않으면 원시 로그에서 COMMAND 필드로 매핑 |
생성 시간 | 매핑되지 않음 | |
db-schema-pair | additional.fields.DB Name_{index} .value.string_value, additional.fields.Schema Name_{index} .value.string_value |
원시 로그의 각 db-schema-pair 객체에 대해 db-name 및 schema-name 필드를 추출하고 이를 UDM의 DB Name_{index} 및 Schema Name_{index} 에 각각 매핑합니다. 여기서 index 은 배열에 있는 객체의 색인입니다. |
db-user | principal.user.userid | db-user 이 비어 있지 않으면 원시 로그에서 db-user 필드로 매핑합니다. 그렇지 않고 os-user 가 비어 있지 않고 db-user 가 비어 있으면 원시 로그에서 os-user 필드로 매핑합니다. |
dbName | target.resource.name | 원시 로그의 dbName 필드 값 |
dest-ip | target.ip, target.asset.ip | 원시 로그의 dest-ip 필드 값 |
dest-port | target.port | 원시 로그의 dest-port 필드 값 |
설명 | metadata.description | description 에 'user:'가 포함된 경우 description 에서 userid를 추출하여 userid 에 매핑합니다. userid 가 비어 있지 않고 description 에 'Invalid' 또는 'invalid'가 포함된 경우 'Invalid user'를 'Invalid'로 바꿉니다. application 이 'sshd'인 경우 description 에서 'from' 및 'by'를 삭제합니다. 그렇지 않으면 원시 로그에서 description 필드로 매핑 |
dst | target.ip, target.asset.ip | 원시 로그의 dst 필드 값 |
dstIP | target.ip, target.asset.ip | 원시 로그의 dstIP 필드 값 |
dstPort | target.port | 원시 로그의 dstPort 필드 값 |
event-type | metadata.product_event_type | 원시 로그의 event-type 필드 값 |
eventType | metadata.product_event_type, metadata.event_type | eventType 이 비어 있지 않고 srcIP 및 dstIP 이 비어 있지 않으면 eventType 을 metadata.product_event_type 에 매핑하고 'NETWORK_CONNECTION'을 metadata.event_type 에 매핑합니다. |
evntDesc | security_result.description | 원시 로그의 evntDesc 필드 값 |
exe | target.process.command_line | 원시 로그의 exe 필드 값 |
소스 | network.email.from | from 에서 '<' 및 '>'를 삭제하고 network.email.from 에 매핑 |
그룹 | target.user.group_identifiers | 원시 로그의 group 필드 값 |
gw-ip | intermediary.ip, intermediary.asset.ip | 원시 로그의 gw-ip 필드 값 |
호스트 | target.hostname, target.asset.hostname | 원시 로그의 host 필드 값 |
host-name | principal.hostname, principal.asset.hostname | 원시 로그의 host-name 필드 값 |
호스트 이름 | principal.hostname, principal.asset.hostname | 원시 로그의 hostname 필드 값 |
ip | target.ip, target.asset.ip | 원시 로그의 ip 필드 값 |
mx-ip | intermediary.ip, intermediary.asset.ip | 원시 로그의 mx-ip 필드 값 |
objects-list | additional.fields.Object_{index} .value.string_value |
원시 로그의 각 objects-list 객체에 대해 객체를 추출하고 UDM의 Object_{index} 에 매핑합니다. 여기서 index 은 배열에 있는 객체의 색인입니다. |
작업 | about.labels.Operation.value | 원시 로그의 Operation 필드 값 |
Operation type |
about.labels.Operation Type .value |
원시 로그의 Operation type 필드 값 |
os-user | principal.user.userid, additional.fields.OS User .value.string_value |
os-user 가 비어 있지 않고 db-user 가 비어 있으면 원시 로그에서 os-user 필드로 매핑합니다. 그렇지 않으면 원시 로그에서 OS User 필드로 매핑 |
파싱된 쿼리 | target.process.command_line | 원시 로그의 Parsed Query 필드 값 |
parsed-query | additional.fields.Parsed Query .value.string_value |
원시 로그의 parsed-query 필드 값 |
pid | target.process.pid | 원시 로그의 pid 필드 값 |
policy-id | security_result.detection_fields.Policy_ID_{index} .value |
원시 로그의 각 policy-id 객체에 대해 정책을 추출하고 UDM의 Policy_ID_{index} 에 매핑합니다. 여기서 index 은 배열에 있는 객체의 색인입니다. |
policyName | security_result.detection_fields.policyName_label.value | 원시 로그의 policyName 필드 값 |
포트 | target.port | 원시 로그의 port 필드 값 |
권한이 있는 사용자 | about.labels.Privileged.value | Privileged 가 true이면 'True'로 매핑하고, 그렇지 않으면 'False'로 매핑합니다. |
proto | network.ip_protocol | 원시 로그의 proto 필드 값 |
프로토콜 | network.ip_protocol | protocol 이 'TCP' 또는 'UDP'인 경우 원시 로그에서 protocol 필드로 매핑 |
PWD | target.file.full_path | 원시 로그의 PWD 필드 값 |
Raw Data |
target.resource.attribute.labels.raw_Data.value | 원시 로그의 Raw Data 필드 값 |
raw-query | additional.fields.Raw Query .value.string_value |
원시 로그의 raw-query 필드 값 |
ruleName | security_result.rule_name | 원시 로그의 ruleName 필드 값 |
server-group | additional.fields.serve_group_label.value.string_value | 원시 로그의 server-group 필드 값 |
service-name | additional.fields.service_name_label.value.string_value | 원시 로그의 service-name 필드 값 |
Service Type |
additional.fields.Service Type .value.string_value |
원시 로그의 Service Type 필드 값 |
크기 | network.received_bytes | 원시 로그의 size 필드 값 |
Stored Proc |
about.labels.Stored_Proc.value | Stored Proc 가 true이면 'True'로 매핑하고, 그렇지 않으면 'False'로 매핑합니다. |
Table Group |
target.group.group_display_name | 원시 로그의 Table Group 필드 값 |
타임스탬프 | metadata.event_timestamp | 원시 로그의 timestamp 필드 값 |
~ | network.email.to | to 에서 '<' 및 '>'를 삭제하고 network.email.to 에 매핑 |
사용자 | principal.user.userid, target.user.userid | USER 이 비어 있지 않고 USER 이 'admin'인 경우 원시 로그에서 USER 필드를 target.user.userid 에 매핑합니다. 그렇지 않고 USER 이 비어 있지 않으면 원시 로그에서 USER 필드를 principal.user.userid 에 매핑합니다. |
user-authenticated | security_result.detection_fields.user_authenticated.value | 원시 로그의 user-authenticated 필드 값 |
user-group | additional.fields.user_group_label.value.string_value | 원시 로그의 user-group 필드 값 |
사용자 이름 | principal.user.user_display_name | 원시 로그의 username 필드 값 |
usrName | principal.user.userid | 원시 로그의 usrName 필드 값 |
extensions.auth.mechanism | description 에 'authentication failure' 또는 'check pass; user unknown' 또는 'Invalid user' 또는 'invalid user'가 포함되거나 error 이 비어 있지 않은 경우 'USERNAME_PASSWORD'로 하드코딩됩니다. |
|
extensions.auth.type | has_principal 이 'true'이고 has_target 이 'true'이고 event-type 이 'Login'인 경우 'AUTHTYPE_UNSPECIFIED'로 하드코딩됩니다. |
|
metadata.event_type | PWD 이 비어 있지 않으면 'PROCESS_OPEN'으로 하드코딩됩니다. message 에 'starting'이 포함되거나 application 이 'pman' 또는 'CROND' 또는 'run-parts'이고 event_type 이 비어 있는 경우 'PROCESS_OPEN'으로 하드코딩됩니다. description 이 'Syslog connection established'(Syslog 연결 설정됨) 또는 'Syslog connection broken'(Syslog 연결 끊김) 또는 'Syslog connection failed'(Syslog 연결 실패)인 경우 'NETWORK_CONNECTION'으로 하드코딩됩니다. application 이 'postfix/qmgr' 또는 'postfix/local' 또는 'postfix/pickup'인 경우 'EMAIL_UNCATEGORIZED'로 하드코딩됩니다. application 이 'postfix/local' 또는 'postfix/pickup'이고 status 이 'sent (delivered to mailbox)'인 경우 'EMAIL_TRANSACTION'으로 하드코딩됩니다. application 가 'sshd'이고 description 에 'check pass; user unknown'이 포함되지 않고 description 에 'authentication failure'이 포함되지 않고 description 에 'invalid'가 포함되지 않는 경우 'NETWORK_HTTP'로 하드코딩됩니다. description 에 'authentication failure' 또는 'check pass; user unknown' 또는 'Invalid user' 또는 'invalid user'가 포함되거나 error 이 비어 있지 않은 경우 'USER_LOGIN'으로 하드코딩됩니다. file_path 이 비어 있지 않으면 'FILE_SYNC'로 하드코딩됩니다. message 에 'reconfigure'가 포함되고 application 이 'pman'인 경우 'PROCESS_UNCATEGORIZED'로 하드코딩됩니다. message 에 '종료 코드 1'이 포함되고 application 이 'pman'인 경우 'PROCESS_TERMINATION'으로 하드코딩됩니다. eventType 이 비어 있지 않고 srcIP 및 dstIP 이 비어 있지 않은 경우 'NETWORK_CONNECTION'으로 하드코딩됩니다. has_principal 이 'true'이고 has_target 이 'true'이고 event-type 이 'Login'인 경우 'USER_LOGIN'으로 하드코딩됩니다. has_principal 이 'true'이고 has_target 이 'true'이며 protocol 이 비어 있지 않은 경우 'NETWORK_CONNECTION'으로 하드코딩됩니다. has_principal 이 'true'인 경우 'STATUS_UPDATE'로 하드코딩됩니다. event_type 이 비어 있거나 'GENERIC_EVENT'인 경우 'GENERIC_EVENT'로 하드코딩됩니다. |
|
metadata.log_type | 'IMPERVA_DB'로 하드코딩됨 | |
metadata.product_name | 'IMPERVA DB'로 하드코딩됨 | |
metadata.vendor_name | 'IMPERVA DB'로 하드코딩됨 | |
security_result.action | description 에 'authentication failure' 또는 'check pass; user unknown' 또는 'Invalid user' 또는 'invalid user'가 포함되지 않고 error 가 비어 있는 경우 'ALLOW'로 하드코딩됩니다. description 에 'authentication failure' 또는 'check pass; user unknown' 또는 'Invalid user' 또는 'invalid user'가 포함되거나 error 가 비어 있지 않은 경우 'BLOCK'으로 하드코딩됩니다. |
|
security_result.rule_id | description 에 'alert_score' 또는 'new_alert_score'가 포함된 경우 description 에서 ruleid를 추출하여 security_result.rule_id 에 매핑합니다. |
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가로부터 답변을 받으세요.