收集 Citrix StoreFront 日志

支持的语言:

本文档介绍了如何使用 Bindplane 将 Citrix StoreFront 日志注入到 Google Security Operations。解析器从 Citrix StoreFront Windows 事件日志格式的日志中提取字段。它使用 Windows 事件日志收集功能来解析日志消息,然后将这些值映射到统一数据模型 (UDM)。它还会为事件来源和类型设置默认元数据值。解析器通过使用一系列 grok 模式将消息字段分解为 SessionUserAppInstanceAppConnectionMachine 等各个实体,从 Citrix StoreFront JSON 日志中提取数据。然后,它会将提取的字段映射到统一数据模型 (UDM) 结构,并根据条件逻辑和数据转换,使用网络、委托人、中介和目标信息来丰富该结构。

准备工作

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

  • Google SecOps 实例。
  • 搭载 systemd 的 Windows 2016 或更高版本的主机,Bindplane 将安装在此主机上
  • 如果通过代理运行,请确保防火墙端口已根据 Bindplane 代理要求打开
  • 对 Citrix StoreFront 服务器和管理控制台的特权访问权限
  • 对托管 StoreFront 的 Windows 服务器的管理员访问权限

获取 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
    

其他安装资源

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

配置 Bindplane 代理以注入 Windows 事件日志并将其发送到 Google SecOps

  1. 访问配置文件:

    1. 找到 config.yaml 文件。通常,它位于 Linux 上的 /etc/bindplane-agent/ 目录中,或位于 Windows 上的安装目录中。
    2. 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
      windowseventlog/storefront:
        channel: Application
        operators:
          - type: filter
            expr: 'record["source_name"] matches "^Citrix"'
    
    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: 'C:/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: CUSTOMER_ID_PLACEHOLDER
        endpoint: malachiteingestion-pa.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'CITRIX_STOREFRONT'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/storefront:
          receivers:
            - windowseventlog/storefront
          exporters:
            - chronicle/chronicle_w_labels
    

重启 Bindplane 代理以应用更改

  1. 如需在 Windows 中重启 BindPlane 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

配置 StoreFront 事件日志记录

  1. 以管理员权限登录 StoreFront Server
  2. 以管理员身份打开 PowerShell
  3. 加载 StoreFront PowerShell 模块:

    Add-PSSnapin Citrix.DeliveryServices.Framework.Commands
    
  4. 启用详细日志记录以进行问题排查(可选):

    Set-STFDiagnostics -All -TraceLevel "Info" -confirm:$False
    
  5. 验证 Windows 事件日志记录是否已启用:

    • 在 StoreFront 服务器上打开事件查看器
    • 依次前往应用程序和服务日志 > Citrix Delivery Services
    • 验证是否正在为身份验证服务、商店和 Receiver for Web 网站记录事件。

可选:配置事件日志节流

  1. 导航到 StoreFront 配置目录:
    • 身份验证服务:C:/inetpub/wwwroot/Citrix/Authentication
    • 商店:C:/inetpub/wwwroot/Citrixstorename
    • 网站接收器:C:/inetpub/wwwroot/Citrixstorename/Web
  2. 使用文本编辑器打开每个目录中的 web.config 文件。
  3. 找到记录器元素,然后根据需要进行配置:

    <logger duplicateInterval="00:01:00" duplicateLimit="10">
    
  4. duplicateInterval:设置以小时、分钟和秒为单位的时间段,用于监控重复的日志条目。

  5. duplicateLimit:设置必须在指定时间间隔内记录的重复条目数,以触发日志限制。

  6. 保存配置文件。

验证日志收集

  1. 在 StoreFront 服务器上打开 Windows 事件查看器
  2. 依次前往 Windows 日志 > 应用程序应用程序和服务日志 > Citrix Delivery Services
  3. 验证 StoreFront 事件是否正在生成。
  4. 检查 Bindplane 代理日志,确认日志是否正在转发到 Google SecOps。

UDM 映射表

日志字段 UDM 映射 逻辑
App.PublishedName _principal.application 该值取自 App.PublishedName 字段。
Connection.ClientAddress _principal.asset.ip 该值取自 Connection.ClientAddress 字段。
Connection.ClientName _principal.asset.hostname 该值取自 Connection.ClientName 字段。
Connection.ClientPlatform _principal.asset.platform_software.platform 该值取自 Connection.ClientPlatform 字段,并转换为大写。如果值为“WINDOWS”“MAC”或“LINUX”,则直接使用。否则,该值设置为“UNKNOWN_PLATFORM”。
Connection.ConnectedViaHostName src.hostname 该值取自 Connection.ConnectedViaHostName 字段。
Connection.LaunchedViaHostName _intermediary.hostname 该值取自 Connection.LaunchedViaHostName 字段。命名空间设置为“StoreFront 服务器”。
Connection.LaunchedViaIPAddress _intermediary.ip 该值取自 Connection.LaunchedViaIPAddress 字段。
Connection.Protocol network.application_protocol 该值取自 Connection.Protocol 字段。如果值为“HDX”,则将其设置为“UNKNOWN_APPLICATION_PROTOCOL”。
Machine.AgentVersion metadata.product_version 该值取自 Machine.AgentVersion 字段。
Machine.AssociatedUserNames _intermediary.user.userid 该值取自 Machine.AssociatedUserNames 字段。系统会提取每个名称,并将其用作中间用户对象的 userid。
Machine.AssociatedUserUPNs _target.group.email_addresses 该值取自 Machine.AssociatedUserUPNs 字段。系统会提取每个电子邮件地址,并将其添加到目标群组的 email_addresses 字段中。
Machine.ControllerDnsName _intermediary.hostname 该值取自 Machine.ControllerDnsName 字段。命名空间设置为“Controller”。
Machine.CreatedDate _target.asset.attribute.creation_time 该值取自 Machine.CreatedDate 字段,并转换为时间戳。
Machine.DesktopGroupId _target.group.product_object_id 该值取自 Machine.DesktopGroupId 字段。
Machine.DnsName _target.asset.network_domain 该值取自 Machine.DnsName 字段。
Machine.HostedMachineName _target.asset.hostname 该值取自 Machine.HostedMachineName 字段。
Machine.HostingServerName _intermediary.hostname 该值取自 Machine.HostingServerName 字段。命名空间设置为“Hypervisor”。
Machine.IPAddress _target.asset.ip 该值取自 Machine.IPAddress 字段。
Machine.LastDeregisteredDate _target.asset.last_discover_time 该值取自 Machine.LastDeregisteredDate 字段,并转换为时间戳。
Machine.ModifiedDate _target.asset.system_last_update_time 该值取自 Machine.ModifiedDate 字段,并转换为时间戳。
Machine.Name _target.asset.asset_id, _target.administrative_domain 该值取自 Machine.Name 字段,并拆分为网域和资产部分。网域部分用作目标管理网域,资源部分用于构建格式为“machine:”的目标资源 ID。
Machine.OSType _target.asset.platform_software.platform_version 该值取自 Machine.OSType 字段。
Machine.PoweredOnDate _target.asset.last_boot_time 该值取自 Machine.PoweredOnDate 字段,并转换为时间戳。
Machine.RegistrationStateChangeDate _target.asset.first_discover_time 该值取自 Machine.RegistrationStateChangeDate 字段,并转换为时间戳。
Session.EndDate _vulns.last_found 该值取自 Session.EndDate 字段,并转换为时间戳。
Session.LifecycleState extensions.auth.auth_details 该值取自 Session.LifecycleState 字段。如果值为 0,则设置为“ACTIVE”。如果值为 1,则设置为“DELETED”。如果值为 2 或 3,则设置为“UNKNOWN_AUTHENTICATION_STATUS”。
Session.LogOnDuration network.session_duration.seconds 该值取自 Session.LogOnDuration 字段,并转换为整数。
Session.SessionKey network.session_id 该值取自 Session.SessionKey 字段。
Session.StartDate _vulns.first_found 该值取自 Session.StartDate 字段,并转换为时间戳。
User.Domain _principal.user.company_name, _principal.administrative_domain 该值取自 User.Domain 字段,同时用作主用户的公司名称和主管理网域。
User.FullName _principal.user.user_display_name 该值取自 User.FullName 字段。
User.Sid _principal.user.windows_sid 该值取自 User.Sid 字段。
User.Upn _principal.user.email_addresses 该值取自 User.Upn 字段,并添加到主用户的 email_addresses 字段中。
User.UserName _principal.user.userid 该值取自 User.UserName 字段。
metadata.event_type 该值设置为“USER_LOGIN”。
metadata.vendor_name 该值设置为“Citrix”。
metadata.product_name 该值设置为“Monitor Service OData”。
extensions.auth.type 该值设置为“MACHINE”。
_intermediary.namespace 该值会根据中介对象设置为“StoreFront 服务器”“控制器”或“Hypervisor”。
_target.asset.type 该值设置为“WORKSTATION”。

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