收集 WatchGuard EDR 日志

支持的平台:

本文档介绍了如何使用 Google Cloud Storage V2 将 WatchGuard EDR 日志注入到 Google Security Operations。

WatchGuard EDR(以前称为 Panda Adaptive Defense)是一个云端管理的端点检测和响应平台,可提供高级威胁防护、行为分析和威胁搜寻功能。WatchGuard Cloud API 可让您以编程方式访问安全事件数据,包括检测结果、攻击指标和威胁情报日志。

准备工作

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

  • Google SecOps 实例
  • 已启用 Cloud Storage API 的 GCP 项目
  • 创建和管理 GCS 存储分区的权限
  • 管理 GCS 存储分区的 IAM 政策的权限
  • 创建 Cloud Run 服务、Pub/Sub 主题和 Cloud Scheduler 作业的权限
  • 具有管理员权限的 WatchGuard Cloud 控制台特权访问权限
  • WatchGuard Cloud API 密钥或 OAuth2 凭据

创建 Google Cloud Storage 存储桶

  1. 前往 Google Cloud 控制台
  2. 选择您的项目或创建新项目。
  3. 在导航菜单中,依次前往 Cloud Storage > 存储分区
  4. 点击创建存储分区
  5. 提供以下配置详细信息:

    设置
    为存储桶命名 输入一个全局唯一的名称(例如 watchguard-edr-logs
    位置类型 根据您的需求进行选择(区域级、双区域、多区域)
    位置 选择营业地点(例如 us-central1
    存储类别 标准(建议用于经常访问的日志)
    访问权限控制 均匀(推荐)
    保护工具 可选:启用对象版本控制或保留政策
  6. 点击创建

收集 WatchGuard EDR API 凭据

获取 API 凭据

  1. 以管理员身份登录 WatchGuard Cloud 控制台。
  2. 依次前往管理 > 受管访问权限
  3. 点击 API 访问权限,或前往 API 密钥管理部分。
  4. 点击 Generate API Key
  5. 输入 API 密钥的名称(例如 Google SecOps Integration)。
  6. 复制以下详细信息并将其保存在安全的位置:

    • API 密钥 ID:API 访问密钥
    • API Secret:API 密钥
    • 账号 ID:您的 WatchGuard Cloud 账号 ID

确定 API 基准网址

WatchGuard Cloud API 基准网址取决于您的数据中心区域:

区域 API 基本网址
美国 https://api.usa.cloud.watchguard.com
欧盟 https://api.eu.cloud.watchguard.com

测试 API 访问权限

  • 在继续进行集成之前,请先测试您的凭据:

    # Replace with your actual credentials
    WG_API_KEY="your-api-key-id"
    WG_API_SECRET="your-api-secret"
    WG_ACCOUNT_ID="your-account-id"
    WG_BASE_URL="https://api.usa.cloud.watchguard.com"
    
    # Get access token
    TOKEN=$(curl -s -X POST "${WG_BASE_URL}/oauth/token" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=client_credentials&client_id=${WG_API_KEY}&client_secret=${WG_API_SECRET}&scope=api-access" \
      | jq -r '.access_token')
    
    # Test API access - list indicators
    curl -s -X GET "${WG_BASE_URL}/rest/aether/v1/accounts/${WG_ACCOUNT_ID}/indicators?$top=1" \
      -H "Authorization: Bearer ${TOKEN}"
    

为 Cloud Run 函数创建服务账号

Cloud Run 函数需要一个服务账号,该账号具有写入 GCS 存储桶的权限,并且可以由 Pub/Sub 调用。

创建服务账号

  1. GCP 控制台中,依次前往 IAM 和管理 > 服务账号
  2. 点击创建服务账号
  3. 提供以下配置详细信息:
    • 服务账号名称:输入 watchguard-edr-logs-collector-sa
    • 服务账号说明:输入 Service account for Cloud Run function to collect WatchGuard EDR logs
  4. 点击创建并继续
  5. 向此服务账号授予对项目的访问权限部分中,添加以下角色:
    1. 点击选择角色
    2. 搜索并选择 Storage Object Admin
    3. 点击 + 添加其他角色
    4. 搜索并选择 Cloud Run Invoker
    5. 点击 + 添加其他角色
    6. 搜索并选择 Cloud Functions Invoker
  6. 点击继续
  7. 点击完成

必须拥有这些角色,才能:

  • Storage Object Admin:将日志写入 GCS 存储桶并管理状态文件
  • Cloud Run Invoker:允许 Pub/Sub 调用函数
  • Cloud Functions Invoker:允许调用函数

授予对 GCS 存储桶的 IAM 权限

向服务账号授予对 GCS 存储桶的写入权限:

  1. 前往 Cloud Storage > 存储分区
  2. 点击您的存储桶名称(例如 watchguard-edr-logs)。
  3. 前往权限标签页。
  4. 点击授予访问权限
  5. 提供以下配置详细信息:
    • 添加主账号:输入服务账号电子邮件地址(例如 watchguard-edr-logs-collector-sa@PROJECT_ID.iam.gserviceaccount.com
    • 分配角色:选择 Storage Object Admin
  6. 点击保存

创建 Pub/Sub 主题

创建一个 Pub/Sub 主题,Cloud Scheduler 将向该主题发布消息,而 Cloud Run 函数将订阅该主题。

  1. GCP 控制台中,前往 Pub/Sub > 主题
  2. 点击创建主题
  3. 提供以下配置详细信息:
    • 主题 ID:输入 watchguard-edr-logs-trigger
    • 将其他设置保留为默认值
  4. 点击创建

创建 Cloud Run 函数以收集日志

Cloud Run 函数将由来自 Cloud Scheduler 的 Pub/Sub 消息触发,以从 WatchGuard Cloud API 中提取日志并将其写入 GCS。

  1. GCP 控制台中,前往 Cloud Run
  2. 点击创建服务
  3. 选择函数(使用内嵌编辑器创建函数)。
  4. 配置部分中,提供以下配置详细信息:

    设置
    Service 名称 watchguard-edr-logs-collector
    区域 选择与您的 GCS 存储桶匹配的区域(例如 us-central1
    运行时 选择 Python 3.12 或更高版本
  5. 触发器(可选)部分中:

    1. 点击 + 添加触发器
    2. 选择 Cloud Pub/Sub
    3. 选择 Cloud Pub/Sub 主题部分,选择主题 watchguard-edr-logs-trigger
    4. 点击保存
  6. 身份验证部分中:

    1. 选择需要进行身份验证
    2. 检查 Identity and Access Management (IAM)
  7. 向下滚动并展开容器、网络、安全性

  8. 前往安全性标签页:

    • 服务账号:选择服务账号 watchguard-edr-logs-collector-sa
  9. 前往容器标签页:

    1. 点击变量和密钥
    2. 为每个环境变量点击+ 添加变量
    变量名称 示例值 说明
    GCS_BUCKET watchguard-edr-logs GCS 存储桶名称
    GCS_PREFIX watchguard 日志文件的前缀
    STATE_KEY watchguard/state.json 状态文件路径
    WG_API_KEY your-api-key-id WatchGuard Cloud API 密钥 ID
    WG_API_SECRET your-api-secret WatchGuard Cloud API 密钥
    WG_ACCOUNT_ID your-account-id WatchGuard Cloud 账号 ID
    WG_API_BASE https://api.usa.cloud.watchguard.com WatchGuard Cloud API 基本网址
    MAX_RECORDS 5000 每次运行的记录数上限
    PAGE_SIZE 1000 每页记录数
    LOOKBACK_HOURS 24 初始回溯期
  10. 变量和 Secret 部分中,向下滚动到请求

    • 请求超时:输入 600 秒(10 分钟)
  11. 前往设置标签页:

    • 资源部分中:
      • 内存:选择 512 MiB 或更高值
      • CPU:选择 1
  12. 修订版本伸缩部分中:

    • 实例数下限:输入 0
    • 实例数上限:输入 100(或根据预期负载进行调整)
  13. 点击创建

  14. 等待服务创建完成(1-2 分钟)。

  15. 创建服务后,系统会自动打开内嵌代码编辑器

添加函数代码

  1. 入口点字段中输入 main
  2. 在内嵌代码编辑器中,创建两个文件:

    • main.py:

      import functions_framework
      from google.cloud import storage
      import json
      import os
      import urllib3
      from datetime import datetime, timezone, timedelta
      import time
      
      # Initialize HTTP client with timeouts
      http = urllib3.PoolManager(
        timeout=urllib3.Timeout(connect=5.0, read=30.0),
        retries=False,
      )
      
      # Initialize Storage client
      storage_client = storage.Client()
      
      # Environment variables
      GCS_BUCKET = os.environ.get('GCS_BUCKET')
      GCS_PREFIX = os.environ.get('GCS_PREFIX', 'watchguard')
      STATE_KEY = os.environ.get('STATE_KEY', 'watchguard/state.json')
      WG_API_KEY = os.environ.get('WG_API_KEY')
      WG_API_SECRET = os.environ.get('WG_API_SECRET')
      WG_ACCOUNT_ID = os.environ.get('WG_ACCOUNT_ID')
      WG_API_BASE = os.environ.get('WG_API_BASE', 'https://api.usa.cloud.watchguard.com')
      MAX_RECORDS = int(os.environ.get('MAX_RECORDS', '5000'))
      PAGE_SIZE = int(os.environ.get('PAGE_SIZE', '1000'))
      LOOKBACK_HOURS = int(os.environ.get('LOOKBACK_HOURS', '24'))
      
      def parse_datetime(value: str) -> datetime:
        """Parse ISO datetime string to datetime object."""
        if value.endswith("Z"):
          value = value[:-1] + "+00:00"
        return datetime.fromisoformat(value)
      
      def get_access_token():
        """
        Obtain OAuth2 access token using client credentials grant.
        """
        api_base = WG_API_BASE.rstrip('/')
        token_url = f"{api_base}/oauth/token"
      
        headers = {
          'Content-Type': 'application/x-www-form-urlencoded',
          'Accept': 'application/json'
        }
      
        body = (
          f"grant_type=client_credentials"
          f"&client_id={WG_API_KEY}"
          f"&client_secret={WG_API_SECRET}"
          f"&scope=api-access"
        )
      
        backoff = 1.0
        for attempt in range(3):
          response = http.request('POST', token_url, body=body, headers=headers)
      
          if response.status == 429:
            retry_after = int(response.headers.get('Retry-After', str(int(backoff))))
            print(f"Rate limited (429) on token request. Retrying after {retry_after}s...")
            time.sleep(retry_after)
            backoff = min(backoff * 2, 30.0)
            continue
      
          if response.status != 200:
            raise RuntimeError(f"Failed to get access token: {response.status} - {response.data.decode('utf-8')}")
      
          data = json.loads(response.data.decode('utf-8'))
          return data['access_token']
      
        raise RuntimeError("Failed to get access token after 3 retries")
      
      @functions_framework.cloud_event
      def main(cloud_event):
        """
        Cloud Run function triggered by Pub/Sub to fetch WatchGuard EDR
        security event logs and write to GCS.
      
        Args:
          cloud_event: CloudEvent object containing Pub/Sub message
        """
      
        if not all([GCS_BUCKET, WG_API_KEY, WG_API_SECRET, WG_ACCOUNT_ID]):
          print('Error: Missing required environment variables')
          return
      
        try:
          bucket = storage_client.bucket(GCS_BUCKET)
      
          # Load state
          state = load_state(bucket, STATE_KEY)
      
          # Determine time window
          now = datetime.now(timezone.utc)
          last_time = None
      
          if isinstance(state, dict) and state.get("last_event_time"):
            try:
              last_time = parse_datetime(state["last_event_time"])
              # Overlap by 2 minutes to catch any delayed events
              last_time = last_time - timedelta(minutes=2)
            except Exception as e:
              print(f"Warning: Could not parse last_event_time: {e}")
      
          if last_time is None:
            last_time = now - timedelta(hours=LOOKBACK_HOURS)
      
          print(f"Fetching logs from {last_time.isoformat()} to {now.isoformat()}")
      
          # Get access token
          token = get_access_token()
      
          # Fetch logs from multiple endpoints
          all_records = []
          newest_event_time = None
      
          for endpoint_type in ['indicators', 'threats']:
            records, newest_time = fetch_logs(
              token=token,
              endpoint_type=endpoint_type,
              start_time=last_time,
              end_time=now,
              page_size=PAGE_SIZE,
              max_records=MAX_RECORDS,
            )
            all_records.extend(records)
            if newest_time:
              if newest_event_time is None or parse_datetime(newest_time) > parse_datetime(newest_event_time):
                newest_event_time = newest_time
      
          if not all_records:
            print("No new log records found.")
            save_state(bucket, STATE_KEY, now.isoformat())
            return
      
          # Write to GCS as NDJSON
          timestamp = now.strftime('%Y%m%d_%H%M%S')
          object_key = f"{GCS_PREFIX}/logs_{timestamp}.ndjson"
          blob = bucket.blob(object_key)
      
          ndjson = '\n'.join([json.dumps(record, ensure_ascii=False) for record in all_records]) + '\n'
          blob.upload_from_string(ndjson, content_type='application/x-ndjson')
      
          print(f"Wrote {len(all_records)} records to gs://{GCS_BUCKET}/{object_key}")
      
          # Update state with newest event time
          if newest_event_time:
            save_state(bucket, STATE_KEY, newest_event_time)
          else:
            save_state(bucket, STATE_KEY, now.isoformat())
      
          print(f"Successfully processed {len(all_records)} records")
      
        except Exception as e:
          print(f'Error processing logs: {str(e)}')
          raise
      
      def load_state(bucket, key):
        """Load state from GCS."""
        try:
          blob = bucket.blob(key)
          if blob.exists():
            state_data = blob.download_as_text()
            return json.loads(state_data)
        except Exception as e:
          print(f"Warning: Could not load state: {e}")
      
        return {}
      
      def save_state(bucket, key, last_event_time_iso: str):
        """Save the last event timestamp to GCS state file."""
        try:
          state = {'last_event_time': last_event_time_iso}
          blob = bucket.blob(key)
          blob.upload_from_string(
            json.dumps(state, indent=2),
            content_type='application/json'
          )
          print(f"Saved state: last_event_time={last_event_time_iso}")
        except Exception as e:
          print(f"Warning: Could not save state: {e}")
      
      def fetch_logs(token: str, endpoint_type: str, start_time: datetime, end_time: datetime, page_size: int, max_records: int):
        """
        Fetch security event logs from WatchGuard Cloud API
        with OData-style pagination and rate limiting.
      
        Args:
          token: OAuth2 access token
          endpoint_type: API endpoint type (indicators, threats)
          start_time: Start time for log query
          end_time: End time for log query
          page_size: Number of records per page
          max_records: Maximum total records to fetch
      
        Returns:
          Tuple of (records list, newest_event_time ISO string)
        """
        api_base = WG_API_BASE.rstrip('/')
        endpoint = f"{api_base}/rest/aether/v1/accounts/{WG_ACCOUNT_ID}/{endpoint_type}"
      
        headers = {
          'Authorization': f'Bearer {token}',
          'Accept': 'application/json',
          'User-Agent': 'GoogleSecOps-WatchGuardEDRCollector/1.0'
        }
      
        records = []
        newest_time = None
        page_num = 0
        skip = 0
        backoff = 1.0
      
        start_iso = start_time.strftime('%Y-%m-%dT%H:%M:%SZ')
        end_iso = end_time.strftime('%Y-%m-%dT%H:%M:%SZ')
      
        while True:
          page_num += 1
      
          if len(records) >= max_records:
            print(f"Reached max_records limit ({max_records}) for {endpoint_type}")
            break
      
          url = f"{endpoint}?$top={min(page_size, max_records - len(records))}&$skip={skip}&$filter=date ge {start_iso} and date le {end_iso}&$orderby=date asc"
      
          try:
            response = http.request('GET', url, headers=headers)
      
            # Handle rate limiting with exponential backoff
            if response.status == 429:
              retry_after = int(response.headers.get('Retry-After', str(int(backoff))))
              print(f"Rate limited (429). Retrying after {retry_after}s...")
              time.sleep(retry_after)
              backoff = min(backoff * 2, 30.0)
              continue
      
            backoff = 1.0
      
            if response.status != 200:
              print(f"HTTP Error: {response.status}")
              response_text = response.data.decode('utf-8')
              print(f"Response body: {response_text}")
              return records, newest_time
      
            data = json.loads(response.data.decode('utf-8'))
      
            page_results = data.get('value', data.get('data', []))
      
            if not page_results:
              print(f"No more results (empty page) for {endpoint_type}")
              break
      
            print(f"{endpoint_type} page {page_num}: Retrieved {len(page_results)} events")
      
            # Add endpoint type for identification
            for event in page_results:
              event['_wg_log_type'] = endpoint_type
      
            records.extend(page_results)
      
            # Track newest event time
            for event in page_results:
              try:
                event_ts = event.get('date') or event.get('timestamp') or event.get('createdAt')
                if event_ts:
                  event_time = str(event_ts)
                  if newest_time is None or parse_datetime(event_time) > parse_datetime(newest_time):
                    newest_time = event_time
              except Exception as e:
                print(f"Warning: Could not parse event time: {e}")
      
            # Check for more results
            if len(page_results) < page_size:
              print(f"No more pages for {endpoint_type} (last page not full)")
              break
      
            skip += len(page_results)
      
          except Exception as e:
            print(f"Error fetching {endpoint_type} logs: {e}")
            return records, newest_time
      
        print(f"Retrieved {len(records)} total {endpoint_type} records from {page_num} pages")
        return records, newest_time
      
    • requirements.txt:

      functions-framework==3.*
      google-cloud-storage==2.*
      urllib3>=2.0.0
      
  3. 点击部署以保存并部署该函数。

  4. 等待部署完成(2-3 分钟)。

创建 Cloud Scheduler 作业

Cloud Scheduler 会定期向 Pub/Sub 主题发布消息,从而触发 Cloud Run 函数。

  1. GCP Console 中,前往 Cloud Scheduler
  2. 点击创建作业
  3. 提供以下配置详细信息:

    设置
    名称 watchguard-edr-logs-collector-hourly
    区域 选择与 Cloud Run 函数相同的区域
    频率 0 * * * *(每小时一次,整点时)
    时区 选择时区(建议选择世界协调时间 [UTC])
    目标类型 Pub/Sub
    主题 选择主题 watchguard-edr-logs-trigger
    消息正文 {}(空 JSON 对象)
  4. 点击创建

时间表频率选项

根据日志量和延迟时间要求选择频次:

频率 Cron 表达式 使用场景
每隔 5 分钟 */5 * * * * 大批量、低延迟
每隔 15 分钟 */15 * * * * 搜索量中等
每小时 0 * * * * 标准(推荐)
每 6 小时 0 */6 * * * 低成交量、批处理
每天 0 0 * * * 历史数据收集

测试集成

  1. Cloud Scheduler 控制台中,找到您的作业。
  2. 点击强制运行以手动触发作业。
  3. 等待几秒钟。
  4. 前往 Cloud Run > 服务
  5. 点击 watchguard-edr-logs-collector
  6. 点击日志标签页。
  7. 验证函数是否已成功执行。请查找以下内容:

    Fetching logs from YYYY-MM-DDTHH:MM:SS+00:00 to YYYY-MM-DDTHH:MM:SS+00:00
    indicators page 1: Retrieved X events
    threats page 1: Retrieved X events
    Wrote X records to gs://watchguard-edr-logs/watchguard/logs_YYYYMMDD_HHMMSS.ndjson
    Successfully processed X records
    
  8. 前往 Cloud Storage > 存储分区

  9. 点击您的存储桶名称 (watchguard-edr-logs)。

  10. 转到 watchguard/ 文件夹。

  11. 验证是否已创建具有当前时间戳的新 .ndjson 文件。

如果您在日志中看到错误,请执行以下操作:

  • HTTP 401:检查环境变量中的 API 凭据
  • HTTP 403:在 WatchGuard Cloud 控制台中验证 API 密钥是否具有所需权限
  • HTTP 429:速率限制 - 函数将自动重试并进行退避
  • 缺少环境变量:检查是否已设置所有必需的变量

在 Google SecOps 中配置 Feed 以注入 WatchGuard EDR 日志

  1. 依次前往 SIEM 设置 > Feed
  2. 点击添加新 Feed
  3. 点击配置单个 Feed
  4. Feed 名称字段中,输入 Feed 的名称(例如 WatchGuard EDR Logs)。
  5. 选择 Google Cloud Storage V2 作为来源类型
  6. 选择 WatchGuard EDR 作为日志类型
  7. 点击获取服务账号。系统会显示一个唯一的服务账号电子邮件地址,例如:

    chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com
    
  8. 复制此电子邮件地址。

  9. 点击下一步

  10. 为以下输入参数指定值:

    • 存储桶网址:输入带有前缀路径的 GCS 存储桶 URI:

      gs://watchguard-edr-logs/watchguard/
      
      • 替换:
        • watchguard-edr-logs:您的 GCS 存储桶名称。
        • watchguard:存储日志的可选前缀/文件夹路径(留空表示根目录)。
    • 来源删除选项:根据您的偏好选择删除选项:

      • 永不:转移后永不删除任何文件(建议用于测试)。
      • 删除已转移的文件:在成功转移后删除文件。
      • 删除已转移的文件和空目录:成功转移后删除文件和空目录。

    • 文件存在时间上限:包含在过去指定天数内修改的文件(默认值为 180 天)

    • 资产命名空间资产命名空间

    • 注入标签:要应用于此 Feed 中事件的标签

  11. 点击下一步

  12. 最终确定界面中查看新的 Feed 配置,然后点击提交

向 Google SecOps 服务账号授予 IAM 权限

Google SecOps 服务账号需要您的 GCS 存储桶的 Storage Object Viewer 角色。

  1. 前往 Cloud Storage > 存储分区
  2. 点击您的存储桶名称。
  3. 前往权限标签页。
  4. 点击授予访问权限
  5. 提供以下配置详细信息:
    • 添加主账号:粘贴 Google SecOps 服务账号电子邮件地址
    • 分配角色:选择 Storage Object Viewer
  6. 点击保存

UDM 映射表

日志字段 UDM 映射 逻辑
about.asset.asset_id 设置为 device_vendor.device_product:deviceExternalId
about.file.full_path 如果 filePath 不为空,则为 filePath 中的值;否则,如果 file_is_not_hash,则为 _hash 中的值;否则,如果 file_is_not_hash,则为 fileHash 中的值
about.file.size 如果大于 0,则为 fsize 中的值
about.hostname 来自 dvchost 的值
about.ip 在 IP 验证后从 dvc 数组合并
about.mac 如果 dvcmac 是有效的 MAC,则取自 dvcmac;否则,如果 slot 不存在,则取自 dvc_mac
about.nat_ip 来自 deviceTranslatedAddress 的值
about.process.command_line 如果不存在,则使用主题中的值;否则,使用 Emne;否则,使用路径
about.process.pid 来自 dvcpid 的值
about.resource.attribute.permissions 来自 filePermission 的值
about.resource.attribute.labels 来自 resource_Type_label 的值
additional.fields 从各种 additional_* 标签(例如 additional_eventId、additional_devicePayloadId 等)合并而来。
metadata.collected_timestamp 如果 alertDateTime 采用 ISO 格式,则取自该值;否则,如果 AlertDate 采用 ISO 格式,则取自该值;否则,如果 Received 采用 ISO 格式,则取自该值;否则,如果 Generated 采用 ISO 格式,则取自该值
metadata.description 来自消息的值
metadata.event_timestamp 如果采用 ISO 格式,则为 Date 中的值
metadata.event_type 如果 file_full_path 不为空,则设置为“PROCESS_UNCATEGORIZED”;否则,如果 event_name 位于 LogSpyware 或 LogPredictiveMachineLearning 中,则设置为“SCAN_UNCATEGORIZED”;否则,如果 has_principal 为 true,则设置为“STATUS_UPDATE”;否则设置为“GENERIC_EVENT”
metadata.product_event_type 如果 huntingRule 中的值不为空,则使用该值;否则,使用 ThreatType 中的值;否则,使用 device_event_class_id - event_name 中的值;否则,使用 device_event_class_id 中的值;否则,使用 event_name 中的值
metadata.product_log_id 如果 pandaAlertId 不为空,则取自 pandaAlertId;否则取自 externalId
metadata.product_name 对于 JSON,设置为“ALERTS”,否则从 device_product 中获取
metadata.product_version 来自 device_version 的值
metadata.url_back_to_product 来自 directLink 的值
metadata.vendor_name 对于 JSON,设置为“WATCHGUARD”,否则设置为 device_vendor
network.application_protocol 如果 app_protocol_output 不为空,则使用该值
network.direction 如果 deviceDirection == 0,则设置为“INBOUND”;如果 == 1,则设置为“OUTBOUND”
network.http.method 来自 requestMethod 的值
network.http.user_agent 来自 requestClientApplication 的值
network.ip_protocol 如果 ip_protocol_out 不为空,则使用该值
network.received_bytes 如果大于 0,则为“in”中的值,且为整数
network.sent_bytes 如果输出值大于 0 且为整数,则使用输出值
principal.administrative_domain 如果 sntdom 不为空,则取自 sntdom;否则,取自 Domain;否则,取自 Domene
principal.application 来自 sourceServiceName 的值
principal.asset.asset_id 如果 MUID 不为空,则返回 MUID 中的值
principal.asset.hostname 如果 machineName 不为空,则取自 machineName;否则取自 HostName;否则取自 SourceMachineName;否则取自 MachineName
principal.asset.ip 如果 HostIp 不为空,则合并自 HostIp;否则,合并自 SourceIP;否则,合并自 MachineIP
principal.asset.product_object_id 来自 ClientId 的值
principal.group.group_display_name 如果 Group_name 不为空,则使用 Group_name 中的值,否则使用 Gruppenavn
principal.hostname 如果 machineName 不为空,则取自 machineName;否则,如果 temp_dhost 不为空,则取自 temp_dhost;否则,如果 IP 验证失败,则取自 shost;否则,取自 Device_name;否则,取自 Enhetsnavn
principal.ip 如果 principal_ip 是有效的 IP,则取自该变量;否则,如果 src 是有效的 IP,则取自该变量
principal.mac 如果 MAC 有效,则来自 smac 的值
principal.nat_ip 如果 sourceTranslatedAddress 是有效的 IP,则使用该值
principal.nat_port 如果大于 0,则为 sourceTranslatedPort 中的值
principal.port 如果为整数且不为 0,则为来自 SPT 的值
principal.process.command_line 来自存储过程的值
principal.process.pid 来自 spid 的值
principal.user.attribute.roles 来自 spriv 的值
principal.user.user_display_name 如果不是以 { 开头,则取自 suser;否则,如果 SourceUserName 不为空,则取自 SourceUserName;否则,如果 CustomerName 不为空,则取自 CustomerName
principal.user.userid 如果 contents.0.LoggedUser 不为空,则取自该值并将 event_type 设置为 USER_UNCATEGORIZED;否则,取自 temp_duid;否则,取自 User;否则,取自 Bruker
security_result.action 如果 act 为 accept/notified 或 outcome 为 REDIRECTED_USER_MAY_PROCEED 或 categoryOutcome 为 Success 或 cs2 为 Allow,则设置为“ALLOW”;如果 act 为 deny/blocked 或 outcome 为 BLOCKED 或 categoryOutcome 为 Failure 或 cs2 为 Denied,则设置为“BLOCK”;如果 outcome 为 Failure,则设置为“FAIL”
security_result.action_details 来自 act 的值,否则来自 Action_Taken
security_result.attack_details.tactics 如果非空,则从 tactics_data 合并
security_result.attack_details.techniques 如果非空,则从 technique_data 合并
security_result.category_details 来自猫的值
security_result.description 如果 msg_data_2 不为空,则取自 msg_data_2;否则取自 THRuleName;否则取自 Type;否则取自 Scan_Type
security_result.detection_fields 从 operation_label、operasjon_label、permission_label、tillatelse_label、infection_channel_label、spyware_Grayware_Type_label、threat_probability_label 合并
security_result.rule_name 来自 mwProfile 的值
security_result.severity 如果严重程度为 1,则设置为“INFORMATIONAL”;如果为 2,则设置为“LOW”;如果为 3,则设置为“MEDIUM”;如果为 4,则设置为“HIGH”;如果为 5,则设置为“CRITICAL”;否则,如果严重程度为 0/1/2,则设置为“LOW”;如果为 3/4/5/INFO,则设置为“MEDIUM”;如果为 6/7/SEVERE,则设置为“HIGH”;如果为 8/9/10/VERY-HIGH,则设置为“CRITICAL”
security_result.summary 来自 appcategory 的值,否则为结果
security_result.threat_name 如果间谍软件的值不为空,则为该值;否则为 Virus_Malware_Name;否则为 Unknown_Threat
src.file.full_path 来自 oldFilePath 的值
src.file.size 如果 oldFileSize 大于 0,则使用该值
target.administrative_domain 来自 dntdom 的值
target.application 来自 destinationServiceName 的值
target.file.full_path 来自 ItemPath 的值
target.file.md5 如果小写成功,则为 ItemHash 中的值
target.hostname 如果 temp_dhost 不为空,则使用该值
target.ip 如果 dst_ip 是有效的 IP,则使用 dst_ip 中的值
target.mac 如果 MAC 有效,则来自 dmac 的值
target.nat_ip 如果 IP 有效,则为 destination_translated_address 中的值
target.nat_port 如果为整数,则为 destinationTranslatedPort 中的值
target.port 如果为整数且在范围内,则为 dpt 中的值
target.process.command_line 来自 dproc 的值
target.process.file.full_path 如果 contents.0.ChildPath 不为空,则返回该值;否则,返回 file_full_path
target.process.file.md5 如果小写成功,则值为 contents.0.ChildMd5
target.process.file.names 如果 file_name 不为空,则从 file_name 合并
target.process.parent_process.file.full_path 来自 contents.0.ParentPath 的值
target.process.parent_process.file.md5 如果小写成功,则为 contents.0.ParentMd5 的值
target.process.parent_process.file.names 如果 parent_file_name 不为空,则从中合并
target.process.parent_process.pid 来自 contents.0.ParentPID 的值
target.process.pid 来自 dpid 的值
target.resource.attribute.labels 来自 DriveType_label、ServiceLevel_label 的值
target.url 请求中的值
target.user.user_display_name 来自 temp_duser 的值
target.user.userid 如果 temp_duid 不为空,则使用该值

更新日志

查看相应解析器的更改日志

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