收集 Juniper NetScreen 防火墙日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何设置 Juniper NetScreen 防火墙日志以将其发送到 Google Security Operations。解析器使用 Grok 模式提取字段,处理各种 syslog 格式和 JSON 载荷。然后,它会将这些提取的字段映射到 UDM,并根据是否存在 IP 地址、用户名和端口等特定字段将事件归类为网络连接、用户登录、状态更新或通用事件。
准备工作
- 确保您拥有对 Juniper NetScreen 防火墙的管理员权限。
- 确保您拥有 Google Security Operations 实例。
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
- 下载注入身份验证文件。将文件安全地保存在将要安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 配置文件。
- 复制并保存组织详细信息部分中的客户 ID。
安装 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: tcplog: # Replace the port and IP address as required listen_address: "0.0.0.0:54525" 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: SYSLOG namespace: juniper_firewall raw_log_field: body service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - tcplog 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
配置 Juniper Networks NetScreen 防火墙
- 登录 Juniper NetScreen 网页界面。
- 依次选择配置> 报告设置 > 日志设置。
- 选中所有事件严重程度复选框。
- 点击应用。
- 依次选择配置> 报告设置 > Syslog。
- 选中启用 syslog 消息复选框。
- 在源接口列表中,选择需要发送 syslog 数据包的 NetScreen 接口。
- 在 Syslog 服务器部分,选中启用复选框,然后提供以下信息:
- IP/主机名:输入
Bindplane
IP 地址。 - 端口:输入
Bindplane
端口号。 - MDR 设备:选择 Local0 设备级别。
- 设备:选择 Local0 设备级别。
- IP/主机名:输入
- 点击应用。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
ACTION |
security_result.action_details |
直接从通过 GROK 和 KV 过滤器提取的 ACTION 字段映射。 |
APPLICATION |
principal.application |
直接从通过 GROK 和 KV 过滤器提取的 APPLICATION 字段映射。 |
application |
target.application |
直接从通过 GROK 提取的 application 字段映射。 |
attack-name |
security_result.threat_name |
直接从通过 GROK 提取的 attack-name 字段映射。 |
bytes-from-client |
network.sent_bytes |
直接从通过 GROK 提取的 bytes-from-client 字段映射。 |
bytes-from-server |
network.received_bytes |
直接从通过 GROK 提取的 bytes-from-server 字段映射。 |
command |
target.process.command_line |
直接从通过 GROK 提取的 command 字段映射。 |
destination-address |
target.ip |
直接从通过 GROK 提取的 destination-address 字段映射。 |
destination-port |
target.port |
直接从通过 GROK 提取的 destination-port 字段映射。 |
destination-zone |
additional.fields[].value.string_value |
直接从通过 GROK 和 KV 过滤器提取的 destination-zone 字段映射。将 key 设置为 destination-zone 。 |
destination_zone-name |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 destination_zone-name 字段映射。将 key 设置为 dstzone 。 |
dst-nat-rule-name |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 dst-nat-rule-name 字段映射。将 key 设置为 dst-nat-rule-name 。 |
dst-nat-rule-type |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 dst-nat-rule-type 字段映射。将 key 设置为 dst-nat-rule-type 。 |
elapsed-time |
network.session_duration.seconds |
直接从通过 GROK 提取的 elapsed-time 字段映射。 |
encrypted |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 encrypted 字段映射。将 key 设置为 encrypted 。 |
event_time |
metadata.event_timestamp |
系统会使用各种 GROK 模式从原始日志中提取时间戳,优先级依次为 event_time 、TIMESTAMP_ISO8601 和 SYSLOGTIMESTAMP 。然后,将其转换为时间戳对象。 |
host |
principal.hostname ,intermediary.hostname |
如果 type 为 NetScreen ,则映射到 intermediary.hostname 。否则,映射到 principal.hostname 。 |
host_ip |
intermediary.ip |
直接从通过 GROK 提取的 host_ip 字段映射。 |
icmp-type |
network.icmp_type |
直接从通过 GROK 提取的 icmp-type 字段映射。 |
ident |
target.application |
直接从通过 GROK 和 JSON 过滤器提取的 ident 字段映射。 |
inbound-bytes |
network.received_bytes |
直接从通过 GROK 提取的 inbound-bytes 字段映射。 |
inbound-packets |
network.received_packets |
直接从通过 GROK 提取的 inbound-packets 字段映射。 |
ip |
principal.ip ,intermediary.ip |
如果 type 为 NetScreen ,则映射到 intermediary.ip 。否则,映射到 principal.hostname 。 |
message |
security_result.description |
如果消息是 JSON 格式且不包含 log_message_data 字段,则使用 message 字段作为说明。 |
msg_data |
security_result.summary |
直接从通过 GROK 提取的 msg_data 字段映射。 |
nat-destination-address |
target.nat_ip |
直接从通过 GROK 提取的 nat-destination-address 字段映射。 |
nat-destination-port |
target.nat_port |
直接从通过 GROK 提取的 nat-destination-port 字段映射。 |
nat-source-address |
principal.nat_ip |
直接从通过 GROK 提取的 nat-source-address 字段映射。 |
nat-source-port |
principal.nat_port |
直接从通过 GROK 提取的 nat-source-port 字段映射。 |
outbound-bytes |
network.sent_bytes |
直接从通过 GROK 提取的 outbound-bytes 字段映射。 |
outbound-packets |
network.sent_packets |
直接从通过 GROK 提取的 outbound-packets 字段映射。 |
packets-from-client |
network.sent_packets |
直接从通过 GROK 提取的 packets-from-client 字段映射。 |
packets-from-server |
network.received_packets |
直接从通过 GROK 提取的 packets-from-server 字段映射。 |
packet-incoming-interface |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 packet-incoming-interface 字段映射。将 key 设置为 packet-incoming-interface 。 |
pid |
target.process.pid |
直接从通过 GROK 和 JSON 过滤器提取的 pid 字段映射。 |
policy-name |
security_result.rule_name |
直接从通过 GROK 提取的 policy-name 字段映射。 |
PROFILE |
additional.fields[].value.string_value |
直接从通过 GROK 和 KV 过滤器提取的 PROFILE 字段映射。将 key 设置为 PROFILE 。 |
protocol-id ,protocol-name |
network.ip_protocol |
通过 GROK 从 protocol-id 或 protocol-name 字段提取并映射。该值会转换为相应的 IP 协议枚举。 |
REASON |
additional.fields[].value.string_value |
直接从通过 GROK 和 KV 过滤器提取的 REASON 字段映射。将 key 设置为 REASON 。 |
reason |
security_result.description |
直接从通过 GROK 提取的 reason 字段映射。 |
rule-name |
security_result.rule_name |
直接从通过 GROK 提取的 rule-name 字段映射。 |
SESSION_ID |
network.session_id |
直接从通过 GROK 和 KV 过滤器提取的 SESSION_ID 字段映射。 |
service-name |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 service-name 字段映射。将 key 设置为 srvname 。 |
source-address |
principal.ip |
直接从通过 GROK 提取的 source-address 字段映射。 |
source-port |
principal.port |
直接从通过 GROK 提取的 source-port 字段映射。 |
source-zone |
additional.fields[].value.string_value |
直接从通过 GROK 和 KV 过滤器提取的 source-zone 字段映射。将 key 设置为 source-zone 。 |
source_zone-name |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 source_zone-name 字段映射。将 key 设置为 srczone 。 |
src-nat-rule-name |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 src-nat-rule-name 字段映射。将 key 设置为 src-nat-rule-name 。 |
src-nat-rule-type |
security_result.detection_fields[].value |
直接从通过 GROK 提取的 src-nat-rule-type 字段映射。将 key 设置为 src-nat-rule-type 。 |
subtype |
metadata.product_event_type |
直接从通过 GROK 提取的 subtype 字段映射。 |
threat-severity |
security_result.severity_details |
直接从通过 GROK 提取的 threat-severity 字段映射。 |
time |
metadata.event_timestamp |
直接从通过 GROK 和 JSON 过滤器提取的 time 字段映射。转换为时间戳对象。 |
username |
target.user.userid |
直接从通过 GROK 提取的 username 字段映射。 |
metadata.log_type |
硬编码为 JUNIPER_FIREWALL 。根据 type 字段硬编码为 JUNIPER_FIREWALL 或 NetScreen 。硬编码为 JUNIPER_FIREWALL 。根据解析器中的逻辑设置为 ALLOW 或 BLOCK。根据 subtype 和 severity_details 字段设置为 LOW、MEDIUM、HIGH、INFORMATIONAL 或 CRITICAL。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。