McAfee Web Gateway のログを収集する

以下でサポートされています。

このドキュメントでは、Bindplane エージェントを使用して McAfee Web Gateway ログを Google Security Operations に取り込む方法について説明します。パーサーは、SYSLOG + KV(CEF)、JSON、RAW 形式のログからフィールドを抽出します。grok フィルタと csv フィルタを使用して、さまざまなログ構造を解析し、フィールド名を正規化します。次に、抽出されたフィールドを Unified Data Model(UDM)スキーマにマッピングし、さまざまなエッジケースとデータ不整合を処理して、統合された出力を生成します。

始める前に

次の前提条件を満たしていることを確認します。

  • Google SecOps インスタンス
  • Windows 2016 以降、または systemd を使用する Linux ホスト
  • プロキシの背後で実行されている場合、ファイアウォール ポートが開いている
  • McAfee Web Gateway への特権アクセス

Google SecOps の取り込み認証ファイルを取得する

  1. Google SecOps コンソールにログインします。
  2. [SIEM 設定] > [コレクション エージェント] に移動します。
  3. Ingestion Authentication File をダウンロードします。Bindplane をインストールするシステムにファイルを安全に保存します。

Google SecOps のお客様 ID を取得する

  1. Google SecOps コンソールにログインします。
  2. [SIEM 設定] > [プロファイル] に移動します。
  3. [組織の詳細情報] セクションから [お客様 ID] をコピーして保存します。

Bindplane エージェントをインストールする

Windows のインストール

  1. 管理者として コマンド プロンプトまたは PowerShell を開きます。
  2. 次のコマンドを実行します。

    msiexec /i `https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi` /quiet
    

Linux のインストール

  1. root 権限または sudo 権限でターミナルを開きます。
  2. 次のコマンドを実行します。

    sudo sh -c `$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)` install_unix.sh
    

その他のインストール リソース

その他のインストール オプションについては、インストール ガイドをご覧ください。

Syslog を取り込んで Google SecOps に送信するように Bindplane エージェントを構成する

  1. 構成ファイルにアクセスします。
    • config.yaml ファイルを見つけます。通常、Linux では /etc/bindplane-agent/ ディレクトリに、Windows ではインストール ディレクトリにあります。
    • テキスト エディタ(nanovi、メモ帳など)を使用してファイルを開きます。
  2. 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: '/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: MCAFEE_WEBPROXY
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 自社のインフラストラクチャでの必要性に応じて、ポートと IP アドレスを置き換えます。

  4. <customer_id> は、実際の顧客 ID に置き換えます。

  5. /path/to/ingestion-authentication-file.json の値を、Google SecOps の取り込み認証ファイルを取得するで認証ファイルを保存したパスに更新します。

Bindplane エージェントを再起動して変更を適用する

  • Linux で Bindplane エージェントを再起動するには、次のコマンドを実行します。

    sudo systemctl restart bindplane-agent
    
  • Windows で Bindplane エージェントを再起動するには、サービス コンソールを使用するか、次のコマンドを入力します。

    net stop BindPlaneAgent && net start BindPlaneAgent
    

McAfee Web Gateway で Syslog を構成する

  1. McAfee Web Gateway ウェブ UI にログインします。
  2. [Policy>Rule Sets] に移動します。
  3. [ログ ハンドラ] をクリックし、[デフォルト] ルールセットを開いて、ネストされた [CEF Syslog] ルールセットを選択します。
  4. [Send to Syslog] ルールを有効にします。
  5. [変更を保存] をクリックします。
  6. [構成> アプライアンス > ログファイル マネージャー > 設定] に移動します。
  7. [監査ログを syslog に書き込む] を選択します。
  8. [Configuration > File Editor] に移動します。
  9. ファイル ツリーで rsyslog.conf を選択します。
  10. ファイルを次のように編集します。
    • *.info;mail.none;authpriv.none;cron.none /var/log/messages(または類似の行)を見つけます。
    • この行にデーモンを追加し、パス情報の前に -(ダッシュ)を挿入します。*.info;daemon.!=info;mail.none;authpriv.none;cron.none -/var/log/messages
  11. ファイルの末尾に新しい行を追加して、情報メッセージを Bindplane エージェントの IP アドレスに送信します。

    • UDP 経由の syslog の場合:

      daemon.info;auth.=info @<bindplane-server-ip>:<bindplane-port>
      
    • TCP 経由の syslog の場合:

      daemon.info;auth.=info @@<bindplane-server-ip>:<bindplane-port>
      

サポートされている McAfee Web Gateway のサンプルログ

  • Syslog + CEF

    <30>Nov 7 07:59:54 proxy-host-01 mwg: CEF:0|McAfee|Web Gateway|7.1|200|Proxy-Default Allow|2|
        rt=Nov 07 2018 07:59:54
        cat=Access Log
        src=10.0.0.5
        dhost=api.google-dummy.com
        requestMethod=GET
        request=http://api.google-dummy.com/v1/projects/jobs?key\=MASKED_API_KEY
        app=HTTP
        cs3=HTTP/1.1
        cs3Label=Protocol/Version
        spt=57065
        cs2=Internet Services
        cs2Label=URL Category
        cs6=Minimal Risk
        cs6Label=Reputation
        fileType=application/json
        in=2122
        out=893
        requestClientApplication=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
        cs1=
        cs1Label=Virus Name
        cn1=0
        cn1Label=Block Reason
        suser=jdoe
        dst=192.168.20.20
        requestContext=https://console.cloud.google.com/
        cs5=
        cs5Label=Content-Disposition
        flexString2=
        fname={}#012
        oldFileName=
        destinationDnsDomain=-
    
  • JSON

    {
      "syslog_facility": "user-level",
      "user_id": -1,
      "url": "https://video.social-dummy.com/",
      "username": "region\\masked_user",
      "reputation": "Minimal Risk",
      "media_type": "",
      "category": "Streaming Media, Social Networking",
      "syslog_facility_code": 1,
      "system": "windows",
      "source_ip": "10.0.0.1",
      "@timestamp": "2018-11-01T10:47:18.000Z",
      "http_action": "CONNECT",
      "user_agent_comment": "",
      "virus": "",
      "location": "",
      "host": {
        "id": "a9b50f8b-xxxx-xxxx-xxxx-b440271f31d1",
        "architecture": "x86_64",
        "os": {
          "platform": "windows",
          "kernel": "10.0.14393.3630",
          "family": "windows",
          "build": "14393.3630",
          "version": "10.0",
          "name": "Windows Server 2016 Standard"
        },
        "hostname": "PROXY_HOST_01",
        "name": "PROXY_HOST_01"
      },
      "@version": "1",
      "timestamp_epoch": 1589698038,
      "tags": [
        "send_json"
      ],
      "last_rule": "Block URLs whose category is in Category BlockList",
      "user_agent_product": "Other",
      "server_to_client_bytes": 4211,
      "block_reason": "Blocked by URL filtering",
      "uri_scheme": "https",
      "message": "\"-1\",\"region\\\\masked_user\",\"10.0.0.1\",\"CONNECT\",\"4211\",\"2224\",\"video.social-dummy.com\",\"/\",\"DENIED\",\"\",\"1589698038\",\"2020-05-17 06:47:18\",\"https\",\"Streaming Media, Social Networking\",\"\",\"\",\"Minimal Risk\",\"Block URLs whose category is in Category BlockList\",\"403\",\"192.168.1.100\",\"\",\"Blocked by URL filtering\",\"Other\",\"\",\"\",\"https://video.social-dummy.com/\"",
      "application_type": "",
      "result": "DENIED",
      "requested_path": "/",
      "syslog_severity_code": 5,
      "user_agent_version": "",
      "input": {
        "type": "log"
      },
      "client_to_server_bytes": 2224,
      "ecs": {
        "version": "1.4.0"
      },
      "client_ip": "192.168.1.100",
      "syslog_severity": "notice",
      "requested_host": "video.social-dummy.com",
      "agent": {
        "id": "64f73b95-xxxx-xxxx-xxxx-4293d255db15",
        "version": "7.6.2",
        "type": "filebeat",
        "hostname": "PROXY_HOST_01",
        "ephemeral_id": "6f2c729c-xxxx-xxxx-xxxx-d6c97930c632"
      },
      "log": {
        "file": {
          "path": "E:\\FullURL-PostProcessLogs\\Appended\\websaas12_1589697967.csv"
        },
        "offset": 774757
      },
      "http_status_code": 403
    }
    
  • Syslog + Key-Value(パイプ区切り)

    <30>Apr 14 03:49:56 PROXY01IM0001 mwg: McAfeeWG|
      time_stamp=[01/Nov/2018:03:49:56 +0530]|
      auth_user=|
      src_ip=10.10.10.10|
      server_ip=192.168.1.100|
      host=detectportal.firefox.com|
      url_port=80|
      status_code=302|
      bytes_from_client=297|
      bytes_to_client=4134|
      categories=|
      rep_level=|
      method=GET|
      url=http://detectportal.firefox.com/success.txt|
      media_type=|
      application_name=|
      user_agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0|
      block_res=81|
      block_reason=Authentication Required|
      virus_name=|
      hash=|
      filename=success.txt|
      filesize=0|
    
  • CSV

    "-1",
    "domain\masked_user",
    "192.168.100.50",
    "GET",
    "3004",
    "80",
    "s0.ads-dummy.net",
    "/path/to/image.png",
    "OBSERVED",
    "",
    "1671176143",
    "2018-11-16 07:35:43",
    "https",
    "Web Ads",
    "image/png",
    "",
    "Minimal Risk",
    "Connection allowed",
    "200",
    "10.0.0.5",
    "",
    "",
    "Chrome",
    "108.0.0.0",
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
    "chrome.exe",
    "142.250.0.1",
    "443"
    
  • アクセスログ(スペース区切り / デフォルト)

    <30>Jan 1 18:16:31 mdp-proxy-010 mwg:
    2019-01-01 18:16:31 200 10.0.0.15
    NoAuthProd AllowListProd "-" "-" Prod_NoAVScan -
    CONNECT https "us2-loadbalancer.acme.com" 443 10.100.2.3
    "Business" "Minimal Risk" 0 GTI_CLOUD
    "US" "-" "-" "-" "-"
    TCP_MISS 241476 6297 1170 6297 1170
    1.2.3.4 -0400
    0 "-" "Eternaty" "-" - "-" 50931 33229 _EOL_
    
  • CSV でカプセル化された CEF

    2026-01-14T11:20:37.000000Z,
    NETWORK_HTTP,
    "<30>Jan 14 13:20:37 MWG03 mwg: CEF:0|McAfee|Web Gateway|12.2.7|200|Proxy-Block If Virus was Found|2|
      rt=Jan 14 2026 13:20:37
      cat=Access Log
      dst=2.2.2.2
      dhost=vstmr.dummy-host.com
      suser=masked_user
      src=1.1.1.1
      requestMethod=GET
      request=https://vstmr.dummy-host.com/_signalr/connect?token=MASKED_TOKEN
      app=HTTPS
      cs3=HTTP/1.1
      cs3Label=Protocol/Version
      cs4=Business, Software/Hardware
      cs4Label=URL Categories
      cs6=Minimal Risk
      cs6Label=Reputation
      fileType=text/event-stream
      out=19578
      requestClientApplication=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
      cs1=
      cs1Label=Virus Name
      cn1=0
      cn1Label=Block Reason
      cs5=Default
      cs5Label=Policy"
    

UDM マッピング テーブル

ログフィールド UDM マッピング ロジック
application_name principal.application KV 形式の application_name フィールドまたは JSON 形式の user_agent_product から直接マッピングされます。
auth_user principal.user.userid KV 形式の auth_user フィールドから直接マッピングされます。
block_reason security_result.summary JSON 形式と CSV JSON 形式の block_reason フィールド、未加工形式の _block_reason、または KV 形式の block_reason から直接マッピングされます。
block_res security_result.action KV 形式の block_res フィールドからマッピングされます。block_resDENIED であるか、Block を含む場合、アクションは BLOCK です。block_res0 であるか、Allow を含む場合、アクションは ALLOW です。5051525358598180828384110111 などの特殊な値は、security_result.category を決定するために使用されます。
bytes_from_client network.sent_bytes KV 形式の bytes_from_client フィールド、未加工形式の sr_bytes、JSON 形式と CSV JSON 形式の client_to_server_bytes から直接マッピングされます。
bytes_to_client network.received_bytes KV 形式の bytes_to_client フィールド、未加工形式の rs_bytes、JSON 形式と CSV JSON 形式の server_to_client_bytes から直接マッピングされます。
categories security_result.category_details KV 形式の categories フィールド、未加工形式の _category、JSON 形式と CSV JSON 形式の category から直接マッピングされます。
client_ip principal.ipintermediary.ip JSON 形式の client_ip フィールドから直接マッピングされます。
clientIP principal.ip CEF 形式の clientIP フィールドから直接マッピングされます。
csmethod network.http.method 未加工形式の csmethod フィールドから直接マッピングされます。
day metadata.event_timestamp タイムスタンプの一部。KV 形式の time_stamp フィールドから抽出されます。
destination_ip target.ip JSON 形式の destination_ip フィールドから直接マッピングされます。
destination_port target.port JSON 形式の destination_port フィールドから直接マッピングされます。
domain target.hostnametarget.url 未加工形式の domain フィールドから直接マッピングされます。uri が存在する場合、target.url の作成に使用されます。
header intermediary.hostname ログメッセージの先頭から抽出されます。intermediary.hostname の抽出に使用されます。
host target.hostname KV 形式の host フィールドから直接マッピングされます。
hostname principal.hostname JSON 形式の hostname フィールドから直接マッピングされます。
hour metadata.event_timestamp タイムスタンプの一部。KV 形式の time_stamp フィールドから抽出されます。
http_action network.http.method JSON 形式の http_action フィールドから直接マッピングされます。
http_status_code network.http.response_code JSON 形式と CSV JSON 形式の http_status_code フィールド、または未加工形式と KV 形式の status_code から直接マッピングされます。
kv_entry.application_name principal.application KV エントリ内の application_name フィールドから直接マッピングされます。
kv_entry.auth_user principal.user.userid KV エントリ内の auth_user フィールドから直接マッピングされます。
kv_entry.block_reason security_result.summary KV エントリ内の block_reason フィールドから直接マッピングされます。
kv_entry.block_res security_result.actionsecurity_result.category KV エントリ内の block_res フィールドからマッピングされます。アクションとカテゴリを決定するロジックは、最上位の block_res フィールドの場合と同じです。
kv_entry.bytes_from_client network.sent_bytes KV エントリ内の bytes_from_client フィールドから直接マッピングされます。
kv_entry.bytes_to_client network.received_bytes KV エントリ内の bytes_to_client フィールドから直接マッピングされます。
kv_entry.categories security_result.category_details KV エントリ内の categories フィールドから直接マッピングされます。
kv_entry.host target.hostname KV エントリ内の host フィールドから直接マッピングされます。
kv_entry.method network.http.method KV エントリ内の method フィールドから直接マッピングされます。
kv_entry.rep_level security_result.severity_details KV エントリ内の rep_level フィールドから直接マッピングされます。
kv_entry.server_ip target.ip KV エントリ内の server_ip フィールドから直接マッピングされます。
kv_entry.status_code network.http.response_code KV エントリ内の status_code フィールドから直接マッピングされます。
kv_entry.time_stamp metadata.event_timestamp KV エントリ内の time_stamp フィールドから直接マッピングされます。
kv_entry.url target.url KV エントリ内の url フィールドから直接マッピングされます。
kv_entry.url_port target.port KV エントリ内の url_port フィールドから直接マッピングされます。
kv_entry.user_agent network.http.parsed_user_agent KV エントリ内の user_agent フィールドから直接マッピングされ、構造化オブジェクトに解析されます。
last_rule security_result.rule_name JSON 形式の last_rule フィールドから直接マッピングされます。
loc principal.location.country_or_region tgt_ip_or_location から抽出された loc フィールドから直接マッピングされます。
location principal.location.country_or_region JSON 形式の location フィールドから直接マッピングされます。
log.file.path principal.process.file.full_path JSON 形式の log.file.path フィールドから直接マッピングされます。
message 各種 未加工のログ メッセージ。形式(raw、JSON、KV、CEF)に応じて異なる方法で解析されます。
method network.http.method KV 形式と未加工形式の method フィールド、JSON 形式の http_action フィールドから直接マッピングされるか、CEF データから派生します。値が GETPOSTHEADOPTIONSPUTCONNECT のいずれかの場合、metadata.event_typeNETWORK_HTTP に設定されます。値が - または CERTVERIFY の場合、metadata.event_typeNETWORK_CONNECTION に設定されます。
mins metadata.event_timestamp タイムスタンプの一部。KV 形式の time_stamp フィールドから抽出されます。
month metadata.event_timestamp タイムスタンプの一部。KV 形式の time_stamp フィールドまたは CEF 形式の rt フィールドから抽出されます。
monthday metadata.event_timestamp タイムスタンプの一部。ログメッセージの先頭から抽出されます。
protocol network.application_protocol 未加工形式の protocol フィールド、JSON 形式の uri_scheme フィールドから直接マッピングされるか、KV 形式の url フィールドから派生します。
query target.url 未加工形式の query フィールドから直接マッピングされます。url フィールドに追加されます。
rep_level security_result.severity_details KV 形式の rep_level フィールド、JSON 形式の reputation フィールド、または未加工形式の _risk フィールドから直接マッピングされます。security_result.severity の決定に使用されます。
request target.url CEF 形式の request フィールドから直接マッピングされます。
requestClientApplication network.http.user_agent CEF 形式の requestClientApplication フィールドから直接マッピングされます。
requestContext network.http.referral_url CEF 形式の requestContext フィールドから直接マッピングされます。
requestMethod network.http.method CEF 形式の requestMethod フィールドから直接マッピングされます。
requested_host target.url JSON 形式の requested_host フィールドから直接マッピングされます。requested_path も存在する場合、target.url の作成に使用されます。
requested_path target.url JSON 形式の requested_path フィールドから直接マッピングされます。requested_host に追加されて target.url を形成します。
request_timestamp metadata.event_timestamp JSON 形式の request_timestamp フィールドから直接マッピングされます。
result security_result.actionsecurity_result.category JSON 形式と CSV JSON 形式の result フィールド、または KV 形式の block_res から直接マッピングされます。security_result.actionsecurity_result.category を決定するために使用されます。
rt metadata.event_timestamp CEF 形式の rt フィールドから直接マッピングされます。
secs metadata.event_timestamp タイムスタンプの一部。KV 形式の time_stamp フィールドから抽出されます。
server_ip target.ip KV 形式の server_ip フィールドから直接マッピングされます。
source_ip principal.ip JSON、CSV JSON、raw、KV 形式の source_ip フィールド、CEF 形式の src、または raw 形式の src_ip から直接マッピングされます。
src principal.ip CEF 形式の src フィールドから直接マッピングされます。
status_code network.http.response_code 未加工形式の status_code フィールドから直接マッピングされます。
summary security_result.summary CSV 形式の summary フィールド、または JSON 形式の block_reason から直接マッピングされます。
system principal.platform JSON 形式の system フィールドから直接マッピングされます。大文字に変換されている。
target_ip target.ip 未加工形式の target_ip フィールド、または CEF 形式の dst から直接マッピングされます。
tgtport target.port 未加工形式の tgtport フィールドから直接マッピングされます。
time metadata.event_timestamp タイムスタンプの一部。ログメッセージの先頭、CEF 形式の rt フィールド、または KV 形式の time_stamp フィールドから抽出されます。
timestamp metadata.event_timestamp JSON 形式の @timestamp フィールドから直接マッピングされます。
timezone metadata.event_timestamp タイムスタンプの一部。KV 形式の time_stamp フィールドから抽出されます。
uri target.url 未加工形式の uri フィールドから直接マッピングされます。target.url の作成に使用されます。
uri_scheme network.application_protocol JSON 形式の uri_scheme フィールドから直接マッピングされます。大文字に変換されている。
url target.url 未加工、KV、JSON 形式の url フィールドから直接マッピングされるか、未加工形式の domainuriquery、JSON 形式の requested_hostrequested_path、CEF 形式の request から構築されます。
url_port target.port KV 形式の url_port フィールドから直接マッピングされます。
user principal.user.userid JSON 形式の user フィールド、JSON 形式の username、KV 形式の auth_user、未加工形式の suser から直接マッピングされます。
user_agent network.http.parsed_user_agent 未加工形式と KV 形式の user_agent フィールド、JSON 形式の user_agent_comment、CEF 形式の requestClientApplication から直接マッピングされるか、JSON 形式の agent.typeagent.version から構築されます。構造化オブジェクトに解析されます。
user_agent_comment network.http.parsed_user_agent JSON 形式の user_agent_comment フィールドから直接マッピングされます。
user_agent_product principal.application JSON 形式の user_agent_product フィールドから直接マッピングされます。
username principal.user.userid JSON 形式の username フィールドから直接マッピングされます。
year metadata.event_timestamp タイムスタンプの一部。KV 形式の time_stamp フィールドまたは CEF 形式の rt フィールドから抽出されます。
なし metadata.event_type method フィールドに基づいてパーサーによって決定されます。NETWORK_HTTPNETWORK_CONNECTIONGENERIC_EVENTSTATUS_UPDATE のいずれかになります。
なし metadata.log_type MCAFEE_WEBPROXY にハードコードされています。
なし metadata.product_name MCAFEE_WEBPROXY にハードコードされています。
なし metadata.vendor_name MCAFEE にハードコードされています。
なし network.direction OUTBOUND にハードコードされています。
なし security_result.action block_reason フィールドまたは result フィールドに基づいてパーサーによって決定されます。ALLOW または BLOCK のいずれかです。
なし security_result.category result フィールドに基づいてパーサーによって決定されます。NETWORK_CATEGORIZED_CONTENTNETWORK_DENIAL_OF_SERVICEMAIL_SPAMAUTH_VIOLATIONSOFTWARE_MALICIOUSNETWORK_SUSPICIOUS、または NETWORK_MALICIOUS のいずれかです。
なし security_result.severity risk フィールドに基づいてパーサーによって決定されます。LOWMEDIUMHIGH のいずれかです。

さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。