收集 Cisco Meraki 日志

支持的平台:

本文档介绍了如何使用 Bindplane 将 Cisco Meraki 日志注入到 Google Security Operations。

解析器从 Cisco Meraki syslog 和 JSON 格式的日志中提取字段。它使用 grok 和/或 JSON 解析来处理日志消息,然后将这些值映射到统一数据模型 (UDM)。它还会为事件来源和类型设置默认元数据值。

准备工作

请确保满足以下前提条件:

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • 如果通过代理运行,请确保防火墙端口已根据 Bindplane 代理要求打开
  • 对 Cisco Meraki 控制面板的特权访问权限

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

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件。将文件安全地保存在将要安装 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
    
  3. 等待安装完成。

  4. 运行以下命令来验证安装:

    sc query observiq-otel-collector
    

该服务应显示为 RUNNING

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
    
  3. 等待安装完成。

  4. 运行以下命令来验证安装:

    sudo systemctl status observiq-otel-collector
    

该服务应显示为有效(正在运行)

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南

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

找到配置文件

  • Linux

    sudo nano /etc/bindplane-agent/config.yaml
    
  • Windows

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    

修改配置文件

  • config.yaml 的全部内容替换为以下配置:

    receivers:
        udplog:
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            creds_file_path: '/path/to/ingestion-authentication-file.json'
            customer_id: 'YOUR_CUSTOMER_ID'
            endpoint: malachiteingestion-pa.googleapis.com
            log_type: 'CISCO_MERAKI'
            raw_log_field: body
            ingestion_labels:
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    

配置参数

  • 替换以下占位符:

    • 接收器配置

      • udplog:使用 udplog 表示 UDP syslog,使用 tcplog 表示 TCP syslog
      • 0.0.0.0:要监听的 IP 地址(0.0.0.0 表示监听所有接口)
      • 514:要监听的端口号(标准 syslog 端口)
    • 导出器配置

      • creds_file_path:提取身份验证文件的完整路径:
        • Linux/etc/bindplane-agent/ingestion-auth.json
        • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
      • YOUR_CUSTOMER_ID:从“获取客户 ID”部分获取的客户 ID
      • endpoint:区域端点网址:
        • 美国malachiteingestion-pa.googleapis.com
        • 欧洲europe-malachiteingestion-pa.googleapis.com
        • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
        • 如需查看完整列表,请参阅区域级端点
      • log_type:日志类型,与在 Chronicle 中显示的完全一致 (CISCO_MERAKI)

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+OEnterCtrl+X
    • Windows:依次点击文件 > 保存

重启 Bindplane 代理以应用更改

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

    sudo systemctl restart observiq-otel-collector
    
    1. 验证服务是否正在运行:

        sudo systemctl status observiq-otel-collector
      
    2. 检查日志是否存在错误:

        sudo journalctl -u observiq-otel-collector -f
      
  • 如需在 Windows 中重启 Bindplane 代理,请选择以下选项之一:

    • 以管理员身份运行命令提示符或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 服务控制台:

      1. Win+R,输入 services.msc,然后按 Enter 键。
      2. 找到 observIQ OpenTelemetry 收集器
      3. 右键点击并选择重新启动

      4. 验证服务是否正在运行:

        sc query observiq-otel-collector
        
      5. 检查日志是否存在错误:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

在 Cisco Meraki 上配置 Syslog 转发

  1. 登录 https://dashboard.meraki.com 处的 Cisco Meraki 控制面板
  2. 从网络下拉菜单中选择目标网络
  3. 依次前往全网> 常规
  4. 前往报告部分。
  5. 找到 Syslog 服务器,然后点击添加 Syslog 服务器
  6. 提供以下配置详细信息:
    • 服务器 IP:输入 Bindplane 代理主机 IP 地址。
    • 端口:输入 514
    • 角色:选择要转发的日志类型:
      • :网络流数据
      • 网址:网址访问日志
      • 安全事件:IDS/IPS 提醒
      • 设备事件日志:MX 设备事件
      • Air Marshal 事件:无线威胁检测
      • IDS 提醒:入侵检测系统提醒
  7. 点击保存
  8. 通过检查 Bindplane 代理日志,验证是否正在发送 syslog 消息。

UDM 映射表

日志字段 UDM 映射 逻辑
操作 security_result.action 值会转换为大写。如果值为“deny”,则替换为“BLOCK”。如果 sc_action 包含“allow”,则该值会被替换为“ALLOW”。否则,如果决策包含“block”,则将该值替换为“BLOCK”。否则,如果授权为“success”,则设置为“ALLOW”;如果为“failure”,则设置为“BLOCK”。否则,如果模式为“1 all”“deny all”或“Group Policy Deny”,则将其设置为“BLOCK”。如果模式为“允许所有”“群组政策允许”或“0 所有”,则设置为“允许”。否则,该值会设置为“UNKNOWN_ACTION”。如果决策包含“block”,则设置为“BLOCK”。
adId principal.user.user_display_name 直接从 JSON 日志中的 adId 字段映射。
代理 network.http.user_agent 撇号已移除。直接从代理字段映射。还使用 parseduseragent 过滤器转换为 network.http.parsed_user_agent。
辅助 network.session_id 直接从 aid 字段映射。
appProtocol network.application_protocol 转换为大写。直接从 appProtocol 字段映射。
attr additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“attr”。
授权 security_result.action_details 直接从 JSON 日志中的授权字段映射。
频段 additional.fields 以键值对的形式添加到键为“band”的 additional.fields 数组中。
bssids.bssid principal.mac 转换为小写。已合并到 principal.mac 数组中。
bssids.detectedBy.device intermediary.asset.asset_id 格式为“设备 ID:”。
bssids.detectedBy.rssi intermediary.asset.product_object_id 转换为字符串。
渠道 about.resource.attribute.labels 以键值对的形式添加到 about.resource.attribute.labels 数组中,键为“Channel”。
clientDescription additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“clientDescription”。
clientId additional.fields 以键值对的形式添加到具有键“clientId”的 additional.fields 数组中。
clientIp principal.ip、principal.asset.ip 直接从 clientIp 字段映射。
clientMac principal.mac 转换为小写。直接从 JSON 日志中的 clientMac 字段映射。
client_ip principal.ip、principal.asset.ip 直接从 client_ip 字段映射。
client_mac principal.mac 转换为小写。直接从 client_mac 字段映射。
代码 additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“code”。
collection_time metadata.event_timestamp 系统会将 seconds 和 nanos 字段合并以创建时间戳。
条件 security_result.about.resource.attribute.labels 回车符、换行符和制表符会被替换为空格,并且会替换特定值。修改后的值会作为键值对添加到 security_result.about.resource.attribute.labels 数组中,键为“Conditions”。
决策 security_result.action 如果值为“blocked”,则设置为“BLOCK”。
降序 metadata.description 直接从 desc 字段映射。
说明 security_result.description 直接从 JSON 日志中的说明字段映射。
DestAddress target.ip、target.asset.ip 直接从 DestAddress 字段映射。
DestPort target.port 转换为整数。直接从 DestPort 字段映射。
deviceIp target.ip 直接从 deviceIp 字段映射。
deviceMac target.mac 转换为小写。直接从 deviceMac 字段映射。
deviceName target.hostname、target.asset.hostname 直接从 JSON 日志中的 deviceName 字段映射。
deviceSerial target.asset.hardware.serial_number 直接从 JSON 日志中的 deviceSerial 字段映射。
方向 network.direction 特殊字符会被移除,并且该值会映射到 network.direction。
DisabledPrivilegeList target.user.attribute 系统会替换回车符、换行符和制表符,然后将修改后的值解析为 JSON 并合并到 target.user.attribute 对象中。
dport target.port 转换为整数。直接从 dport 字段映射。
dst target.ip、target.asset.ip 直接从 dst 字段映射。
dstIp target.ip、target.asset.ip 直接从 dstIp 字段映射。
dstPort target.port 转换为整数。直接从 dstPort 字段映射。
dvc intermediary.hostname 直接从 DVC 字段映射。
EnabledPrivilegeList target.user.attribute 系统会替换回车符、换行符和制表符,然后将修改后的值解析为 JSON 并合并到 target.user.attribute 对象中。
eventData.aid principal.asset_id 格式为“ASSET_ID:”。
eventData.client_ip principal.ip、principal.asset.ip 直接从 JSON 日志中的 eventData.client_ip 字段映射。
eventData.client_mac principal.mac 转换为小写。直接从 JSON 日志中的 eventData.client_mac 字段映射。
eventData.group principal.group.group_display_name 直接从 JSON 日志中的 eventData.group 字段映射。
eventData.identity principal.hostname 直接从 JSON 日志中的 eventData.identity 字段映射。
eventData.ip principal.ip、principal.asset.ip 直接从 JSON 日志中的 eventData.ip 字段映射。
EventID metadata.product_event_type、security_result.rule_name 转换为字符串。映射到 metadata.product_event_type。还用于创建格式为“EventID: ”的 security_result.rule_name。用于确定 event_type 和 sec_action。
eventSummary security_result.summary、metadata.description 直接从 eventSummary 字段映射。还用于某些事件的 security_result.description 中。
eventType metadata.product_event_type 直接从 eventType 字段映射。用于确定要应用哪种解析逻辑。
filename principal.process.file.full_path 直接从文件名字段映射。
FilterId target.resource.product_object_id 直接从事件 ID 5447 的 FilterId 字段映射。
FilterName target.resource.name 直接从 EventID 5447 的 FilterName 字段映射。
FilterRTID security_result.detection_fields 以键值对的形式添加到 security_result.detection_fields 数组中,键为“FilterRTID”。
firstSeen security_result.detection_fields 转换为字符串。以键值对的形式添加到 security_result.detection_fields 数组中,键为“firstSeen”。
gatewayDeviceMac target.mac 转换为小写。合并到 target.mac 数组中。
群组 additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“group”。
GroupMembership target.user 系统会移除回车符、换行符、制表符和特殊字符。修改后的值会被解析为 JSON 并合并到 target.user 对象中。
主机名 principal.hostname、principal.asset.hostname 直接从“主机名”字段映射。
identity target.user.userid 直接从身份字段映射。
煽动者 additional.fields 以键值对的形式添加到具有键“instigator”的 additional.fields 数组中。
int_ip intermediary.ip 直接从 int_ip 字段映射。
ip_msg principal.resource.attribute.labels 以键值对的形式添加到正文 principal.resource.attribute.labels 数组中,键为“IPs”。
is_8021x additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“is_8021x”。
KeyName target.resource.name 直接从 KeyName 字段映射。
KeyFilePath target.file.full_path 直接从 KeyFilePath 字段映射。
lastSeen security_result.detection_fields 转换为字符串。以键值对的形式添加到 security_result.detection_fields 数组中,键为“lastSeen”。
last_known_client_ip principal.ip、principal.asset.ip 直接从 last_known_client_ip 字段映射。
LayerName security_result.detection_fields 以键值对的形式添加到 security_result.detection_fields 数组中,键为“Layer Name”。
LayerRTID security_result.detection_fields 以键值对的形式添加到 security_result.detection_fields 数组中,键为“LayerRTID”。
localIp principal.ip、principal.asset.ip 直接从 localIp 字段映射。
登录 principal.user.email_addresses 如果 JSON 日志中的登录字段与电子邮件地址格式匹配,则直接从该字段映射。
LogonGuid additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“LogonGuid”。
LogonType extensions.auth.mechanism 根据其值映射到特定的身份验证机制。如果存在 PreAuthType,则会替换 LogonType。值的映射关系如下:2 -> USERNAME_PASSWORD、3 -> NETWORK、4 -> BATCH、5 -> SERVICE、7 -> UNLOCK、8 -> NETWORK_CLEAR_TEXT、9 -> NEW_CREDENTIALS、10 -> REMOTE_INTERACTIVE、11 -> CACHED_INTERACTIVE、12 -> CACHED_REMOTE_INTERACTIVE、13 -> CACHED_UNLOCK,其他 -> MECHANISM_UNSPECIFIED。
mac principal.mac 转换为小写。已合并到 principal.mac 数组中。
MandatoryLabel additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“MandatoryLabel”。
消息 security_result.description、security_result.summary 如果存在 AccessReason,则 Message 会映射到 security_result.summary,而 AccessReason 会映射到 security_result.description。否则,Message 会映射到 security_result.description。
方法 network.http.method 直接从方法字段映射。
msg security_result.description 直接从 msg 字段映射。
name principal.user.user_display_name 直接从 JSON 日志中的“name”字段映射。
natsrcIp principal.nat_ip 直接从 natsrcIp 字段映射。
natsrcport principal.nat_port 转换为整数。直接从 natsrcport 字段映射。
network_id additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“Network ID”。
NewProcessId target.process.pid 直接从 NewProcessId 字段映射。
NewProcessName target.process.file.full_path 直接从 NewProcessName 字段映射。
NewSd target.resource.attribute.labels 以键值对的形式添加到目标资源属性标签数组中,键为“New Security Descriptor”。
occurredAt metadata.event_timestamp 以 ISO8601 格式解析为时间戳。
ObjectName target.file.full_path、target.registry.registry_key、target.process.file.full_path、additional.fields 如果 EventID 为 4663 且 ObjectType 为“Process”,则映射到 target.process.file.full_path。如果 ObjectType 为“Key”,则映射到 target.registry.registry_key。否则,它会映射到 target.file.full_path。对于其他事件,它会作为键值对添加到 additional.fields 数组中,键为“ObjectName”。
ObjectType additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“ObjectType”。用于确定 event_type。
OldSd target.resource.attribute.labels 以键值对的形式添加到目标资源属性标签数组中,键为“原始安全描述符”。
organizationId principal.resource.id 直接从 JSON 日志中的 organizationId 字段映射。
ParentProcessName target.process.parent_process.file.full_path 直接从 ParentProcessName 字段映射。
模式 security_result.description 直接映射到 security_result.description。用于确定 security_result.action。
peer_ident target.user.userid 直接从 peer_ident 字段映射。
PreAuthType extensions.auth.mechanism 用于确定身份验证机制(如果有)。替换 LogonType。
principalIp principal.ip、principal.asset.ip 直接从 principalIp 字段映射。
principalMac principal.mac 转换为小写。已合并到 principal.mac 数组中。
principalPort principal.port 转换为整数。直接从 principalPort 字段映射。
prin_ip2 principal.ip、principal.asset.ip 直接从 prin_ip2 字段映射。
prin_url principal.url 直接从 prin_url 字段映射。
优先级 security_result.priority 根据其值映射到优先级:1 -> HIGH_PRIORITY,2 -> MEDIUM_PRIORITY,3 -> LOW_PRIORITY,其他 -> UNKNOWN_PRIORITY。
ProcessID principal.process.pid 转换为字符串。直接从 ProcessID 字段映射。
ProcessName principal.process.file.full_path、target.process.file.full_path 如果 EventID 为 4689,则映射到 target.process.file.full_path。否则,它会映射到 principal.process.file.full_path。
prod_log_id metadata.product_log_id 直接从 prod_log_id 字段映射。
协议 network.ip_protocol 转换为大写。如果它是数字,则会转换为相应的 IP 协议名称。如果为“ICMP6”,则替换为“ICMP”。直接从协议字段映射。
ProviderGuid metadata.product_deployment_id 直接从 ProviderGuid 字段映射。
查询 network.dns.questions.name 直接从查询字段映射。
query_type network.dns.questions.type 重命名为 question.type 并合并到 network.dns.questions 数组中。根据 DHCP 查询类型映射到数值。
收音机 additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“radio”。
reason additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“reason”。
rec_bytes network.received_bytes 转换为无符号整数。直接从 rec_bytes 字段映射。
RecordNumber metadata.product_log_id 转换为字符串。直接从 RecordNumber 字段映射。
RelativeTargetName target.process.file.full_path 直接从 RelativeTargetName 字段映射。
response_ip principal.ip、principal.asset.ip 直接从 response_ip 字段映射。
rssi intermediary.asset.product_object_id 直接从 rssi 字段映射。
sc_action security_result.action_details 直接从 sc_action 字段映射。
sec_action security_result.action 已合并到 security_result.action 数组中。
server_ip client_ip 直接映射到 client_ip 字段。
严重程度 security_result.severity 根据其值映射到严重程度级别:“信息”-> INFORMATIONAL,“错误”-> ERROR,“警告”-> MEDIUM,其他 -> UNKNOWN_SEVERITY。
sha256 target.file.sha256 直接从 sha256 字段映射。
signature additional.fields 以键值对的形式添加到键为“signature”的 additional.fields 数组中。
SourceAddress principal.ip、principal.asset.ip 直接从 SourceAddress 字段映射。
SourceHandleId src.resource.id 直接从 SourceHandleId 字段映射。
SourceModuleName observer.labels 以键值对的形式添加到具有“SourceModuleName”键的 observer.labels 数组中。
SourceModuleType observer.application 直接从 SourceModuleType 字段映射。
SourcePort principal.port 转换为整数。直接从 SourcePort 字段映射。
SourceProcessId src.process.pid 直接从 SourceProcessId 字段映射。
source_client_ip client_ip 直接映射到 client_ip 字段。
体育 principal.port 转换为整数。直接从运动字段映射。
src principal.ip、principal.asset.ip 直接从 src 字段映射。
ssid network.session_id 直接从 JSON 日志中的 ssid 字段映射。
ssidName additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“ssidName”。
state additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“state”。
状态 additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“Status”。
status_code network.http.response_code 转换为整数。直接从 status_code 字段映射。
SubjectDomainName principal.administrative_domain 直接从 SubjectDomainName 字段映射。
SubjectLogonId principal.resource.attribute.labels 以键值对的形式添加到正文.资源.属性.标签数组中,键为“SubjectLogonId”。
SubjectUserName principal.user.userid 直接从 SubjectUserName 字段映射。
SubjectUserSid principal.user.windows_sid 直接从 SubjectUserSid 字段映射。
targetHost target.hostname、target.asset.hostname 如果可能,则转换为 IP 地址。否则,系统会解析该值以提取主机名,并将其映射到 target.hostname 和 target.asset.hostname。
TargetHandleId target.resource.id 直接从 TargetHandleId 字段映射。
TargetLogonId principal.resource.attribute.labels 如果与 SubjectLogonId 不同,则以键值对的形式添加到 principal.resource.attribute.labels 数组中,键为“TargetLogonId”。
TargetProcessId target.process.pid 直接从 TargetProcessId 字段映射。
TargetUserName target.user.userid 直接从 TargetUserName 字段映射。
TargetUserSid target.user.windows_sid 直接从 TargetUserSid 字段映射。
任务 additional.fields 转换为字符串。以键值对的形式添加到键为“Task”的 additional.fields 数组中。
时间戳 metadata.event_timestamp seconds 字段用于创建时间戳。
ts metadata.event_timestamp 如果 ts 为空,则通过组合 tsDate、tsTime 和 tsTZ 来创建。如果包含“”,则会进行解析以提取整数值。然后,系统会使用各种格式将其解析为时间戳。
类型 security_result.summary、metadata.product_event_type 直接从 JSON 日志中的 type 字段映射。在某些情况下,也用作 eventSummary 和 metadata.product_event_type。
网址 target.url、principal.url 直接从网址字段映射。
url1 target.url 直接从 url1 字段映射。
用户 target.user.group_identifiers 已合并到 target.user.group_identifiers 数组中。
user_id target.user.userid 直接从 user_id 字段映射。
UserID principal.user.windows_sid 直接从 UserID 字段映射。
用户名 principal.user.userid 直接从 UserName 字段映射。
user_agent network.http.user_agent 直接从 user_agent 字段映射。
userId target.user.userid 直接从 userId 字段映射。
vap additional.fields 以键值对的形式添加到 additional.fields 数组中,键为“vap”。
VirtualAccount security_result.about.labels 以键值对的形式添加到 security_result.about.labels 数组中,键为“VirtualAccount”。
wiredLastSeen security_result.detection_fields 转换为字符串。以键值对的形式添加到 security_result.detection_fields 数组中,键为“wiredLastSeen”。
wiredMacs intermediary.mac 转换为小写。已合并到 intermediary.mac 数组中。
WorkstationName principal.hostname、principal.asset.hostname 直接从 WorkstationName 字段映射。

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