McAfee Web Gateway-Logs erfassen

Unterstützt in:

In diesem Dokument wird beschrieben, wie Sie die McAfee Web Gateway-Logs mithilfe eines Bindplane-Agents in Google Security Operations aufnehmen. Der Parser extrahiert Felder aus den Logs in den Formaten SYSLOG + KV (CEF), JSON und Rohdaten. Es werden grok- und CSV-Filter verwendet, um verschiedene Logstrukturen zu parsen und Feldnamen zu normalisieren. Anschließend werden die extrahierten Felder dem Schema für einheitliche Datenmodelle (Unified Data Model, UDM) zugeordnet. Dabei werden verschiedene Grenzfälle und Dateninkonsistenzen berücksichtigt, um eine einheitliche Ausgabe zu erstellen.

Hinweise

Prüfen Sie, ob die folgenden Voraussetzungen erfüllt sind:

  • Google SecOps-Instanz
  • Windows 2016 oder höher oder Linux-Host mit systemd
  • Wenn die Ausführung hinter einem Proxy erfolgt, sind die Firewallports geöffnet.
  • Privilegierter Zugriff auf McAfee Web Gateway

Authentifizierungsdatei für die Aufnahme in Google SecOps abrufen

  1. Melden Sie sich in der Google SecOps-Konsole an.
  2. Rufen Sie SIEM-Einstellungen > Collection Agents auf.
  3. Laden Sie die Authentifizierungsdatei für die Aufnahme herunter. Speichern Sie die Datei sicher auf dem System, auf dem BindPlane installiert wird.

Google SecOps-Kundennummer abrufen

  1. Melden Sie sich in der Google SecOps-Konsole an.
  2. Rufen Sie die SIEM-Einstellungen > „Profil“ auf.
  3. Kopieren und speichern Sie die Kunden-ID aus dem Bereich Organisationsdetails.

BindPlane-Agent installieren

Fenstereinbau

  1. Öffnen Sie die Eingabeaufforderung oder PowerShell als Administrator.
  2. Führen Sie dazu diesen Befehl aus:

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

Linux-Installation

  1. Öffnen Sie ein Terminal mit Root- oder Sudo-Berechtigungen.
  2. Führen Sie dazu diesen Befehl aus:

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

Zusätzliche Installationsressourcen

Weitere Installationsoptionen finden Sie im Installationsleitfaden.

BindPlane-Agent zum Erfassen von Syslog-Daten und Senden an Google SecOps konfigurieren

  1. Rufen Sie die Konfigurationsdatei auf:
    • Suchen Sie die Datei config.yaml. Normalerweise befindet es sich unter Linux im Verzeichnis /etc/bindplane-agent/ oder unter Windows im Installationsverzeichnis.
    • Öffnen Sie die Datei mit einem Texteditor (z. B. nano, vi oder Notepad).
  2. Bearbeiten Sie die Datei config.yamlso:

    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. Ersetzen Sie den Port und die IP-Adresse nach Bedarf in Ihrer Infrastruktur.

  4. Ersetzen Sie <customer_id> durch die tatsächliche Kundennummer.

  5. Aktualisieren Sie /path/to/ingestion-authentication-file.json auf den Pfad, in dem die Authentifizierungsdatei im Abschnitt Google SecOps-Aufnahmeauthentifizierungsdatei abrufen gespeichert wurde.

Bindplane-Agent neu starten, um die Änderungen zu übernehmen

  • Führen Sie den folgenden Befehl aus, um den Bindplane-Agent unter Linux neu zu starten:

    sudo systemctl restart bindplane-agent
    
  • Wenn Sie den Bindplane-Agent unter Windows neu starten möchten, können Sie entweder die Konsole Dienste verwenden oder den folgenden Befehl eingeben:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

Syslog in McAfee Web Gateway konfigurieren

  1. Melden Sie sich in der Web-UI von McAfee Web Gateway an.
  2. Rufen Sie Richtlinie > Regelsätze auf.
  3. Klicken Sie auf Log Handler (Log-Handler), maximieren Sie dann den Regelsatz Default (Standard) und wählen Sie den verschachtelten Regelsatz CEF Syslog aus.
  4. Aktivieren Sie die Regel Send to Syslog (An Syslog senden).
  5. Klicken Sie auf Änderungen speichern.
  6. Gehen Sie zu Konfiguration > Geräte> Log File Manager> Einstellungen.
  7. Wählen Sie Audit-Log in Syslog schreiben aus.
  8. Rufen Sie Konfiguration > Dateieditor auf.
  9. Wählen Sie im Dateibaum rsyslog.conf aus.
  10. Bearbeiten Sie die Datei so:
    • Suchen Sie die Zeile (oder eine ähnliche): *.info;mail.none;authpriv.none;cron.none /var/log/messages.
    • Fügen Sie in dieser Zeile einen Daemon hinzu und setzen Sie vor die Pfadinformationen einen Bindestrich (-): *.info;daemon.!=info;mail.none;authpriv.none;cron.none -/var/log/messages
  11. Fügen Sie unten in der Datei eine neue Zeile hinzu, um die Informationsmeldungen an die IP-Adresse des Bindplane-Agents zu senden.

    • Für Syslog über UDP:

      daemon.info;auth.=info @<bindplane-server-ip>:<bindplane-port>
      
    • Für Syslog über TCP:

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

UDM-Zuordnungstabelle

Logfeld UDM-Zuordnung Logik
application_name principal.application Direkt aus dem Feld application_name im KV-Format oder user_agent_product im JSON-Format zugeordnet.
auth_user principal.user.userid Direkt aus dem Feld auth_user im KV-Format zugeordnet.
block_reason security_result.summary Direkt aus dem Feld block_reason im JSON- und CSV-JSON-Format, _block_reason im Rohformat oder block_reason im KV-Format zugeordnet.
block_res security_result.action Wird aus dem Feld block_res im KV-Format zugeordnet. Wenn block_res DENIED ist oder Block enthält, ist die Aktion BLOCK. Wenn block_res 0 ist oder Allow enthält, ist die Aktion ALLOW. Sonderwerte wie 50, 51, 52, 53, 58, 59, 81, 80, 82, 83, 84, 110, 111 werden verwendet, um security_result.category zu bestimmen.
bytes_from_client network.sent_bytes Direkt aus dem Feld bytes_from_client im KV-Format, sr_bytes im Rohformat oder client_to_server_bytes im JSON- und CSV-JSON-Format zugeordnet.
bytes_to_client network.received_bytes Direkt aus dem Feld bytes_to_client im KV-Format, rs_bytes im Rohformat oder server_to_client_bytes im JSON- und CSV-JSON-Format zugeordnet.
categories security_result.category_details Direkt aus dem Feld categories im KV-Format, _category im Rohformat oder category im JSON- und CSV-JSON-Format zugeordnet.
client_ip principal.ip, intermediary.ip Direkt aus dem Feld client_ip im JSON-Format zugeordnet.
clientIP principal.ip Direkt aus dem Feld clientIP im CEF-Format zugeordnet.
csmethod network.http.method Direkt aus dem Feld csmethod im Rohformat zugeordnet.
day metadata.event_timestamp Teil des Zeitstempels, der aus dem Feld time_stamp im KV-Format extrahiert wurde.
destination_ip target.ip Direkt aus dem Feld destination_ip im JSON-Format zugeordnet.
destination_port target.port Direkt aus dem Feld destination_port im JSON-Format zugeordnet.
domain target.hostname, target.url Direkt aus dem Feld domain im Rohformat zugeordnet. Wird zum Erstellen von target.url verwendet, wenn uri vorhanden ist.
header intermediary.hostname Wird am Anfang der Log-Nachricht extrahiert. Wird zum Extrahieren von intermediary.hostname verwendet.
host target.hostname Direkt aus dem Feld host im KV-Format zugeordnet.
hostname principal.hostname Direkt aus dem Feld hostname im JSON-Format zugeordnet.
hour metadata.event_timestamp Teil des Zeitstempels, der aus dem Feld time_stamp im KV-Format extrahiert wurde.
http_action network.http.method Direkt aus dem Feld http_action im JSON-Format zugeordnet.
http_status_code network.http.response_code Direkt aus dem Feld http_status_code in JSON- und CSV-JSON-Formaten oder status_code in Roh- und KV-Formaten zugeordnet.
kv_entry.application_name principal.application Direkt aus dem Feld application_name im KV-Eintrag zugeordnet.
kv_entry.auth_user principal.user.userid Direkt aus dem Feld auth_user im KV-Eintrag zugeordnet.
kv_entry.block_reason security_result.summary Direkt aus dem Feld block_reason im KV-Eintrag zugeordnet.
kv_entry.block_res security_result.action, security_result.category Wird aus dem Feld block_res im KV-Eintrag zugeordnet. Die Logik zum Bestimmen von Aktion und Kategorie ist dieselbe wie für das block_res-Feld der obersten Ebene.
kv_entry.bytes_from_client network.sent_bytes Direkt aus dem Feld bytes_from_client im KV-Eintrag zugeordnet.
kv_entry.bytes_to_client network.received_bytes Direkt aus dem Feld bytes_to_client im KV-Eintrag zugeordnet.
kv_entry.categories security_result.category_details Direkt aus dem Feld categories im KV-Eintrag zugeordnet.
kv_entry.host target.hostname Direkt aus dem Feld host im KV-Eintrag zugeordnet.
kv_entry.method network.http.method Direkt aus dem Feld method im KV-Eintrag zugeordnet.
kv_entry.rep_level security_result.severity_details Direkt aus dem Feld rep_level im KV-Eintrag zugeordnet.
kv_entry.server_ip target.ip Direkt aus dem Feld server_ip im KV-Eintrag zugeordnet.
kv_entry.status_code network.http.response_code Direkt aus dem Feld status_code im KV-Eintrag zugeordnet.
kv_entry.time_stamp metadata.event_timestamp Direkt aus dem Feld time_stamp im KV-Eintrag zugeordnet.
kv_entry.url target.url Direkt aus dem Feld url im KV-Eintrag zugeordnet.
kv_entry.url_port target.port Direkt aus dem Feld url_port im KV-Eintrag zugeordnet.
kv_entry.user_agent network.http.parsed_user_agent Direkt aus dem Feld user_agent im KV-Eintrag zugeordnet und dann in ein strukturiertes Objekt geparst.
last_rule security_result.rule_name Direkt aus dem Feld last_rule im JSON-Format zugeordnet.
loc principal.location.country_or_region Direkt aus dem Feld loc zugeordnet, das aus tgt_ip_or_location extrahiert wurde.
location principal.location.country_or_region Direkt aus dem Feld location im JSON-Format zugeordnet.
log.file.path principal.process.file.full_path Direkt aus dem Feld log.file.path im JSON-Format zugeordnet.
message Verschiedene Die Roh-Lognachricht. Wird je nach Format (Rohdaten, JSON, KV, CEF) unterschiedlich geparst.
method network.http.method Direkt aus dem Feld method im KV- und Rohformat oder http_action im JSON-Format zugeordnet oder aus CEF-Daten abgeleitet. Wenn der Wert GET, POST, HEAD, OPTIONS, PUT oder CONNECT ist, wird metadata.event_type auf NETWORK_HTTP festgelegt. Wenn der Wert - oder CERTVERIFY ist, wird metadata.event_type auf NETWORK_CONNECTION gesetzt.
mins metadata.event_timestamp Teil des Zeitstempels, der aus dem Feld time_stamp im KV-Format extrahiert wurde.
month metadata.event_timestamp Teil des Zeitstempels, der aus dem Feld time_stamp im KV-Format oder dem Feld rt im CEF-Format extrahiert wurde.
monthday metadata.event_timestamp Teil des Zeitstempels, der vom Anfang der Logmeldung extrahiert wurde.
protocol network.application_protocol Direkt aus dem Feld protocol im Rohformat oder uri_scheme im JSON-Format zugeordnet oder aus dem Feld url im KV-Format abgeleitet.
query target.url Direkt aus dem Feld query im Rohformat zugeordnet. Wird an das Feld url angehängt.
rep_level security_result.severity_details Direkt aus dem Feld rep_level im Schlüssel/Wert-Format, reputation im JSON-Format oder _risk im Rohformat zugeordnet. Wird zur Bestimmung von security_result.severity verwendet.
request target.url Direkt aus dem Feld request im CEF-Format zugeordnet.
requestClientApplication network.http.user_agent Direkt aus dem Feld requestClientApplication im CEF-Format zugeordnet.
requestContext network.http.referral_url Direkt aus dem Feld requestContext im CEF-Format zugeordnet.
requestMethod network.http.method Direkt aus dem Feld requestMethod im CEF-Format zugeordnet.
requested_host target.url Direkt aus dem Feld requested_host im JSON-Format zugeordnet. Wird zum Erstellen von target.url verwendet, wenn auch requested_path vorhanden ist.
requested_path target.url Direkt aus dem Feld requested_path im JSON-Format zugeordnet. Wird an requested_host angehängt, um target.url zu bilden.
request_timestamp metadata.event_timestamp Direkt aus dem Feld request_timestamp im JSON-Format zugeordnet.
result security_result.action, security_result.category Direkt aus dem Feld result im JSON- und CSV-JSON-Format oder block_res im KV-Format zugeordnet. Wird verwendet, um security_result.action und security_result.category zu bestimmen.
rt metadata.event_timestamp Direkt aus dem Feld rt im CEF-Format zugeordnet.
secs metadata.event_timestamp Teil des Zeitstempels, der aus dem Feld time_stamp im KV-Format extrahiert wurde.
server_ip target.ip Direkt aus dem Feld server_ip im KV-Format zugeordnet.
source_ip principal.ip Direkt aus dem Feld source_ip in den Formaten JSON, CSV JSON, Raw und KV oder src im CEF-Format oder src_ip im Raw-Format zugeordnet.
src principal.ip Direkt aus dem Feld src im CEF-Format zugeordnet.
status_code network.http.response_code Direkt aus dem Feld status_code im Rohformat zugeordnet.
summary security_result.summary Direkt aus dem Feld summary im CSV-Format oder block_reason im JSON-Format zugeordnet.
system principal.platform Direkt aus dem Feld system im JSON-Format zugeordnet. In Großbuchstaben umgewandelt.
target_ip target.ip Direkt aus dem Feld target_ip im Rohformat oder dst im CEF-Format zugeordnet.
tgtport target.port Direkt aus dem Feld tgtport im Rohformat zugeordnet.
time metadata.event_timestamp Teil des Zeitstempels, der aus dem Anfang der Protokollnachricht, dem Feld rt im CEF-Format oder dem Feld time_stamp im KV-Format extrahiert wurde.
timestamp metadata.event_timestamp Direkt aus dem Feld @timestamp im JSON-Format zugeordnet.
timezone metadata.event_timestamp Teil des Zeitstempels, der aus dem Feld time_stamp im KV-Format extrahiert wurde.
uri target.url Direkt aus dem Feld uri im Rohformat zugeordnet. Wird zum Erstellen von target.url verwendet.
uri_scheme network.application_protocol Direkt aus dem Feld uri_scheme im JSON-Format zugeordnet. In Großbuchstaben umgewandelt.
url target.url Direkt aus dem Feld url in den Formaten „Roh“, „KV“ und „JSON“ zugeordnet oder aus domain, uri und query im Rohformat, aus requested_host und requested_path im JSON-Format oder aus request im CEF-Format erstellt.
url_port target.port Direkt aus dem Feld url_port im KV-Format zugeordnet.
user principal.user.userid Direkt aus dem Feld user im JSON-Format, username im JSON-Format, auth_user im KV-Format oder suser im Rohformat zugeordnet.
user_agent network.http.parsed_user_agent Direkt aus dem Feld user_agent im Roh- und KV-Format oder user_agent_comment im JSON-Format oder requestClientApplication im CEF-Format zugeordnet oder aus agent.type und agent.version im JSON-Format erstellt. In ein strukturiertes Objekt geparst.
user_agent_comment network.http.parsed_user_agent Direkt aus dem Feld user_agent_comment im JSON-Format zugeordnet.
user_agent_product principal.application Direkt aus dem Feld user_agent_product im JSON-Format zugeordnet.
username principal.user.userid Direkt aus dem Feld username im JSON-Format zugeordnet.
year metadata.event_timestamp Teil des Zeitstempels, der aus dem Feld time_stamp im KV-Format oder dem Feld rt im CEF-Format extrahiert wurde.
metadata.event_type Wird vom Parser auf Grundlage des Felds method bestimmt. Kann NETWORK_HTTP, NETWORK_CONNECTION, GENERIC_EVENT oder STATUS_UPDATE sein.
metadata.log_type Hartcodiert auf MCAFEE_WEBPROXY.
metadata.product_name Hartcodiert auf MCAFEE_WEBPROXY.
metadata.vendor_name Hartcodiert auf MCAFEE.
network.direction Hartcodiert auf OUTBOUND.
security_result.action Wird vom Parser anhand der Felder block_reason oder result bestimmt. Kann ALLOW oder BLOCK sein.
security_result.category Wird vom Parser auf Grundlage des Felds result bestimmt. Kann NETWORK_CATEGORIZED_CONTENT, NETWORK_DENIAL_OF_SERVICE, MAIL_SPAM, AUTH_VIOLATION, SOFTWARE_MALICIOUS, NETWORK_SUSPICIOUS oder NETWORK_MALICIOUS sein.
security_result.severity Wird vom Parser auf Grundlage des Felds risk bestimmt. Kann LOW, MEDIUM oder HIGH sein.

Benötigen Sie weitere Hilfe? Antworten von Community-Mitgliedern und Google SecOps-Experten erhalten