如何安装和配置 VMware Carbon Black Cloud 系统日志连接器

Summary: 了解如何在基于 CentOS 或 Red Hat Enterprise Linux 的服务器上安装和配置 VMware Carbon Black Cloud 系统日志连接器。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

本文介绍在基于 Red Hat Enterprise Linux 的操作系统上安装、配置和验证 VMware Carbon Black Cloud 系统日志连接器的过程。


受影响的产品:

  • VMware Carbon Black Cloud

通过将数据从安全平台传输到集中式安全信息和事件管理 (SIEM) 解决方案,可以轻松管理多个安全产品。Carbon Black 允许通过 API 下载数据,转换为系统日志格式,然后转发到任意数量的 SIEM 解决方案。

VMware Carbon Black Standard 或更高版本允许配置 API,将此数据拉取到客户环境中,从而可以在自定义控制面板中使用高级规则集和数据。

VMware Carbon Black 的系统日志连接器支持基于 RPM 的 Linux 操作系统,如 Red Hat Enterprise Linux 或 CentOS。

要安装和配置系统日志连接器,管理员必须首先解决前提条件安装连接器,然后配置连接器。之后,管理员可以验证自动执行系统日志连接器。单击相应的过程以了解更多信息。

  1. 使用 SSH 登录到要安装系统日志连接器的 Linux 服务器。
    提醒:有关通过 SSH 连接的信息,请参阅 保护网络 此超链接会将您带往 Dell Technologies 之外的网站。
  2. 通过运行以下命令验证服务器是否为最新版本 sudo yum update的属性的形式向用户提供此功能。
  3. 必须添加存储库才能安装 PIP,因为 PIP 可能不在核心操作系统存储库中。键入 sudo yum install epel-release 分析文件,然后按 Enter 键。
    添加存储库
    提醒:如果 epel-release 未找到存储库,请通过运行以下命令添加存储库:
    • sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-[VERSION].noarch.rpm
    • sudo rpm -ql epel-release
    确保 [VERSION] 与您正在运行的 Red Hat Enterprise Linux 或 CentOS 版本匹配:
    • 如果运行的是 Red Hat Enterprise Linux 8 或 CentOS 8: sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    • 如果运行的是 Red Hat Enterprise Linux 7 或 CentOS 7: sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  4. 键入 Y 分析文件,然后按 Enter 键。
  5. 通过键入以下命令安装 PIP: sudo yum install python3 ,然后按 Enter 键。
    安装 PIP
  6. 通过键入以下命令安装 Python3 构建实用程序: sudo yum install gcc python3-devel ,然后按 Enter 键。
    安装 Python3 构建实用程序
  7. 通过键入以下命令更新主机操作系统中的所有软件包 sudo yum update ,然后按 Enter 键。
    更新所有软件包
  1. 在安装连接器的服务器上以具有 sudo 访问权限的帐户身份登录。
  2. 打开终端
  3. 键入 pip3 install cbc-syslog 分析文件,然后按 Enter 键。
    安装连接器
    提醒:
    • 本示例使用 CentOS 8 上的 PIP3。命令可能会因 Python 的版本以及使用的 PIP 版本而略有不同。
    • 如果不使用根权限安装,则默认安装位置为:
      • /usr/lib/python{version}/site-packages/cbc_syslog
    • 如果使用根权限安装,则默认安装位置为:
      • /usr/local/lib/python{version}/site-packages/cbc_syslog

管理员必须同时配置 VMware Carbon Black Cloud系统日志连接器本身。单击相应的过程以了解更多信息。

VMware Carbon Black Cloud

VMware Carbon Black Cloud 必须配置为使用系统日志连接器。管理员必须首先生成 API 和 SIEM 密钥,然后生成 API 通知。单击相应的过程以了解更多信息。

生成 API 和 SIEM 密钥

  1. 在网页浏览器中,转至 [REGION].conferdeploy.net。
  2. 登录到 VMware Carbon Black Cloud。
    登录 VMware Carbon Black Cloud
  3. 在左侧菜单窗格中,展开 Settings,然后单击 API Access
    API 访问
  4. 选择 Add API Key
    添加 API 密钥
  5. “Add API Key ”菜单中:
    1. 填充名称
    2. 填充描述
    3. 选择一个访问级别类型
    4. 填充应从 VMware Carbon Black Cloud 请求信息的外部授权 IP 地址
    5. 单击 Save
    “Add API Key”菜单
  6. “API Credentials”中
    1. 单击 API ID 右侧的剪贴板图标以将 ID 复制到剪贴板。
    2. 记录 API ID
    3. 单击 API 密钥右侧的剪贴板图标以将密钥复制到剪贴板。
    4. 记录 API 密钥
    5. 单击右上角的 X
    “API Credentials”菜单
  7. 选择 Add API Key
    添加 API 密钥
  8. “Add API Key ”菜单中:
    1. 填充名称
    2. 填充描述
    3. 选择一个访问级别类型
    4. 填充应从 VMware Carbon Black Cloud 请求信息的外部授权 IP 地址
    5. 单击 Save
    “Add API Key”菜单
  9. “API Credentials”中
    1. 单击 API ID 右侧的剪贴板图标以将 ID 复制到剪贴板。
    2. 记录 API ID
    3. 单击 API 密钥右侧的剪贴板图标以将密钥复制到剪贴板。
    4. 记录 API 密钥
    5. 单击右上角的 X
    “API Credentials”菜单

生成 API 通知

通过在 VMware Carbon Black Cloud 控制台中设置的通知,将信息发送到之前配置的 API。

  1. 在网页浏览器中,转至 [REGION].conferdeploy.net。
  2. 登录到 VMware Carbon Black Cloud。
    登录 VMware Carbon Black Cloud
  3. 在左侧菜单窗格中,展开 Settings,然后单击 Notifications
    通知
  4. 单击 Add Notification
    Add Notification
  5. “Add Notification ”菜单中:
    1. 填充名称
    2. 确定您希望何时收到通知
    3. 选择要通知的相应策略
    4. 填充用于接收通知的电子邮件地址,并选择每天为每种威胁类型仅发送 1 封电子邮件
    5. 使用之前生成的 API ID 填充 API 密钥
    6. 单击 Add
    “Add Notification”菜单
    提醒:使用 Carbon Black Enterprise EDR 的客户还可以指定通过 SIEM 发送的监视列表。这样可以实现更有针对性的信息收集方法。

系统日志连接器

  1. 通过 SSH 连接到托管系统日志连接器的服务器。
    提醒:
    • 有关使用 CentOS 8 通过 SSH 进行连接的信息,请参阅 保护网络此超链接会将您带往 Dell Technologies 之外的网站。
    • 有关通过 SSH 连接到 CentOS 7 的信息,请参阅 配置文件此超链接会将您带往 Dell Technologies 之外的网站。
  2. 通过键入以下命令生成系统日志输出的备份目录: sudo mkdir /tmp/output/ 分析文件,然后按 Enter 键。
    生成备份目录
  3. 通过键入以下命令创建配置文件: sudo touch /tmp/cbsyslog-config.txt 分析文件,然后按 Enter 键。
    创建配置文件
  4. 通过键入以下命令创建日志文件: sudo touch /tmp/cbsyslog-log.log 分析文件,然后按 Enter 键。
    创建日志文件
  5. 通过键入以下命令,使用 nano 和 sudo 权限打开之前创建的配置文件 sudo nano /tmp/cbsyslog-config.txt 分析文件,然后按 Enter 键。
    打开配置文件
  6. 复制 以下文本,然后将其 粘贴 到文本编辑器中。
    [general]
    # Template for syslog output.
    # This is a jinja 2 template
    # NOTE: The source variable corresponds to the Carbon Black Cloud Server used to retrieve results
    template = {{source}} {{version}}|{{vendor}}|{{product}}|{{dev_version}}|{{signature}}|{{name}}|{{severity}}|{{extension}}
    
    #Location of the Backup Directory
    #This will be the location of back up files in the event that results fail to send to Syslog
    back_up_dir = /tmp/output/
    
    # This sets the default severity level for POLICY_ACTION notifications.  By default it is 4.
    # 0 - Emergency: System is unusable.
    # 1 - Alert: Action must be taken immediately.
    # 2 - Critical: Critical conditions.
    # 3 - Error: Error conditions.
    # 4 - Warning: Warning conditions.
    # 5 - Notice: Normal but significant condition.
    # 6 - Informational: Informational messages.
    # 7 - Debug: Debug-level messages.
    policy_action_severity = 4
    
    # Output format of the data sent. Currently support json or cef formats
    # Warning: if using json output_format, we recommend NOT using UDP output_type
    output_format=cef
    
    # Configure the specific output.
    # Valid options are: 'udp', 'tcp', 'tcp+tls', 'http'
    #  udp     - Have the events sent over a UDP socket
    #  tcp     - Have the events sent over a TCP socket
    #  tcp+tls - Have the events sent over a TLS+TCP socket
    #  http    - Have the events sent over a HTTP connection
    output_type=tcp
    # tcpout=IP:port - ie 1.2.3.5:514
    tcp_out=
    # udpout=IP:port - ie 1.2.3.5:514
    #udp_out=
    # httpout=http/https endpoint - ie https://server.company.com/endpoint
    # http_headers= {'key1': 'value1', 'key2': 'value2'} - ie {'content-type': 'application/json'}
    # https_ssl_verify = True or False
    #http_out=
    #http_headers= {'content-type': 'application/json'}
    #https_ssl_verify=True
    # Override ca file for self signed certificates when using https
    # This is typically a .pem file
    #requests_ca_cert=/usr/share/cb/integrations/cbc-syslog/cert.pem
    
    [tls]
    # Specify a file containing PEM-encoded CA certificates for verifying the peer server when using TLS+TCP syslog
    #ca_cert = /etc/cb/integrations/cbc-syslog/ca.pem
    # Optionally specify a file containing PEM-encoded client certificate for verifying this client when using TLS+TCP syslog
    # If cert is specified, key is a required parameter
    #cert = /etc/cb/integrations/cbc-syslog/cert.pem
    # Optionally specify a file containing PEM-encoded private key for verifying this client when using TLS+TCP syslog
    # If key is specified, cert is a required parameter
    #key = /etc/cb/integrations/cbc-syslog/cert.key
    # Optionally specify the password to decrypt the given private key when using TLS+TCP syslog
    #key_password = p@ssw0rd1
    # Uncomment tls_verify and set to "false" in order to disable verification of the peer server certificate
    #tls_verify = true
    
    [CarbonBlackCloudServer1]
    # Carbon Black Cloud API Connector ID
    api_connector_id = EXAMP13
    # Carbon Black Cloud API Key
    api_key = EXAMP13EXAMP13EXAMP13
    # Carbon Black Cloud SIEM Connector ID
    siem_connector_id = EXAMP131234
    # Carbon Black Cloud SIEM Key
    siem_api_key = EXAMP13EXAMP13EXAMP13
    # Carbon Black Cloud Server URL
    # NOTE: this is not the url to the web ui, but to the API URL
    # For more than one Carbon Black Cloud Server, add another server using the following template including the stanza
    #[CarbonBlackCloudServer2]
    #api_connector_id = KJARWBZ111
    #api_key = CQF35EIH2WDF69PTWKGC4111
    #server_url = https://defense-prod05.conferdeploy.net
    
  7. 要使用 TCP 发送输出,请使用以下命令填充 主机端口output_type 设置为 TCP的属性的形式向用户提供此功能。
    设置发送到 TCP 的输出
    提醒:示例图像已编辑设置。
  8. 更新 api_connector_idapi_key 根据 API 类型的 API ID 和 API 类型的 API 密钥
    更新 api_connector_id 和 api_key
    提醒:有关 API 和 SIEM 密钥创建位置的信息,请参阅上面的 “生成 API 和 SIEM 密钥 ”部分。
  9. 更新 siem_connector_idsiem_api_key 根据 SIEM 类型的 API ID 和 SIEM 类型的 API 密钥
    更新 siem_connector_id 和 siem_api_key
    提醒:有关 API 和 SIEM 密钥创建位置的信息,请参阅上面的 “生成 API 和 SIEM 密钥 ”部分。
  10. 按住 CTRL 键,然后按 X 键保存文件。按 Ctrl 键确认保存文件 Y的属性的形式向用户提供此功能。
    保存文件
  11. 通过按 Enter 键确认文件名。
    确认文件名

管理员必须 测试然后 验证 来自系统日志连接器的输出。单击相应的过程以了解更多信息。

测试

  1. 从 Linux 服务器打开终端
  2. 键入 sudo python[VER] [INSTALLDIRECTORY]/cbc_syslog.py -l [LOGFILELOCATION] -c [CONFIGFILELOCATION] 分析文件,然后按 Enter 键。
    提醒:
    • [VER] = Python 的版本
    • [INSTALLDIRECTORY] = 安装系统日志连接器的目录
    • [LOGFILELOCATION] = 日志文件的位置
    • [CONFIGFILELOCATION] = 配置文件的位置

示例:

sudo python3 /usr/local/lib/python3.6/site-packages/cbc_syslog/cbc_syslog.py -l /tmp/cbsyslog-log.log -c /tmp/cbsyslog-config.txt

测试输出
此命令基于定义的配置文件对系统日志连接器执行一次性运行,并输出到定义的日志文件。

执行测试运行后,根据测试选项中生成的日志文件检查输出。检查日志文件以确认连接成功或失败。

验证

  1. 从 Linux 服务器打开终端。
  2. 键入 cat [LOGFILELOCATION] 分析文件,然后按 Enter 键。
    提醒: [LOGFILELOCATION] = 日志文件的位置

示例:

cat /tmp/cbsyslog-log.log

成功运行会返回类似于以下内容的响应:

Carbon Black Cloud Syslog 2.0
Carbon Black Cloud Syslog 2.0
Found 1 Carbon Black Cloud Servers in config file
Handling notifications for https://defense-prod05.conferdeploy.net
Sending Notifications
Done Sending Notifications
Sending Audit Logs
Done Sending Audit Logs

示例响应

接收 SIEM 或系统日志实例会在在 VMware Carbon Black Cloud 控制台中输出自通知创建以来发生的所有事件。

在已配置的 SIEM 或系统日志服务器中验证是否正确捕获了信息。这因每个应用程序而异。

可以使用 cron 自动运行系统日志连接器以定期拉取信息。

  1. 通过键入以下命令生成用于自动化的脚本 sudo nano /tmp/cbsyslogrun.sh 分析文件,然后按 Enter 键。
    生成用于自动化执行的脚本
    提醒:该示例生成一个 shell 脚本 /tmp/cbsyslogrun.sh的属性的形式向用户提供此功能。
  2. 复制验证部分中使用的验证脚本,然后将该脚本粘贴到文本编辑器中。
    粘贴脚本
  3. 按 CTRL+X 以退出。
  4. 在提示保存时按 Y 继续,以保存更改。
    保存更改
  5. 通过键入以下内容更新脚本以允许其作为脚本运行 sudo chmod a+x /tmp/cbsyslogrun.sh 分析文件,然后按 Enter 键。
    更新脚本
  6. 打开 crontab 文件,通过键入以下命令将脚本添加为自动化任务: sudo crontab -e 分析文件,然后按 Enter 键。
  7. Crontab 利用基于 VI 的语法来编辑文本。按 Insert 键以添加字符。
  8. 键入 */[MINUTES] * * * * /tmp/cbsyslogrun.sh ,然后按 ESC 取消文本插入阶段。
    添加字符
    提醒:
    • [MINUTES] = 再次运行命令之前要等待的分钟数
    • 在示例图片中,该示例每 15 分钟运行一次。
  9. 按冒号 (:) 键以输入命令。
  10. 键入 wq ,然后按 Enter 键写入并退出 crontab 编辑器。
  11. 通过键入以下命令确认更改: sudo crontab -l 分析文件,然后按 Enter 键。
  12. 验证列表中是否显示计划的任务(步骤 7)。如果显示任务,则已配置自动化。如果未显示任务,请转至步骤 13。
    验证计划的任务
  13. 键入 sudo systemctl start crond.service 分析文件,然后按 Enter 键。
  14. 键入 sudo systemctl enable crond.service 分析文件,然后按 Enter 键。
  15. 键入 sudo crontab -l 分析文件,然后按 Enter 键。
    第二次验证计划的任务
  16. 验证计划的任务出现在列表中。

要联系支持部门,请参阅 Dell Data Security 国际支持电话号码
转至 TechDirect,在线生成技术支持请求。
要获得更多见解和资源,请加入戴尔安全社区论坛

Affected Products

VMware Carbon Black
Article Properties
Article Number: 000193497
Article Type: How To
Last Modified: 01 Aug 2024
Version:  10
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.