收集 F5 BIG-IP ASM 日志

支持的语言:

本文档介绍了如何使用 Bindplane 将 F5 BIG-IP Application Security Manager (ASM) 日志注入到 Google Security Operations。解析器可处理各种日志格式(syslog、CSV、CEF 等),并将其标准化为 UDM。它使用 Grok 模式和键值提取来解析字段,使用 XML 过滤来获取违规详情,使用条件逻辑来进行事件分类和严重程度映射,并将提取的字段合并到 UDM 架构中。

准备工作

  • 确保您拥有 Google Security Operations 实例。
  • 确保您使用的是 Windows 2016 或更高版本,或者具有 systemd 的 Linux 主机。
  • 如果通过代理运行,请确保防火墙端口处于开放状态。
  • 确保您拥有对 F5 BIG-IP ASM 的特权访问权限。

获取 Google SecOps 注入身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件。将文件安全地保存在将要安装 Bindplane 的系统上。

获取 Google SecOps 客户 ID

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 配置文件
  3. 复制并保存组织详细信息部分中的客户 ID

安装 Bindplane 代理

Windows 安装

  1. 以管理员身份打开命令提示符PowerShell
  2. 运行以下命令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux 安装

  1. 打开具有 root 或 sudo 权限的终端。
  2. 运行以下命令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

其他安装资源

  • 如需了解其他安装选项,请参阅此安装指南

配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps

  1. 访问配置文件:

    1. 找到 config.yaml 文件。通常,它位于 Linux 上的 /etc/bindplane-agent/ 目录中或 Windows 上的安装目录中。
    2. 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  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: '/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
            ingestion_labels:
                log_type: F5_ASM
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 根据基础架构的需要替换端口和 IP 地址。

  4. <customer_id> 替换为实际的客户 ID。

  5. /path/to/ingestion-authentication-file.json 更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。

重启 Bindplane 代理以应用更改

  • 如需在 Linux 中重启 Bindplane 代理,请运行以下命令:

    sudo systemctl restart bindplane-agent
    
  • 如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

在 F5 BIG-IP ASM 上配置远程日志记录

  1. 登录 ASM 控制台 Web 界面。
  2. 依次前往安全性 > 事件日志 > 日志记录配置文件
  3. 点击创建
  4. 提供以下配置详细信息:

    • 配置文件名称:输入配置文件的唯一名称。
    • 选择应用安全
    • 在应用安全保障”标签页上,选择高级(如果需要其他配置)。
    • 存储目的地:选择远程存储
    • 日志记录格式:选择通用事件格式 (CEF)。
    • 清除本地存储
    • 协议:选择 UDPTCP(取决于您的 Bindplane 代理配置)。
    • 服务器地址:输入 Bindplane 代理 IP 地址。
    • 端口:默认选择 514。根据您的 Bindplane 代理配置更新端口设置。
    • 点击添加
    • 选择保证日志记录
    • 选择报告检测到的异常情况
    • 功能:选择 LOG_LOCAL6(您可以选择记录的流量的功能类别,可能的值为 LOG_LOCAL0LOG_LOCAL7)。
  5. 点击 Finished

将日志记录配置文件与安全政策相关联

  1. 依次点击本地流量> 虚拟服务器
  2. 点击安全政策所使用的虚拟服务器的名称。
  3. 安全性菜单中,选择政策
  4. 确保应用安全政策设置处于已启用状态,并且政策已设置为您所需的安全政策。
  5. 确保日志配置文件设置设为已启用
  6. 可用列表中,选择要用于安全政策的配置文件,然后将其移至已选择列表。
  7. 点击更新

UDM 映射表

日志字段 UDM 映射 逻辑
act security_result.action 如果 actblocked,则映射到 BLOCK。如果 actpassedlegal,则映射到 ALLOW。如果 act 包含 alerted,则映射到隔离。否则,对于 Splunk 格式,默认值为 ALLOW。
app network.application_protocol 如果原始日志中存在,则直接映射到 HTTPS。
attack_type security_result.category_detailsmetadata.description 与其他字段结合使用,以确定 security_result.category。如果没有其他说明,则该说明会成为活动说明。对于 Splunk 格式的日志,如果 violations 为空,则用于确定类别和摘要。
client_ip principal.ipprincipal.asset.ip 直接映射到主 IP。
cn1 network.http.response_code 直接映射到 HTTP 响应代码。
cn2 security_result.severity_details 直接映射到安全结果严重程度详细信息。与 response_code 搭配使用,以确定事件是否为提醒。
column1 principal.ipprincipal.asset.ip 映射到某些 CSV 格式日志的主 IP。
column2 target.port 映射到某些 CSV 格式日志的目标端口。
column3 target.iptarget.asset.ip 映射到特定 CSV 格式日志的目标 IP。
column4 security_result.severity 映射到某些 CSV 格式日志的安全结果严重程度。值 InformationInformational04 映射到 INFORMATIONAL。Warning13 映射到“中”。Error2 映射到 ERROR。CriticalCRITICALcritical 映射到 CRITICAL。
column7 security_result.detection_fieldsnetwork.http.response_code 包含 XML 数据。提取 request-violations 中的 viol_name,并将其添加为键为 Request Violation Name_index 的检测字段。提取 response_violations 中的 viol_name,并将其添加为键为 Response Violation Name_index 的检测字段。response_violations 中的 response_code 映射到 network.http.response_code
column8 security_result.rule_name 映射到某些 CSV 格式日志的安全结果规则名称。
cs1 security_result.rule_name 直接映射到安全结果规则名称。
cs2 security_result.summary 直接映射到安全结果摘要。
cs5 principal.ipprincipal.asset.ipadditional.fields 如果 cs5 包含 JNDI LDAP 网址,则会添加一个键为 JNDI_LDAP_URL 的额外字段。否则,如果它包含以英文逗号分隔的 IP,则任何不同于 principal_ip 的 IP 都会添加为额外的主要 IP。
cs6 principal.location.country_or_region 直接映射到主要位置的国家/区域。
data network.session_idnetwork.sent_bytesnetwork.tls.version 如果存在,则解析为 JSON 以提取 sessionidbits(映射到 sent_bytes)和 version
date_time metadata.event_timestamp 在解析并转换为正确格式后,直接映射到事件时间戳。
dest_ip target.iptarget.asset.ip 直接映射到目标 IP。
dest_port target.port 直接映射到目标端口。
dhost target.hostname 直接映射到目标主机名。
dpt target.port 直接映射到目标端口。
dst target.ip 直接映射到目标 IP。
dvc intermediary.ip 直接映射到中介 IP。
dvchost target.hostnameintermediary.hostname 直接映射到目标主机名和中间主机名。
errdefs_msgno additional.fields 添加为具有键 errdefs_msgno 的附加字段。
externalId additional.fields 添加为具有键 Support_Id 的附加字段。
f5_host target.hostnameintermediary.hostname 直接映射到目标主机名和中间主机名。
geo_info principal.location.country_or_regionsecurity_result.detection_fields 映射到主要位置国家/区域。还添加为检测字段,键为 geo_info
host target.hostname 直接映射到目标主机名。
ids additional.fields 解析为以英文逗号分隔的支持 ID 列表。每个 ID 都会添加到键为 supportid 的列表值附加字段中。
ip_addr_intelli security_result.detection_fields 已添加为检测字段,键为 ip_addr_intelli
ip_client principal.ip 直接映射到主 IP。
ip_route_domain principal.ipprincipal.asset.ip 提取 IP 部分并将其映射到主 IP。
irule security_result.rule_name 直接映射到安全结果规则名称。
irule-version security_result.rule_version 直接映射到安全结果规则版本。
level security_result.severitysecurity_result.severity_details 用于确定安全性结果的严重程度。errorwarning 映射到 HIGH。notice 映射到中等。informationinfo 映射到 LOW。原始值也会映射到 severity_details
logtime metadata.event_timestamp 解析后直接映射到事件时间戳。
management_ip_addressmanagement_ip_address_2 intermediary.ip 直接映射到中介 IP。
method network.http.method 直接映射到 HTTP 方法。
msg security_result.summarymetadata.description 直接映射到某些日志格式的安全结果摘要。如果没有其他说明,则该说明会成为活动说明。
policy_name security_result.about.resource.namesecurity_result.rule_name 直接映射到安全结果资源名称或规则名称。
process target.application 直接映射到目标应用。
process_id principal.process.pid 直接映射到主进程 ID。
protocol network.application_protocolnetwork.ip_protocolapp_protocol 直接映射到应用协议或 IP 协议,具体取决于日志格式。
proxy_id security_result.rule_id 直接映射到安全结果规则 ID。
query_string additional.fields 添加为具有键 query_string 的附加字段。
referrer network.http.referral_url 直接映射到 HTTP 引荐来源网址。
req_method network.http.method 直接映射到 HTTP 方法。
req_status security_result.actionsecurity_result.action_detailssecurity_result.detection_fields 如果为 blocked,则将 security_result.action 映射到 BLOCK。如果值为 passedlegal,则映射到 ALLOW。如果包含 alerted,则映射到 QUARANTINE。原始值也会映射到 action_details 并添加为键为 req_status 的检测字段。
request target.url 直接映射到目标网址。
requestMethod network.http.method 直接映射到 HTTP 方法。
resp security_result.detection_fields 已添加为检测字段,键为 resp
resp_code network.http.response_code 直接映射到 HTTP 响应代码。
response security_result.summary 直接映射到安全结果摘要。
response_code network.http.response_code 直接映射到 HTTP 响应代码。
route_domain additional.fields 添加为具有键 route_domain 的附加字段。
rt metadata.event_timestamp 解析后直接映射到事件时间戳。
sev security_result.severitysecurity_result.severity_details 用于确定安全性结果的严重程度。ERROR 映射到 ERROR。原始值也会映射到 severity_details
severity security_result.severitysecurity_result.severity_details 用于确定安全性结果的严重程度。Informational 映射到 LOW,Errorwarning 映射到 HIGH,critical 映射到 CRITICAL,notice 映射到 MEDIUM,informationinfo 映射到 LOW。原始值也会映射到 severity_details
sig_ids security_result.rule_id 直接映射到安全结果规则 ID。
sig_names security_result.rule_name 直接映射到安全结果规则名称。
snat_ip principal.nat_ip 直接映射到主 NAT IP。
snat_port principal.nat_port 直接映射到主 NAT 端口。
src principal.ipprincipal.asset.ip 直接映射到主 IP。
spt principal.port 直接映射到主端口。
sub_violates security_result.about.resource.attribute.labels 作为具有键 Sub Violations 的标签添加到安全结果资源属性中。
sub_violations security_result.about.resource.attribute.labels 作为具有键 Sub Violations 的标签添加到安全结果资源属性中。
summary security_result.summary 直接映射到安全结果摘要。
support_id metadata.product_log_id support_id - 为前缀,并映射到商品日志 ID。
suid network.session_id 直接映射到网络会话 ID。
suser principal.user.userid 直接映射到主用户 ID。
timestamp metadata.event_timestamp 在解析并转换为正确格式后,直接映射到事件时间戳。
unit_host principal.hostnameprincipal.asset.hostname 直接映射到主主机名。
uri principal.url 直接映射到主网址。
user_id principal.user.userid 直接映射到主用户 ID。
user_name principal.user.user_display_name 直接映射到主用户的显示名称。
username principal.user.userid 直接映射到主用户 ID。
useragent network.http.user_agentnetwork.http.parsed_user_agent 直接映射到 HTTP 用户代理。还会解析并映射到已解析的用户代理。
virtualserver network.tls.client.server_name 直接映射到 TLS 客户端服务器名称。
violate_details security_result.detection_fieldsnetwork.http.response_code 包含 XML 数据。提取 request-violations 中的 viol_name,并将其添加为键为 Request Violation Name_index 的检测字段。提取 response_violations 中的 viol_name,并将其添加为键为 Response Violation Name_index 的检测字段。response_violations 中的 response_code 映射到 network.http.response_code
violate_rate security_result.detection_fields 已添加为检测字段,键为 violate_rate
violation_rating security_result.about.resource.attribute.labels 作为具有键 Violations Rating 的标签添加到安全结果资源属性中。
violations security_result.description 直接映射到安全结果说明。对于 Splunk 格式的日志,用于确定是否存在摘要。
virus_name security_result.threat_name 直接映射到安全结果威胁名称。
vs_name network.tls.client.server_name 直接映射到 TLS 客户端服务器名称。
websocket_direction network.direction 如果为 clientToServer,则映射到 INBOUND。如果为 ServerToclient,则映射到 OUTBOUND。
websocket_message_type security_result.detection_fields 已添加为检测字段,键为 WebsocketMessageType
x_fwd_hdr_val principal.ipprincipal.asset.ip 直接映射到主 IP。

需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。