收集 Sophos Intercept EDR 日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 收集 Sophos Intercept EDR 日志。解析器从 Sophos EDR JSON 日志中提取字段,并将其转换为统一数据模型 (UDM)。它会解析 message
字段,将 Sophos 字段映射到 UDM 字段(例如,将 suser
映射到 principal.user.userid
),根据字段是否存在执行条件合并,并根据 type
字段对事件进行分类,设置相应的 UDM 事件类型和安全结果操作。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows 2016 或更高版本,或者具有
systemd
的 Linux 主机 - 一台额外的 Windows 或 Linux 机器,能够持续运行 Python
- 如果通过代理运行,请确保防火墙端口已根据 Bindplane 代理要求打开
- 对 Sophos Central 管理控制台的特权访问权限
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
- 下载注入身份验证文件。将文件安全地保存在将要安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 个人资料。
- 复制并保存组织详细信息部分中的客户 ID。
安装 Bindplane 代理
按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。
Windows 安装
- 以管理员身份打开命令提示符或 PowerShell。
运行以下命令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安装资源
- 如需了解其他安装选项,请参阅此安装指南。
配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps
访问配置文件:
- 找到
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: 'SOPHOS_EDR' 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。 - 将
/path/to/ingestion-authentication-file.json
更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart bindplane-agent
如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:
net stop BindPlaneAgent && net start BindPlaneAgent
配置 Sophos Central API 访问权限
- 登录 Sophos Central Admin。
- 依次选择全局设置 > API 令牌管理。
- 点击添加令牌以创建新令牌。
- 输入令牌名称,然后点击保存;系统会显示所提供令牌的 API 令牌摘要。
- 在 API 令牌摘要部分,点击复制以复制 API 访问网址和标头。
在其他机器上安装 Python
- 打开网络浏览器,然后前往 Python 网站。
- 点击适用于您所用操作系统的 Download Python。
安装 Python:
- 在 Windows 上:
- 运行安装程序。
- 勾选显示 Add Python to PATH 的复选框。
- 点击立即安装。
在 Mac 上:
- Python 可能已安装,如果没有,您可以使用终端安装最新版本。
打开终端,然后输入以下命令:
python --version
- 在 Windows 上:
下载 Sophos 集成脚本
- 前往 Sophos Central SIEM Integration GitHub Repository 的 GitHub 页面。
- 依次点击绿色的“Code”按钮 >“Download ZIP”。
- 解压缩 ZIP 文件。
设置脚本配置
- 打开解压缩 ZIP 归档文件的目录中的
config.ini
文件。 - 修改配置文件:
- API 令牌:输入之前从 Sophos Central 复制的 API 密钥。
- Syslog 服务器详细信息:输入 Syslog 服务器的详细信息。
- 主机:输入 BindPlane 代理 IP 地址。
- 端口:输入 BindPlane 代理端口号。
- 协议:输入 UDP(您也可以根据自己的设置使用 TCP 或 TLS)。
- 保存文件。
运行脚本
前往脚本文件夹。
在 Windows 上:
- 按 Windows 键,然后输入
cmd
。 - 点击命令提示符。
- 前往脚本文件夹:
cd C:/Users/YourName/Downloads/Sophos-Central-SIEM-Integration
- 按 Windows 键,然后输入
在 macOS 上:
- 依次前往应用 > 实用程序。
- 打开终端。
- 前往脚本文件夹:
cd /Users/YourName/Downloads/Sophos-Central-SIEM-Integration
运行脚本:
输入以下命令以启动脚本:
python siem.py
自动执行脚本,使其在 Windows 上持续运行(使用任务调度程序):
- 在“开始”菜单中输入任务计划程序,打开“任务计划程序”。
- 点击创建任务。
- 在常规标签页中:
- 为任务命名(例如,
Sophos AV Log Export
)。
- 为任务命名(例如,
- 在触发器标签页中:
- 点击新建,然后将任务设置为每天或启动时运行(具体取决于您的偏好)。
- 在操作标签页中:
- 点击新建,然后选择启动计划。
- 浏览以查找
python.exe
可执行文件(通常位于C:/Python/XX/python.exe
)。 - 在添加实参字段中,输入脚本的路径(例如
C:/Users/YourName/Downloads/Sophos-Central-SIEM-Integrationsiem.py
)。
- 点击确定以保存任务。
自动执行脚本,使其在 Mac 上持续运行(使用 Cron 作业):
- 打开终端。
- 输入
crontab -e
并按 Enter 键。 在文件末尾添加新行:
* * * * * /usr/bin/python /Users/YourName/Downloads/Sophos-Central-SIEM-Integration/siem.py
点击保存,然后退出编辑器。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
appSha256 |
principal.process.file.sha256 |
原始日志中的 appSha256 值会分配给此 UDM 字段。 |
core_remedy_items.items[].descriptor |
principal.process.file.names |
原始日志中 core_remedy_items 的 items 数组中每个 descriptor 的值都会作为单独的 names 条目添加到 UDM 中。 |
customer_id |
target.resource.id |
原始日志中的 customer_id 值会分配给此 UDM 字段。 |
detection_identity_name |
security_result.threat_feed_name |
原始日志中的 detection_identity_name 值会分配给此 UDM 字段。 |
dhost |
target.hostname |
原始日志中的 dhost 值会分配给此 UDM 字段。 |
endpoint_id |
target.resource.attribute.labels[].value |
原始日志中的 endpoint_id 值会分配为 target.resource.attribute.labels 中某个标签的值。相应标签的键为“endpoint_id”。 |
endpoint_type |
target.resource.attribute.labels[].value |
原始日志中的 endpoint_type 值会分配为 target.resource.attribute.labels 中某个标签的值。相应标签的键为“endpoint_type”。 |
filePath |
target.file.full_path |
原始日志中的 filePath 值会分配给此 UDM 字段。 |
group |
principal.group.group_display_name |
原始日志中的 group 值会分配给此 UDM 字段。 |
id |
target.process.pid |
原始日志中的 id 值会分配给此 UDM 字段。 |
name |
metadata.description |
原始日志中的 name 值会分配给此 UDM 字段。该值是通过解析器中的条件逻辑从原始日志的 type 字段派生出来的。默认值为 NETWORK_UNCATEGORIZED 。 特定的 type 值会映射到不同的 UDM 事件类型(例如,“UpdateSuccess”映射到 STATUS_UPDATE ,“ServiceNotRunning”映射到 SERVICE_STOP ,等等)。硬编码为“SOPHOS_EDR”。原始日志中的 type 值会分配给此 UDM 字段。硬编码为“Sophos EDR”。硬编码为“SOPHOS”。 |
rt |
metadata.event_timestamp ,timestamp |
系统会解析原始日志中的 rt 值(表示事件时间),并使用该值填充 UDM 中的 metadata.event_timestamp 和顶级 timestamp 字段。 |
security_result.severity |
security_result.severity |
原始日志中的 severity 值会转换为大写,并分配给此 UDM 字段。 |
source_info.ip |
principal.ip |
原始日志中 source_info 内的 ip 值会分配给此 UDM 字段。 |
suser |
principal.user.userid |
原始日志中的 suser 值会分配给此 UDM 字段。 |
threat |
security_result.threat_name |
原始日志中的 threat 值会分配给此 UDM 字段。 |
security_result.action |
该值派生自原始日志中的 type 字段。如果 type 包含“Blocked”或“Warn”(不区分大小写),则该值设置为“BLOCK”。如果 type 包含“Allow”(不区分大小写),则该值设置为“ALLOW”。如果原始日志中的 type 字段为“ScheduledDataUploadResumed”或“ScheduledDailyLimitExceeded”,则该值设置为“TASK”。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。