L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

performing-log-source-onboarding-in-siem

performing-log-source-onboarding-in-siem

在 SIEM 平台中执行结构化日志源接入,通过配置采集器、解析器、归一化和验证, 实现完整的安全可视化覆盖。

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: performing-log-source-onboarding-in-siem description: > 在 SIEM 平台中执行结构化日志源接入,通过配置采集器、解析器、归一化和验证, 实现完整的安全可视化覆盖。 domain: cybersecurity subdomain: soc-operations tags: [siem, log-onboarding, log-management, data-ingestion, parsing, normalization, soc] version: "1.0" author: mahipal license: Apache-2.0

执行 SIEM 日志源接入

概述

日志源接入(Log Source Onboarding)是将新数据源集成到 SIEM 平台以实现安全监控和检测的系统化过程。规范的接入流程需要规划数据源、配置采集 Agent、构建解析器、将字段归一化到通用 Schema,并验证数据质量。英国 NCSC 建议优先接入安全价值相对于摄入成本最高的日志源。

前置条件

  • 已部署 SIEM 平台(Splunk、Elastic、Sentinel、QRadar 或类似产品)
  • 源系统到 SIEM 采集器之间的网络访问
  • 目标系统的管理员权限,用于安装 Agent
  • 通用信息模型(CIM)或等效 Schema 文档
  • 针对生产系统变更的变更管理审批

日志源优先级框架

第一级 — 关键(优先接入)

来源日志类型安全价值
Active Directory安全事件日志认证、权限提升
防火墙流量日志网络访问、C2 检测
EDR/AV终端告警恶意软件、进程执行
VPN/远程访问连接日志未授权访问
DNS 服务器查询日志C2 信标、数据渗漏
邮件网关邮件安全日志网络钓鱼、商业邮件欺诈(BEC)

第二级 — 高优先级

来源日志类型安全价值
Web 代理HTTP/HTTPS 日志基于 Web 的攻击、数据渗漏
云平台(AWS/Azure/GCP)审计日志云安全态势
数据库服务器审计/查询日志数据访问、SQL 注入
DHCP/IPAM地址分配日志资产追踪
文件服务器访问日志数据访问监控

第三级 — 标准

来源日志类型安全价值
应用服务器应用日志应用层攻击
打印服务器打印日志数据丢失防护
门禁/物理访问门禁日志物理安全关联
网络设备(交换机/路由器)Syslog网络异常

接入流程

步骤 1:发现与评估

1. 识别日志源:
   - 系统类型和版本
   - 日志格式(syslog、CEF、JSON、Windows 事件等)
   - 日志量估算(EPS — 每秒事件数)
   - 网络位置和防火墙要求

2. 评估安全价值:
   - 该来源能帮助检测哪些威胁?
   - 覆盖哪些 MITRE ATT&CK 技术?
   - 是否已有 SIEM 解析器?

3. 估算摄入成本:
   - 每日量(GB)
   - License 影响(按 GB 或按 EPS 计费)
   - 存储保留要求

步骤 2:配置日志采集

基于 Syslog 的采集(防火墙、网络设备)

# rsyslog 接收 syslog 的配置
# /etc/rsyslog.d/10-siem-collection.conf

# UDP 接收
module(load="imudp")
input(type="imudp" port="514" ruleset="siem_forwarding")

# TCP 接收
module(load="imtcp")
input(type="imtcp" port="514" ruleset="siem_forwarding")

# TLS 接收
module(load="imtcp" StreamDriver.AuthMode="x509/name"
       StreamDriver.Mode="1" StreamDriver.Name="gtls")
input(type="imtcp" port="6514" ruleset="siem_forwarding")

ruleset(name="siem_forwarding") {
    # 转发到 SIEM
    action(type="omfwd" target="siem.company.com" port="9514"
           protocol="tcp" queue.type="LinkedList"
           queue.filename="siem_fwd" queue.maxdiskspace="1g"
           queue.saveonshutdown="on" action.resumeRetryCount="-1")
}

Windows 事件日志采集(Splunk Universal Forwarder)

# Splunk Universal Forwarder 上的 inputs.conf
[WinEventLog://Security]
disabled = 0
index = wineventlog
sourcetype = WinEventLog:Security
evt_resolve_ad_obj = 1
checkpointInterval = 5

[WinEventLog://System]
disabled = 0
index = wineventlog
sourcetype = WinEventLog:System

[WinEventLog://Microsoft-Windows-Sysmon/Operational]
disabled = 0
index = wineventlog
sourcetype = XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
renderXml = true

[WinEventLog://Microsoft-Windows-PowerShell/Operational]
disabled = 0
index = wineventlog
sourcetype = XmlWinEventLog:Microsoft-Windows-PowerShell/Operational

云日志采集(AWS CloudTrail)

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "CloudTrailToSIEM": {
      "Type": "AWS::CloudTrail::Trail",
      "Properties": {
        "TrailName": "siem-cloudtrail",
        "S3BucketName": "company-cloudtrail-logs",
        "IsLogging": true,
        "IsMultiRegionTrail": true,
        "IncludeGlobalServiceEvents": true,
        "EnableLogFileValidation": true,
        "EventSelectors": [
          {
            "ReadWriteType": "All",
            "IncludeManagementEvents": true,
            "DataResources": [
              {
                "Type": "AWS::S3::Object",
                "Values": ["arn:aws:s3"]
              }
            ]
          }
        ]
      }
    }
  }
}

步骤 3:解析与归一化

自定义解析器示例(Splunk props.conf/transforms.conf)

# props.conf
[custom:firewall:logs]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)
TIME_PREFIX = ^
TIME_FORMAT = %Y-%m-%dT%H:%M:%S%z
MAX_TIMESTAMP_LOOKAHEAD = 30
TRANSFORMS-firewall = firewall_extract_fields
FIELDALIAS-src = src_addr AS src_ip
FIELDALIAS-dst = dst_addr AS dest_ip
EVAL-action = case(fw_action=="allow", "allowed", fw_action=="deny", "blocked", true(), "unknown")
EVAL-vendor_product = "Custom Firewall"
LOOKUP-geo = geo_ip_lookup ip AS dest_ip OUTPUT country, city, latitude, longitude

# transforms.conf
[firewall_extract_fields]
REGEX = ^(\S+)\s+(\S+)\s+action=(\w+)\s+src=(\S+):(\d+)\s+dst=(\S+):(\d+)\s+proto=(\w+)\s+bytes=(\d+)
FORMAT = timestamp::$1 hostname::$2 fw_action::$3 src_addr::$4 src_port::$5 dst_addr::$6 dst_port::$7 protocol::$8 bytes::$9

CIM 字段映射

原始字段CIM 字段数据模型
src_addrsrc_ipNetwork_Traffic
dst_addrdest_ipNetwork_Traffic
dst_portdest_portNetwork_Traffic
fw_actionactionNetwork_Traffic
bytes_sent + bytes_recvbytesNetwork_Traffic
user_nameuserAuthentication
login_resultactionAuthentication
process_pathprocessEndpoint

步骤 4:验证数据质量

# 验证事件是否正在到达
index=new_source earliest=-1h
| stats count by sourcetype, host, source

# 检查字段提取质量
index=new_source earliest=-1h
| stats count(src_ip) as has_src count(dest_ip) as has_dest count(action) as has_action count by sourcetype
| eval src_coverage=round(has_src/count*100,1)
| eval dest_coverage=round(has_dest/count*100,1)
| eval action_coverage=round(has_action/count*100,1)

# 验证 CIM 合规性
| datamodel Network_Traffic search
| search sourcetype=new_sourcetype
| stats count by source, sourcetype

# 检查时间戳解析问题
index=new_source earliest=-1h
| eval time_diff=abs(_time - _indextime)
| stats avg(time_diff) as avg_lag max(time_diff) as max_lag by host
| where avg_lag > 300

步骤 5:启用检测覆盖

# 验证现有关联搜索是否适用于新来源
index=new_source sourcetype=new_sourcetype
| tstats count from datamodel=Authentication by _time span=1h
| timechart span=1h count

# 创建特定于该来源的检测规则
[New Source - Authentication Anomaly]
search = index=new_source sourcetype=new_sourcetype action=failure \
| stats count by src_ip, user \
| where count > 10

接入检查清单

  • 日志源已评估并获批
  • 网络连通性已验证
  • 采集 Agent/方式已配置
  • 日志转发已确认
  • 解析器/字段提取已配置
  • CIM 合规性已验证
  • 数据模型加速已启用
  • 数据量在 License 预算范围内
  • 保留策略已配置
  • 检测规则已启用/创建
  • 仪表板已更新
  • 文档已完成
  • SOC 团队已收到通知

参考资料

Skills enregistrées